3 ms·
What would I have to do to use gdb as a C repl? I'm not very familiar with gdb other than using the backtrace to debug segmentation faults.
by ufo 7y ago
What would I have to do to use gdb as a C repl? I'm not very familiar with gdb other than using the backtrace to debug segmentation faults.
- pjmlp 7y agoCompile your executable with debug info, and then make use of gdb expressions. https://sourceware.org/gdb/current/onlinedocs/gdb/Expressions.html#Expressions https://sourceware.org/gdb/current/onlinedocs/gdb/Expression... It is not fully featured REPL, don't expect to use it to create stuff on the fly, it is more to query and call existing code. For a proper REPL, check one of the listed interpreters.
- rowanG077 7y agoSo what you are saying that it's not actually a C REPL. It's a GDB expression REPL which is very different. What was the original point of your comment?