4 ms·
Yes. 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.
by merraksh 10y ago
Yes. 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.