View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0021061||Lazarus||Debugger||public||2012-01-10 18:59||2013-09-14 00:08|
|Reporter||Peter Tomcsányi||Assigned To||Marc Weustink|
|Platform||Windows||OS||OS Version||Wince 5.0|
|Product Version||0.9.30.2||Product Build|
|Target Version||Fixed in Version|
|Summary||0021061: The debugger cannot open my source files (wince 5.0)|
|Description||I have a device with Wince 5.0|
I was able to debug programs in Lazarus 0.9.28.2 without major problems.
I use the version of gdb from this link:
But with 0.9.30 and 0.9.30.2 Whenever the debugger stops on a breakpoint (or on a place of exception) abd should show a line in my code, I get an error saying
Unable to load "\debugtrial\unit1.pas"
The point is that my file is in "D:\debugtrial\unit1.pas". So it seems to me that the debugger for some reason does not follow the win32 file naming convention, but it "thinks" that it is running on wince and uses the naming convention of wince instead (with no drive letter d: at the beginning).
When I then click cancel, the Assembler window appears and it shows all zeroes, but after about two seconds it starts showing the correct content - my source code and the assembly language form of the resulting code.
|Steps To Reproduce||1. Create any "hello world" program for Windows CE - new application with one button and its onclick event is ShowMessage('hello'); |
Do not forget to check "generate debugging info for GDB" in Project/Project Oprions/Compiler Options/Linking"
2. Connect the device (or emulator) with wince 5.0 (or maybe lower, with higher it does not work for other reason)
3. Set a breakpoint on the first line of Button1Click (seems important to do it prior to starting the program)
4. Start the program
5. click the button on the screen of wince
6. You should see the described error
|Additional Information||When debugging into Lazarus library source files then the sources are loaded correctly. Only my sources cannot be loaded.|
It does not help to rename Unit1.pas to unit1.pas (lowercase).
As I wrote above, after cancelling the error message I can debug in the Assembler window, but it is a bit annoying and it should work in the Source Editor window.
|Tags||No tags attached.|
|Fixed in Revision|
|duplicate of||0017569||resolved||Marc Weustink||[arm-wince-gdb] IDE doesn't find source files while debugging|
|duplicate of||0017868||resolved||Marc Weustink||When using the Cross-WinCE GDB with a 2.4.2 the IDE can't open any source file|
|has duplicate||0024126||resolved||Martin Friebe||Cannot step-by-step debug with WinCE because it looks for the source in the wrong place|
This problem was already reported as 0017569 and 0017868 when FPC 2.4.2 was published.
Sorry for the duplicity.
It seems that I did no try hard enough to find a similar point...
Those are too old points, so it seems that there is no chance for a fix...?
I am sorry that my C skills are not good enough for trying to fix this.
||If it is always the drive letter, have you tried adding them to the "additional search path" in the debugger options (Tools > Options) ?|
Yes, I tried it (as one of the first things besides renaming Unit1 to unit1).
It did not help.
For now it seems to me the easiest thing to introduce a kind of workaround into the ide as it is suggested in the issue 0017868 by Sven Barth:
"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)"
But...my expertise is not enough for that (yet).
As for the issue itself (the path being dropped), that is either FPC or GDB. I don't know. You can check if someone on the fpc mail list knows....
As for the IDE doing a workaround. That is what "additional search path" is for.
But it is currently broken.
Once fixed (will update if I have more info) it should be D:\ (the "\" is important)
||Try rev 34716 (0.9.31) please.|
I am sorry but I never tried to build lazarus from svn.
I tried it now, but I did not succeed yet.
So I will be able to check only after the revision 34716 or newer appears in the daily snapshots as a compiled win32 installer.
Or maybe when I learn how to compile from svn.
I tried with the latest Lazarus snapshot, version 34916.
And I can confirm that the workaround using "additional search path" works well for me.
So the original problem is not solved, but there is a good workaround that can be used if you need to debug with WinCE.
Thanks for it.
(So I suggest to change the Severity from "major" to "minor").
|2012-01-10 18:59||Peter Tomcsányi||New Issue|
|2012-01-10 18:59||Peter Tomcsányi||Status||new => assigned|
|2012-01-10 18:59||Peter Tomcsányi||Assigned To||=> Marc Weustink|
|2012-01-10 18:59||Peter Tomcsányi||Widgetset||=> WinCE|
|2012-01-11 10:25||Sven Barth||Note Added: 0055667|
|2012-01-11 19:18||Peter Tomcsányi||Note Added: 0055676|
|2012-01-12 06:37||Martin Friebe||Relationship added||duplicate of 0017569|
|2012-01-12 06:37||Martin Friebe||Relationship added||duplicate of 0017868|
|2012-01-12 06:44||Martin Friebe||Note Added: 0055689|
|2012-01-12 12:15||Peter Tomcsányi||Note Added: 0055693|
|2012-01-12 17:59||Martin Friebe||Note Added: 0055704|
|2012-01-12 18:38||Martin Friebe||Note Added: 0055705|
|2012-01-14 02:43||Peter Tomcsányi||Note Added: 0055737|
|2012-01-25 20:25||Peter Tomcsányi||Note Added: 0056044|
|2013-03-24 14:56||Martin Friebe||Relationship added||has duplicate 0024126|
|2013-09-14 00:08||Martin Friebe||LazTarget||=> -|
|2013-09-14 00:08||Martin Friebe||Severity||major => minor|