upvote
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.
reply
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.

reply
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.
reply
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
reply
GitHub.com/nakst/gf
reply
IMO the GDB frontend in QtCreator is quite nice.
reply