Question

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 ?

Was it helpful?

Solution

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.

OTHER TIPS

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.

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.

I am using Eclipse and bellow is how I managed to fix it when it happens.

  1. At the most top right corner of your IDE click on the debug button (debug button) to view the debug mode.
  2. Once in the debug mode, Right click on where project tree is (usually in the left most column) (Project tree)
  3. Select "terminate and remove"
  4. Rebuild your code

I tried changing my workspace to the main folder where the project is placed and checked if my ST Link device was scanned (debug configurations) and checked if under run configurations, under main, the .elf file was selected under c/c++: Then my code started working. Hope this helps

I have had the same problem, searched here, but the solution was: The ...\Cygwin\bin was not in the system's PATH. I think gdb was not found.

set PATH=C:\pathto\Cygwin\bin;%PATH% 

before start of eclipse was helpfull (set PATH and start eclipse.exe in a batch file). But the compiler were found (gcc, g++), I don't know why. It may be that the compiler should match to the debugger gdb, see answer above.

This issue is created because of two reason:

  1. If break point is enabled, go to Run and skip breakpoint.
  2. If debug device is not set correctly, go to Debug configure as and check for Debugger option is filled correctly.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top