3 ms·
What do you use GDB scripting for if you don't mind me asking? I always try to use it, but it's such an awkward language ant it never feels quite worth it to me
by delusional 1y ago
What do you use GDB scripting for if you don't mind me asking? I always try to use it, but it's such an awkward language ant it never feels quite worth it to me.
- nneonneo 1y agoIt’s useful for simple breakpoint automation and conditional breakpoints, as well as basically adding virtual print statements to programs (the printf command in GDB is very powerful). I also used it to find a complex bug that someone posted here on HN once: https://news.ycombinator.com/item?id=22031581 https://news.ycombinator.com/item?id=22031581 Also, GDB supports Python scripting too, which is really good since you can use the full power of Python with a decent debugger API; many of the plugins I use frequently (e.g. GEF - https://github.com/hugsy/gef https://github.com/hugsy/gef) are written using the Python GDB API.