Learn the lldb debugger basics in 11 minutes | 2021 (Also works on M1 Apple Silicon)

Поделиться
HTML-код
  • Опубликовано: 19 авг 2024

Комментарии • 58

  • @stavb9400
    @stavb9400 Год назад +8

    The 11 minutes I did not know I needed , great job

  • @apprenticerocker9885
    @apprenticerocker9885 Год назад +5

    Thank you very much, I’m trying to jump from web programming to system programming and I really needed a clear and easy introduction to LLDB.

    • @MikeShah
      @MikeShah  Год назад

      You are most welcome!

  • @user-oj4yl4tf6b
    @user-oj4yl4tf6b Год назад +3

    I don't know if gdb or pdb has this kind of easy to use tools.If they have, it will make a step further for me to debug cpp or py programs.Since in the GUI format, we can see the entire debugging process more clearly.Thanks guy, you open a new door to me.

  • @jinhuang7258
    @jinhuang7258 11 месяцев назад +1

    OMG, thank you......I spent my entire morning trying to find out why gdb failed on the UTM Ubuntu Linux on my Apple M1.....It was so frustrating. Then I found your video and lldb worked perfectly.,...Thank you!

  • @HeiderSati
    @HeiderSati Год назад +8

    LLoved it, great tutorial, I was looking for the r and n shortcuts on GUI and yours really helped, thanks million :)

  • @justsurajp
    @justsurajp Год назад +1

    Hint: Once can use "frame" or "f" instead of "list " to view the current frame.
    PS: Thanks for the tutorial, it helped! :)

    • @MikeShah
      @MikeShah  Год назад

      Cheers, you are most welcome!

  • @samjudelson
    @samjudelson 6 месяцев назад

    This is a great introduction to LLDB, thank you!

    • @MikeShah
      @MikeShah  6 месяцев назад

      Thank you!

  • @sjb8178
    @sjb8178 Год назад +1

    this is freaking beautiful

  • @joshchartrand8464
    @joshchartrand8464 2 года назад +2

    Great video!

    • @MikeShah
      @MikeShah  2 года назад +1

      Thank you for the kind words 🙂

  • @cindaellas
    @cindaellas 4 месяца назад

    very good tutorial! thank you very much!🙌

  • @xarax7950
    @xarax7950 5 месяцев назад +1

    THANKS !

  • @fortphoenix
    @fortphoenix 2 года назад +1

    Very helpful tutorial! Thanks a ton!

    • @MikeShah
      @MikeShah  2 года назад

      Thank you for the kind words!

  • @user-by8kc3zm1n
    @user-by8kc3zm1n Год назад +1

    Thanks for your tutorial!

  • @VoidloniXaarii
    @VoidloniXaarii 11 месяцев назад +1

    Thankx for this insight into Mac programming that I never had. 2 stupid me looks very Linux ish. Was very curious because of the old I'd software doom biographies where I got the impression of Mac/nextos backgrounds that seemed so distantly magical to me

    • @MikeShah
      @MikeShah  11 месяцев назад

      Cheers! lldb really works well with the clang compilers (which Mac seems to be supporting)

    • @VoidloniXaarii
      @VoidloniXaarii 11 месяцев назад +1

      @@MikeShah clang is in general such a mystery to me... How can they be so so good?

    • @MikeShah
      @MikeShah  11 месяцев назад

      @@VoidloniXaarii Tooling infrastructure for modular frontend (lexer, parser, etc.), optimizer (on the intermediate LLVM bitcode), and backend (Code generation) I think has made a big difference. Allows for more engineers to work in the code. It's evolved into something quite massive, but still is probably the best default for language and toolbuilding.

    • @VoidloniXaarii
      @VoidloniXaarii 11 месяцев назад +1

      @@MikeShah I would not have been so surprised to see such excellentce in gcc or Microsoft compiler, but that it showed up in a less expected made me wonder who the powers/ppl behind it were

  • @vibhatha
    @vibhatha 2 года назад +1

    Really nice presentation 👏👏👏

    • @MikeShah
      @MikeShah  2 года назад

      Thank you for the kind words!

  • @DanelonNicolas
    @DanelonNicolas 11 месяцев назад +1

    good stuff! thanks!

    • @MikeShah
      @MikeShah  11 месяцев назад +1

      Cheers!

  • @anshul5909
    @anshul5909 Месяц назад +1

    i have llvm installed, it has lldb binary. when i execute it, nothing happens. Why? no response at all!, when i pass program as 1st argument nothing happends! why why?

    • @MikeShah
      @MikeShah  Месяц назад

      Hmm, any progress on this? Strange if you get no feedback on the terminal. What version of lldb?

    • @anshul5909
      @anshul5909 Месяц назад +1

      @@MikeShah lldb depends on embedded python libs, which is not available on windows. I added them manually, now it works.

    • @MikeShah
      @MikeShah  Месяц назад

      @@anshul5909 Good to know!

  • @roger9822
    @roger9822 2 года назад

    Thank you, really illustrative!

    • @MikeShah
      @MikeShah  2 года назад

      Thank you for the kind words! 🙂

  • @cyogerenkundibiza5284
    @cyogerenkundibiza5284 2 года назад +1

    Thank you so much for such a great video. How do you show the source code instead of assembly code. Basically, in my case after the run command, the whole process is showing in assembly only. I would like to show the source code instead. I couldn't find any help on the lldb website.

    • @MikeShah
      @MikeShah  2 года назад

      Can always use 'l' (lower case L) to list the source code. If you mean in the GUI, try going to @7:40 and following along. My guess is you did not compile your code with '-g' to insert debugging symbols.

  • @dmitryponyatov2158
    @dmitryponyatov2158 Год назад +1

    How can I intergate lldb with VSCode and maybe some other external tools like Wireshark to debug low-level networking code (in Rust) ?
    I googled some time, can can't find any VSCode extension able to show network traffic in an app started in debug mode, excepts one able to view recorded traffic files but not a realtime run.

    • @MikeShah
      @MikeShah  Год назад

      I don't use VSCode often, but I imagine there is an integration. Otherwise, lldb can be used from the console window. I haven't used wireshark in years either, perhaps there are some integrations as well.

  • @shuklashravan
    @shuklashravan Год назад

    very well explained

  • @ziliangchen7111
    @ziliangchen7111 Год назад +1

    Nice intro, thanks ! May i ask if lldb supports setup breakpoint only for a specific thread (conditionally) ? Like in GDB `b file.cpp:30 thread 4` which only pauses at the breakpoint in thread 4.

    • @MikeShah
      @MikeShah  Год назад

      Can try in lldb, and I think this is supported using the python lldb api, but not sure of the command off the top of my head.

    • @ziliangchen7111
      @ziliangchen7111 Год назад +1

      @@MikeShah Thanks. I googled around, look like there is no direct builtin command for that. Will explore python lldb API.

    • @MikeShah
      @MikeShah  Год назад

      @@ziliangchen7111 cool, let me know what you find!

  • @realdragon
    @realdragon 3 месяца назад

    _Lost debug server connection_

  • @oleholgerson3416
    @oleholgerson3416 2 года назад

    Thanks very helpful. Did you by any chance try out clang modules in lldb? Debugging C++ with libc++ is very annoying. I was hoping that clang modules can help there

    • @MikeShah
      @MikeShah  2 года назад

      By modules do you mean c++20 modules debugging? Or perhaps some other debugging feature?

  • @josephherrera639
    @josephherrera639 2 года назад +1

    Great video! Is there anyway to not have the prompt keep asking you to give permissions to files whenever you "run" LLDB?

    • @MikeShah
      @MikeShah  2 года назад

      I'm assuming you're asking about 3:13? There appears to be some workarounds in the privacy & security settings here: developer.apple.com/forums/thread/110423 Otherwise, I was not running as a super user which may have been the problem.

    • @MikeShah
      @MikeShah  2 года назад

      Note: Should always use care when running as super user!

    • @josephherrera639
      @josephherrera639 2 года назад +1

      Ah, right! Apple can be a pain sometimes. I'll just stick to this and accept the prompt. Thanks again!

  • @martinliza4811
    @martinliza4811 Год назад +1

    Thank you for this video it was very helpful! By any chance do you use an ~/.lldbint If sou, could you share it ?! Thank you :D

    • @MikeShah
      @MikeShah  Год назад

      Cheers! I don't use one at this time