eclipsedebugginggdbeclipse-cdtstm8

Use old GDB 4.17 with actual Eclipse CDT (9.0) or at least with Eclipse Juno


This is the situation:

I would like to debug ST's STM8 Microcontroller with Eclipse. For compiling, im using IAR Kickstart together with their own Eclipse Plugin. This works quite fine.

Unfortunately, they dont offer any way to integrate their C-Spy Debugger into Eclipse.

ST has an own environment, so called ST Visual Develop or in short term STVD. Included in the package is an old but working GDB. It is GDB 4.17. The source is also available and im able to compile them.

Now the problem:

GDB 4.17 does not support any modern Interpreter like mi, mi1 oder mi0. It only supports the console commands.

I tried to use an actual Eclipse (neon) with CDT (9.0) and pointed in the config to my GDB.exe i also monitored the launch of the GDB.exe Eclipse or CDT always tries to open the GDB with the -i or -interpreter parameter. But my GDB does not know this command. So it will answer with "unrecognized command" and CDT terminates the process.

In an older Version of Eclipse (Juno) with CDT i was able to select "verbose console mode" but this also starts the GDB with the -i command.

Now the question: Does anybody has an idea, how to deal with this problem? The easiest way would be to tell CDT that it should not use any of the "mi" modes.

The hard way is to write a new GDB based on Version 5.0 or so. But this is not really managable for me....

Thanks for any comments.


Solution

  • Sorry to tell you this, but there is no way to get CDT to launch GDB without using MI. MI is the only way that CDT and GDB communicate.

    The option for "verbose console mode" is not part of CDT's DSF-GDB implementation, instead the verbose info is its own console, controllable from Preferences -> C/C++ -> Debug -> GDB -> Enable GDB traces with[...] (see https://wiki.eclipse.org/CDT/User/FAQ#I.27ve_been_asked_for_.27gdb_traces.27.2C_where_can_I_find_them.3F)

    Officially CDT only supports GDB 7 and above, but there is still unsupported implementation for 6.8 or so and above. GDB 4.x and 5.x are simply not supported.