When using the Cross-WinCE GDB with a 2.4.2 the IDE can't open any source file
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
I'm currently trying to debug a problem on WinCE. The debugger is set to the GDB from the archive that is available on the FPC servers: ftp://ftp.freepascal.org/pub/fpc/contrib/cross/gdb-6.4-win32-arm-wince.zip
When I run my application in the IDE (snapshot 27815 with 2.4.2rc1), GDB copies the compiled binary to the device and starts it. It then tries to load the main source file (it's a command line application and I've set a breakpoint after the "begin" there), but fails.
The message box I get is the following:
(German)
Datei "\Users\Sven\Projects\tests\sdftest\sdftest.lpr" kann nicht geladen werden.
[Abbrechen]
(English - free translation)
File "\Users\Sven\Projects\tests\sdftest\sdftest.lpr" can not be loaded.
[Cancel]
I hope you see the missing drive letter, which is missing in the GDB output (fullname="/Users/Sven/Projects/tests/sdftest/sdftest.lpr") as well. A quick look into the stabs debug section of the executable with a Hexeditor shows that the drive letter IS there (path and filename are seperated by a #0). So the WinCE debugger seems to return WinCE paths only (there are no drive letters on WinCE systems).
Additional information:
Compiling the application with 2.2.4 (not 2.4.2, but the same IDE) results in a successful debug session (debug output contains: fullname="C:\Users\Sven\Projects\tests\sdftest/sdftest.lpr). A look into the debug section in the executable shows that there is no path name included (only sdftest.lpr is written there). This seems to have changed from 2.2.4 to 2.4.2 (which I consider good, btw ^^).
It could be that GDB returns an absolute WinCE path if a path is found in the Stabs section while it returns a Win32 path (the one set with "environment-cd") if it's not. Maybe the IDE-debugger-interface (on Win32 only) should try to open a path without a drive letter on all available drives (perhaps excluding A: and B: if they are found).
Mantis conversion info:
- Mantis ID: 17868
- Version: 0.9.29 (SVN)
- Monitored by: » DRIGUS (DRIGUS GmbH), » kyan (Constantine Yannakopoulos)