4 ms·
A summary of the 15 minute video: 1. introduction to 'tui' mode in gdb (https://sourceware.org/gdb/onlinedocs/gdb/TUI.html https://sourceware.org/gdb/onlinedoc
by derefnull 10y ago
A summary of the 15 minute video:
1. introduction to 'tui' mode in gdb (https://sourceware.org/gdb/onlinedocs/gdb/TUI.html https://sourceware.org/gdb/onlinedocs/gdb/TUI.html)
2. intro to python support in gdb (if it was compiled in)
2.1 python print('hello world')
2.1 set breakpoints with python gdb interface
3. Demo of reverse debugging in gdb, which helps isolate a stack-corrupting bug (https://www.gnu.org/software/gdb/news/reversible.html https://www.gnu.org/software/gdb/news/reversible.html)
- castratikron 10y agoGDB + Python is really slick. I wrote a Python C module for the first time last month and GDB really came in handy for that. It just worked.
- merraksh 10y agoYes. It can print the value of C variables and Python objects, using their _str() method I assume. Extremely useful. Even better when done within Emacs.
- jamra 10y agoI'm more of a vim user, but have dabbled in emacs so I'm not sure what you mean by "Even better when done in Emacs". Is there some kind of cool gdb tools in Emacs you're referring to? I'm just asking because day by day I'm becoming more interested in making the switch.
- yeowMeng 10y agoI believe it is a reference to increased control over available gdb buffers (ex: register's value, disassembly, source). Ability to use macro's while debugging. And probably more key bindings.
- moosingin3space 10y agoAs someone who regularly switches back and forth between emacs and neovim, I do prefer emacs' gdb integration. It gives you an IDE-like view where you can set breakpoints visually and see registers/stack in their own windows.
- endgame 10y agoYou might find this article useful: http://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-fourteen-days.html http://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-... Aaron gave a great talk about his switch here: https://www.youtube.com/watch?v=JWD1Fpdd4Pc https://www.youtube.com/watch?v=JWD1Fpdd4Pc , which caused several people at work to move off NeoVim and give emacs a go.
- pjmlp 10y agoThanks for the links it was interesting to watch as a former Emacs fan. In the old days, Emacs alongside DDD was the only way for me to get some of the Borland IDE comfort in UNIX land.
- merraksh 10y ago"Meta-x gud-gdb" for the old fashioned, or "Meta-x gdb", starts a gdb session in Emacs. Give it the executable you want to debug, then at the prompt type "run arg1 arg2...". "watch p_mydata[34]->blahblah" sets a hardware watchpoint; Ctrl-x-a-b sets a breakpoint at the cursor in the Emacs; Ctrl-x-a-u runs until the cursor; Ctrl-x-a-j jumps at the cursor; And many other niceties. There's also a way to create a buffer to monitor some variables. You can actually attach the emacs-gdb buffer to a process you're running through valgrind when a valgrind error occurs. Not to mention it runs undo-gdb, of course.
- deleted 10y ago[deleted]