Starting GDB with interpreter mi via .gdbinit file

196 views Asked by At

I'm trying to debug a MATLAB mex function by launching gdb by matlab -Dgdb. I use emacs to interface with gdb and Matlab shells.

I need the mi interpreter for debugging to work in emacs24, which, as far as I know, cannot be specified when launching gdb by the command matlab -Dgdb. How do you start gdb with the mi interpreter via .gdbinit? I tried several obvious options.

1

There are 1 answers

0
Tom Tromey On

One simple way is to write a wrapper script that invokes gdb as you like, then arrange to have matlab use that script.