I want to debug a c++ program using gdb. I use the pi and the py commands to evaluate python commands from within gdb, which works fine when I invoke gdb from the command line. However, when I invoke gdb from within emacs using M-x gdb and then gdb -i=mi file_name, the following errors occur:
- the
picommand correctly opens an interactive python shell, but any input to this shell yields the errors like this:
File "stdin", line 1
-interpreter-exec console "2"
SyntaxError: invalid syntax
- the
pycommand works correctly for a single command (likepy print 2+2), but not for multiple commands
I can get around those problems by starting gdb with gud-gdb, but then I dont have the support for gdb-many-windows. Maybe the problem is caused by the prompt after typing pi, which is no longer (gdb) but >>> instead?