cancel
Showing results for 
Search instead for 
Did you mean: 

''Failed to launch child process:<gdb.exe>

MPrez.536
Associate

The error message shown below:

''Failed to launch child process:<gdb.exe>

>error=2 - ''The system cannot find the file specified''.''

Can anyone know how to solve it?

I tryed to install STVD again, without success.

I didn´t have this problem until now. i didn´t found the file gdb.exe in my computer, before and after re-install. What is happening?

7 REPLIES 7
KLee.909
Associate

I ran into the exact same issue a few days ago. I have another PC that didn't have this issue (so far). Both are up to date with latest Win10 updates.

It seems like whatever inside STVD (release 42) that launches GDB fails. I have reinstalled multiple times, updated stlink drivers/firmware and even copied the entire program director from the working PC and it still doesn't fix the issue.

Here is what I have seen:

inside C:\Program Files (x86)\STMicroelectronics\st_toolset\stvd directory, there are no actual gdb.exe file present.

The launcher code inside STVD is supposed to point to the gdb7.exe and supply it with the correct hardware debugger info (e.g. STLinkv2 vs rlink etc) and debug parameters to the files. That for some reasons doesn't work and instead STVD tries to look for gdb.exe which doesn't present.

Here are what I have tried, but failed:

I have renamed gdb7.exe to gdb.exe. Now STVD launches gdb.exe, but doesn't know it needs to load the specific .ini for the debugger in:

C:\Program Files (x86)\STMicroelectronics\st_toolset\stvd\swim\gdbswim_stlink.ini

gdb complains about not being knowing the reset command in the script for "Emulator reset (usb://usb)..."

I have appended the gdbswim_stlink.ini to gdb.ini and now it knows enough to start the debugging session.

I tried to single line step my code, here is what I have seen:

 -> Step into source...

 ** Application stopped: Single stepping until exit from function __vectab, 

which has no line number information.

0x80b1 in __stext ()

So it would seem that gdb needs additional parameter to know about the where the debug info is located. (probably in .sm8)

It would seem that the debugger would work after it stepped through the startup code before main(). It is not a real fix, but better than nothing.

Summary:

I think the problem is whatever launcher code inside stvd no longer points to gdb7.exe and does not pass the necessary command line parameters.

Additional issue I have seen:

There seems to be some write permission problem with stvp in the program directory that leads to a warning on opening up a project. I used "Take Ownership" util to change the permission. Someone might want to fix that in the installer or use a different directory for the application.

I think I found the problem. It is caused by STVD have some compatibility issues with some version(s) of visual C++ library.

0690X00000ArnLEQAZ.png

Circle in red is when the problem starts to happen. Circle in green is when the problem resolved.

I noticed that STVD installer skipped MFC when I try to uninstall and reinstall. ST should make sure that a proper version of VC++ library is installed.

Note: similar issues back in 2016, 2018. ST don't seem to have anyone working on it.

Microsoft had a "Dependency Walker" application for free download, that could be used check the system for missing components/DLLs. (Albeit it is not originally from M$, though).

I think the more recent "Process Explorer" would serve the same purpose.

Had once been developing Host (WinNT) based control applications, and used this tools almost on a daily basis.

STE_Michael
Associate II

I have the same problem.

Is there a solution?

Deinstall/reinstall does not fix the problem.

Kámen
Associate

Boys i got the answer:

if you have problem ''Failed to launch child process:<gdb.exe>...."

First of all go to C:\Program Files (x86)\STMicroelectronics\st_toolset\stvd. And find gdb7.exe and gdb.ini, copy these two files on desktop(just in case you make a mistake).

in stvd folder: gdb7.exe rename it to gdb.exe.

in stvd folder: gdb.ini open the file (open it in a text file but be careful not to change the extension, it must be .ini) , go completely to the bottom of the file and insert this text:

#

# emulator reset port and MCU

#

define emulator-reset-port-mcu

target gdi -dll swim\stm_swim.dll -stlink3 -port $arg0 -mcuname $arg1

mcuname -set $arg1

end

Save file and you are ready to go for that sweet debug. (If you have problem with saving file, try move gdb.ini on desktop and save it there, then just drag it back to stvd folder)

SPozz.1
Associate III

From "ST Visual Develop (STVD) release 4.3.12" document (RN0013), page 5, paragraph 1.1:

Note:1 Administrator privileges are required to install STVD and to connect emulators to the USB

port for the first time. Power user or administrator privileges are required to run STVD.

Note:2 When using Windows 7, 8 and 10 operating systems, STVD requires administrator

privileges to run.

In other words,

Right-click on the STVD or STVP executable/shortcut and select Properties. Click on the Compatibility tab near the top and make sure that Run this program as Administrator checkbox is checked.

This worked nicely for me.

uhaid.1
Associate II

I had the same issue. uninstall and reinstall method did not work.

Update your windows, it works.