give me 15 minutes and i'll change your view of gdb
TRANSCRIPT
![Page 1: Give me 15 minutes and i'll change your view of gdb](https://reader031.vdocuments.site/reader031/viewer/2022022413/58eeddcc1a28ab962e8b45d3/html5/thumbnails/1.jpg)
Copyright Undo Ltd, 2015
Give me fifteen minutes and I’ll change your view of GDB
Greg LawCo-founder and CEO, Undo software
![Page 2: Give me 15 minutes and i'll change your view of gdb](https://reader031.vdocuments.site/reader031/viewer/2022022413/58eeddcc1a28ab962e8b45d3/html5/thumbnails/2.jpg)
Copyright Undo Ltd, 2015
GDB - more than you knew
GDB may not be intuitive but it is very powerful▪ Easy to use, just not so easy to learn
![Page 3: Give me 15 minutes and i'll change your view of gdb](https://reader031.vdocuments.site/reader031/viewer/2022022413/58eeddcc1a28ab962e8b45d3/html5/thumbnails/3.jpg)
Copyright Undo Ltd, 2015
GDB - more than you knew
GDB may not be intuitive but it is very powerful▪ Easy to use, just not so easy to learn
TUI: Text User Interface▪ As useful as it is poorly named!
![Page 4: Give me 15 minutes and i'll change your view of gdb](https://reader031.vdocuments.site/reader031/viewer/2022022413/58eeddcc1a28ab962e8b45d3/html5/thumbnails/4.jpg)
Copyright Undo Ltd, 2015
GDB - more than you knew
GDB may not be intuitive but it is very powerful▪ Easy to use, just not so easy to learn
TUI: Text User Interface▪ As useful as it is poorly named!
Python: automate your debugging!
![Page 5: Give me 15 minutes and i'll change your view of gdb](https://reader031.vdocuments.site/reader031/viewer/2022022413/58eeddcc1a28ab962e8b45d3/html5/thumbnails/5.jpg)
Copyright Undo Ltd, 2015
GDB - more than you knew
GDB may not be intuitive but it is very powerful▪ Easy to use, just not so easy to learn
TUI: Text User Interface▪ As useful as it is poorly named!
Python: automate your debugging!Reversible debugging: how did that happen?
![Page 6: Give me 15 minutes and i'll change your view of gdb](https://reader031.vdocuments.site/reader031/viewer/2022022413/58eeddcc1a28ab962e8b45d3/html5/thumbnails/6.jpg)
Copyright Undo Ltd, 2015
Other cool things...
▪ tbreak temporary breakpoint▪ rbreak reg-ex breakpoint▪ break xxx if yyy conditionally break at xxx if condition yyy holds▪ commands list of commands to be executed when a breakpoint is hit▪ silent special command to suppress output on breakpoint hit▪ save breakpoints save a list of breakpoints to a script▪ save history save history of executed gdb commands▪ call call a function in the inferior▪ watch -l watchpoint based on address (location)▪ rwatch read watchpoint▪ info line foo.c:42 show PC for line▪ info line * $pc show line begin/end for current program counter▪ thread apply all bt backtrace for every thread▪ dprintf dynamic printf▪ python: define custom commands by inheriting from gdb.Command class▪ python: hook events to invoke python functions using gdb.events.stop.connect▪ gcc’s -g and -O are orthogonal