Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » BAT shell redirect to eclipse CDT Console(GDB Hardware Debugging under eclipse CDT)
BAT shell redirect to eclipse CDT Console [message #1860730] Wed, 30 August 2023 10:44 Go to next message
Ettienne Gilbert is currently offline Ettienne GilbertFriend
Messages: 2
Registered: August 2023
Junior Member
Hi,

We use a in-house chip simulator to debug some embedded projects (mix of C + ASM) using eclipse CDT and GDB. (The chip simulator implements a GdbServer stub which is good enough for our purposes).

Originally we used a 'Zylin embedded debug' configuration (under eclipse CDT [Juno 2013-02], Windows 10), which worked fine. Under GDB 'Initialization' commands we launched the simulator from within a shell like this:
shell x:/some/path/to/launch.bat

launch.bat took some actions, which included prompting the user for some choices, and then launches the simulator. The reason for this is that the simulator had to complete some actions first before it could start to listen for the GDB connection.

So the shell launched from eclipse CDT only returned after these actions were completed by launch.bat. Only then did GDB (under eclipse CDT) connect with:

target remote:1234

Another thing to note was that the bat file was launched in an external Windows console (eg. cmd.exe), which stayed open for the duration of the execution of the simulator (and is never redirected to the eclipse Console).

Recently we upgraded to eclipse CDT 2022-06. This does not have the 'Zylin embedded debug' option anymore, so I used the 'GDB Hardware Debugging' option.

I tried to duplicate the same solution as before, but now eclipse, directly after the launch.bat prompted the user (in an external cmd.exe), suddenly is redirecting the shell output to the eclipse Console. But this somehow interrupts the bat file (the simulator never starts) and the GDB remote communication is never established.

If I comment the shell x:/some/path/to/launch.bat line and execute launch.bat manually, and then start the debug configuration in eclipse CDT, everything works fine i.e. like what I want.

So it seems that 'GDB Hardware Debugging' itself does not cause this, but that the redirection of the shell output causes this.

So my question is: how can I force the 'shell [command]' to launch in an external console, and not be redirected back to the eclipse console?

Best regards

Re: BAT shell redirect to eclipse CDT Console [message #1860733 is a reply to message #1860730] Wed, 30 August 2023 13:01 Go to previous message
Ettienne Gilbert is currently offline Ettienne GilbertFriend
Messages: 2
Registered: August 2023
Junior Member
I somehow missed the sticky note that C / C++ IDE (CDT) discussions are now on GitHub [message #1853343] https://www.eclipse.org/forums/index.php/t/1111086/.

I'll repost there.
Previous Topic:Can't build Hello World
Next Topic:line del
Goto Forum:
  


Current Time: Tue Jan 14 04:24:34 GMT 2025

Powered by FUDForum. Page generated in 0.03035 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top