Cool stuff about GDB you didn't know - Greg Law - Meeting C++ 2022

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024

ความคิดเห็น • 17

  • @Roibarkan
    @Roibarkan ปีที่แล้ว +2

    6:55 I believe “ctrl-x,o” is another way to change the focus between the different tui sections (“o” as in “other”)

    • @ozne_2358
      @ozne_2358 ปีที่แล้ว

      Great tip!

  • @simonfarre4907
    @simonfarre4907 ปีที่แล้ว +5

    Or if you use Vscode and develop on Linux and its C++/C, use the "Midas" debug adapter, that uses GDB and RR (optionally). It is faster than Cpptools developed by Microsoft. For debugging applications like Firefox, Midas is 2-4 times faster as a debug adapter for GDB.

    • @simonfarre4907
      @simonfarre4907 ปีที่แล้ว

      What's nice about Midas is that it also interops 1 to 1 with the CLI, so in the debug window, you can type all cli commands without strange prefixes.

  • @nmihaylove
    @nmihaylove ปีที่แล้ว +6

    Borland's Turbo Debugger had much better usability, while still in text mode, 35 years ago! GDB may be powerful, customizable, scriptable but I need to be able to start using it in a basic manner before I try to dip my toes deeper. What I see here is an absolute no-go for most developers.
    Where are the Turbo Pascal/Turbo C--like text mode intergarted development environments? There's no need for GUI for most applications, IMO. Oh, well, I guess I'm just ranting..

    • @frydac
      @frydac ปีที่แล้ว

      When using the terminal integrated in vim, it has support for gdb, which is pretty nice. Especially if you have your vim setup with modern plugins that add LSP, fuzzy search and e.g. a filetree, which makes it imho much easier to set breakpoints, view what is going on around the current breakpoint and navigate the code while debugging. While having full access to the gdb interface. I tend to use DAP these days in neovim for simple debug sessions, but the debug adapter is pretty basic in comparison, but has a bunch of pretty printers for various stl containers built in.

    • @greglaw9145
      @greglaw9145 ปีที่แล้ว

      Keen to learn more. What are the bits of of Turbo Pascal debugger that are missing in GDB? Do you mean the integration with rest of dev environment? (The I in IDE.) Or are there other things?

    • @gpsoftsk1
      @gpsoftsk1 ปีที่แล้ว

      @@greglaw9145 probably the user interface is missing. Of course, you can learn commands as well.

  • @dnaphysics
    @dnaphysics ปีที่แล้ว +4

    Coming from Visual Studio this looks like the Stone Age. Am I mistaken?

    • @4AneR
      @4AneR ปีที่แล้ว

      This particular talk is about default "stone age" console frontend of GDB. But the backend of GDB is quite advanced. There are more "graphically convenient" frontends for GDB, e.g. extensions for VS Code, which have user experiencr identical to Visual Studio's debugger.

    • @greglaw9145
      @greglaw9145 ปีที่แล้ว +4

      @@4AneR Exactly! I like to think not so "what does this look/feel like?" but "what can I do with it?". Although, I haven't used Visual Studio in years so am not in a good position to compare. Nonetheless from the outside it is pretty obvious that Visual Studio is a super sophisticated and complete product that has had huge investment from Microsoft with many very smart people working on it. But it's just not an option for many people - if you're debugging Linux applications you can use VS or VS Code, but in both cases it's just a frontend to GDB.

  • @_gapry
    @_gapry ปีที่แล้ว

    23:20 the .gdbinit at home directory

  • @MeetingCPP
    @MeetingCPP  ปีที่แล้ว +1

    Undo offers training for GDB info.undo.io/gdb-training

  • @bernadettetreual
    @bernadettetreual ปีที่แล้ว

    So, uhm, like lldb, all gdb now needs is a frontend to provide easy access to all those features.

    • @not_ever
      @not_ever ปีที่แล้ว +2

      There are many front ends for GDB. It is strange that there are so many of these GDB talks, which never demonstrate a decent front end and make it seem like the best way to use GDB is the bug ridden tui.

    • @greglaw9145
      @greglaw9145 ปีที่แล้ว

      @@not_ever It's a good point. I need to do some talks on frontends. (And first learn more about the various things on offer, but as they say, the best way to learn something is to teach it!). On that topic, what are the frontends you would particularly recommend?

    • @ultradude5410
      @ultradude5410 2 หลายเดือนก่อน

      Check out cgdb!