|
|
|
|
|
|
|
|
Re: Debugging with GDB - incorrect path to executable [message #1858822 is a reply to message #1850349] |
Mon, 24 April 2023 19:06 |
iklef mallem Messages: 1 Registered: April 2023 |
Junior Member |
|
|
Hi everyone,
I found a quick and dirty way to fix the issue in my environment eclipse (STM32CubeIDE Version: 1.12.0) and gdb v13.1 on cygwin
The way I fixed it implies the gdb binary recompilation .
I downloaded the latest version (13.1, in test) and modified a specific file before recompiling the binary.
what I changed is the file named windows-nat.c located in the gdb folder (where i uncompress the downloaded tar) : gdb13.1/gdb/windows-nat.c
what I modified in that file is a couple of line : find the following lines :
args = (wchar_t *) alloca ((wcslen (toexec) + wcslen (cygallargs) + 2)
* sizeof (wchar_t));
wcscpy (args, toexec);
wcscat (args, L" ");
wcscat (args, cygallargs);
and make them look like this :
args = (wchar_t *) alloca ((wcslen (toexec) + wcslen (cygallargs) + 2)
* sizeof (wchar_t));
wcscpy (args, wcsstr (toexec, L"Debug"));
// wcscat (args, L" ");
// wcscat (args, cygallargs);
then recompile the binary.
then in eclipse, in the debug configuration configure the debugger to run the newly compiled gdb binary.
Remember, this is a quick and dirty workaround, not a permanent fix.
hope this helps.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04148 seconds