The bad thing with Eclipse and GDB is: if something is failing, then all what I get is a very cryptic error message when I launch the debugger:
The error message in the dialog is:
Error in final launch sequence Failed to execute MI command: -target-select remote localhost:2331 Error message from debugger back end: localhost:2331: The system tried to join a drive to a directory on a joined drive. Failed to execute MI command: -target-select remote localhost:2331 Error message from debugger back end: localhost:2331: The system tried to join a drive to a directory on a joined drive. localhost:2331: The system tried to join a drive to a directory on a joined drive.
It seems that the
The system tried to join a drive to a directory on a joined drive.
can have many reasons. But in my case it was simply that somehow this check box was *not* enabled in the GDB launch configuration:
Well, after the fact it is clear why things failed. But not clear why it only shows this cryptic error message. Anyway, I hopefully remember next time. And if someone searches the internet for that error message, he might find this post and this information would be helpful.
Happy Debugging 🙂
I’ve never seen this message on OS X, it seems specific to Windows. It would be interesting to know the real cause of this message, since simply disabling the GDB server shouldn’t be a problem.
When you have an absolutely fresh Eclipse, could you retry to disable it, to see if the problem shows again?
LikeLike
Hi Liviu,
yes, the exact same message shows up with stock Eclipse (MARS.2) and your latest version of the J-Link debug plugin on Windows.
Erich
LikeLike
in this case please enter a ticket on GitHub, to keep it on the todo list.
LikeLike
Done: https://github.com/gnuarmeclipse/plug-ins/issues/113
LikeLike
I tried to post some info here but while the form accepted it the content never appeared. Maybe because it included URLs or something. Anyway I’ve posted the info here in case it helps at all:
https://github.com/gnuarmeclipse/plug-ins/issues/113
LikeLike
Your first comment has to be approved to prevent spam, that’s why it did not show up right away. Thanks for adding the information to the issue ticket!
LikeLike
Hi Erich – thanks for approving my earlier comment but the odd thing is that it wasn’t my first comment on your blog/site. And for some reason only some posts provide me with a Reply button – hence I cannot reply to your comment about approving my comment…! 😐
LikeLike
I don’t know the details how WordPress is handling this, but I think it remembers the email address your provide. Maybe there is an expiration date or something. But if things are not identified as spam by the system, I will get a notification for approval. But if you are somehow identified as spam, then things get more difficult 😦
LikeLike
I have also seen this message and it doesn’t make sense. But I noticed this:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
ERROR_JOIN_TO_JOIN
138 (0x8A)
The system tried to join a drive to a directory on a joined drive.
This error seems to crop up when the debug component sitting between GDB and the target (e.g. OpenOCD, J-Link GDB Server etc.) is misconfigured or – as above – simply not told to run.
Judging by this:
http://stackoverflow.com/questions/29747304/how-to-troubleshoot-an-error-138-error-join-to-join
the error may actually be coming from GDB and not any Eclipse component?
The error certainly doesn’t make obvious sense in this context but perhaps some of this info will help to track down why it happens whatever about addressing it – especially if it’s ultimately a GDB issue?
Hope this helps.
LikeLike
I searched on the same message, but it turned out my problem and resolution were quite different. I’m using an STMicro board with the built-in STlink, and the problem appears to be that the stlink had enumerated as a USB mass memory storage device (for mbed compatibility) and the debugger couldn’t connect while the mounted drive window was open.
LikeLike
Hi Adrian,
that’s an interesting finding as well, and actually that would make sense with that error message too. I guess there could be indeed many different reasons for the error message :-(.
LikeLike
Hi Adrian
I am a newbie to embedded… I am using STM32CibeIDE and nucleo-G474Re board and recently came across this error.
———–
Failed to execute MI command:
target remote localhost:61234
Error message from debugger back end:
localhost:61234: Connection timed out.
——————-
How do I fix it.? I tried everything that I could but I am stuck in the error above.
Appreciate your guidance / advice.
Thanks in advance.
LikeLike
is your GDB server running on that port 61234?
LikeLike