Eclipse failed to execute MI command -target-select remote
Solution 1
This happens if the gdb client ( inside eclipse ) is not compiled for the same architecture as the gdb server. Setting the correct gdb in eclipse debugging solved this issue.
Solution 2
Switched to Debug view (upper right button), then in the top menu bar towards the left I clicked the red box Terminate button. Then I was able to launch debug again.
Solution 3
The connection is using localhost instead of the remote host. To correct, in eclipse go to
Run->Debug Configurations..
Here choose the Debugger tab, inside there are three additional tabs (Main, Shared Libraries, Connections). In "Connections" you can give the proper IP for the remote machine.
Solution 4
I am using Eclipse and bellow is how I managed to fix it when it happens.
- At the most top right corner of your IDE click on the debug button (debug button) to view the debug mode.
- Once in the debug mode, Right click on where project tree is (usually in the left most column) (Project tree)
- Select "terminate and remove"
- Rebuild your code
Comments
-
Shrouk Khan almost 2 years
Trying to setup remote gdb debugging in eclipse. When I try to debug I get:
Error in final launch sequence Failed to execute MI command: -target-select remote LOCALHOST:2345 Error message from debugger back end: LOCALHOST:2345: Connection timed out. LOCALHOST:2345: Connection timed out.
My gdb debugger is set up correctly
/carambola/carambola/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gdb-linaro-7.2-2011.03-0/gdb/gdb
(when executing this I can get gdb shell)
Any idea what I am doing wrong ?
-
kapilddit over 8 yearsCan you please suggest the steps to correct the gdb setting.
-
Shrouk Khan over 8 years@kapilddit open edebug settings --> Debugger --> Main Tab --> Browse to gdb compiled for the same platform ( it is usually part of the toolchain for that platform ) . For example, this is how remote debugging is configured for debugging c++ program on a raspberry pi : i.imgur.com/z4Ul4or.png
-
wisbucky almost 6 yearsYes, if gdb cannot reach the remote machine (which is running gdbserver) due to many various reasons, you could get this error message.