eclipse-embed-cdt / eclipse-plugins

The Eclipse Embedded CDT plug-ins for Arm & RISC-V C/C++ developers (formerly known as the GNU MCU Eclipse plug-ins). Includes the archive of previous plug-ins versions, as Releases.
http://eclipse-embed-cdt.github.io/
Eclipse Public License 2.0
557 stars 130 forks source link

Check and fix the J-Link GDB Server termination logic #248

Open ilg-ul opened 7 years ago

ilg-ul commented 7 years ago

The plug-in termination logic is complicated, since it needs to terminate all processes regardless which one was killed or terminated.

There may be a bug, that kills the GDB server too early, preventing its termination logic to run properly (for example to leave the target running).

TommyMurphyTM1234 commented 6 years ago

Hi Liviu - any chance this is a bug in Eclipse's starter.exe e.g. ...\eclipse\plugins\org.eclipse.cdt.core.win32.x86_64_5.4.1.201712020452\os\win32\x86_64\starter.exe?

We had to modify this to terminate openocd more gracefully than it would normally - see the attached modified version paying attention to the bits tagged "Microsemi".

I need to submit this (or a more general fix) back to the project for consideration as I consider starter.exe broken as it stands.

If this is not relevant to the original issue then apologies for the distraction!

eclipse_cdt_starter.zip

ilg-ul commented 6 years ago

I don't know, I thought the original problem is specific to my debug plug-ins.

There are many internal threads doing various small tasks related to the debugger, and the logic that keeps everything together is very complicated.

TommyMurphyTM1234 commented 6 years ago

OK - on reflection, starter.exe is specific to Windows (neither it nor any equivalent exists in CDT for Linux), so if you problem is not specific to Windows then starter.exe is not the problem here even if the way that it tries to terminate launched apps (e.g. external tools etc.) is flawed.

ilg-ul commented 6 years ago

Yes, it makes sense.