问题
Setting up remote gdb debugging in eclipse . The debugger will step through the code just fine but, all of the variables show the following error:
1) Failed to execute MI command: -var-create - var_Name Error message from debugger back end: Cannot instantiate printer for default visualizer
Basically, values don't show up for the variables. Is there a setting for the .gdbinit file to fix this, or some other setting in eclipse?
- The remote device uses NFS to mount the localhost /path/to/app
- compiler: gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf
- localhost: running linux mint 19.2 and using arm-linux-gnueabihf-gdb
remote: gdbserver :port /path/to/app
user@localhost:/ gdb --version GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
回答1:
From Eclipse Main window: Window -> Preferences -> C/C++ -> Debug -> GDB : Under Pretty Printing region, Deselect "Enable pretty printers in variable/expression tree"
Then click "Apply" and "Apply and Close" viola the variables now print out during remote debug sessions. No change to my .gdbinit file was needed.
Perhaps I am not using python-enabled GDB... I am not sure.
来源:https://stackoverflow.com/questions/59886832/gdb-remote-debugging-cannot-instantiate-printer-for-default-visualizer