Remix.run Logo
smlavine 5 days ago

It's not a silver bullet, but Visual Studio is leaps and bounds ahead of gdb et. al. for debugging C/C++ code. "Attach to process" and being able to just click a window is so easy when debugging a large Windows app.

jesse__ 5 days ago | parent | next [-]

lol, agree to disagree here. While the interface to gdb is annoying, there are many gui frontend alternatives.

VS, on the other hand, gets worse with every release. It is intolerably slow and buggy at this point. It used to be a fantastic piece of software, and is now a fantastic pile of shit.

cenamus 5 days ago | parent [-]

Any recommendations on gdb frontends? Have tried with emacs, but I just really enjoy the point and click stuff, emacs keybinds don't work for me there.

westurner 4 days ago | parent | next [-]

From https://news.ycombinator.com/item?id=35710350 :

> ... py-list, py-up and py-down, py-bt, py-print, and py-locals GDB commands

> [ DDD, pyclewn (vim), trepan3k, Voltron, gdbghidra ]

gdbghidra: https://github.com/Comsecuris/gdbghidra

radare2: https://github.com/radareorg/radare2

voltron: https://github.com/snare/voltron

And from https://news.ycombinator.com/item?id=41943521 :

> pyvmidbg (libVMI + GDB)

But that's archived.

There's a QEMU gdbstub GDB interface.

To print registers with GDB:

  info reg
  info all-registers
  i r a
spacechild1 5 days ago | parent | prev | next [-]

IMO the GDB frontend in QtCreator is quite nice.

jesse__ 4 days ago | parent | prev [-]

GitHub.com/nakst/gf

dahart 4 days ago | parent | prev | next [-]

It really depends. The VS debugger is excellent, and it is usually easier I agree there. But gdb is more easily scriptable and more powerful in certain situations, so I reach for gdb sometimes for the harder bugs even though I use VS more often. Of course, they don’t really compete with each other that much, since VS is mainly Windows and gdb is mainly Linux. Of course I know you can do either debugger on either OS, but in practice the debugger choice is primarily OS based.

o11c 4 days ago | parent | prev [-]

Under X11 that can be done with:

  gdb -p `xprop _NET_WM_PID | sed 's/.*= //'`
I think under Wayland it might not be possible since Wayland gratuitously breaks all nice things.