Eclipse failed to execute MI command -target-selec

2019-01-24 06:48发布

问题:

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

( executing this i can get gdb shell )

any idea what i am doing wrong ? i think this is pretty elementary??

回答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



回答2:

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.



回答3:

Switched to Debug view (upper right button), I then in the top menu bar towards the left I clicked the red box Terminate button. Then I was able to launch debug again.



回答4:

This issue is created because of two reason:

  1. if break point is enable so go to run and skip breakpoint
  2. if debug device is not set correctly so go to Debug configure as and check for Debugger option is filled correctly.