Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » BAT shell redirect to eclipse CDT Console(GDB Hardware Debugging under eclipse CDT)(C++)
BAT shell redirect to eclipse CDT Console(GDB Hardware Debugging under eclipse CDT) [message #1860749] Thu, 31 August 2023 12:48 Go to next message
Robert Smith is currently offline Robert SmithFriend
Messages: 1
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(GDB Hardware Debugging under eclipse CDT) [message #1860753 is a reply to message #1860749] Thu, 31 August 2023 14:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
I see that you already asked here, which is what I was going to recommend:

https://github.com/eclipse-cdt/cdt/discussions/531


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: BAT shell redirect to eclipse CDT Console(GDB Hardware Debugging under eclipse CDT) [message #1861141 is a reply to message #1860749] Sat, 23 September 2023 01:07 Go to previous messageGo to next message
Alem Efrem is currently offline Alem EfremFriend
Messages: 3
Registered: September 2023
Junior Member
No Message Body

[Updated on: Sat, 23 September 2023 01:08]

Report message to a moderator

Re: BAT shell redirect to eclipse CDT Console(GDB Hardware Debugging under eclipse CDT) [message #1861142 is a reply to message #1861141] Sat, 23 September 2023 01:09 Go to previous message
Alem Efrem is currently offline Alem EfremFriend
Messages: 3
Registered: September 2023
Junior Member
Thanks for the link
Previous Topic:Howto Close a Window (using a tiling windows manager)
Next Topic:Windows Desktop Application
Goto Forum:
  


Current Time: Mon Dec 30 17:31:08 GMT 2024

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

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

Back to the top