Fix for GDB and “The system tried to join a drive to a directory on a joined drive”

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 system tried to join a drive to a directory on a joined drive

The system tried to join a drive to a directory on a joined drive

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:

Starting GDB Server Locally

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 🙂

Advertisements

11 thoughts on “Fix for GDB and “The system tried to join a drive to a directory on a joined drive”

  1. 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?

    Like

  2. 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.

    Like

  3. 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.

    Like

    • 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 :-(.

      Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s