View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0022893||Lazarus||IDE||public||2012-09-15 19:11||2017-10-12 17:23|
|Reporter||Assigned To||Martin Friebe|
|Product Version||1.1 (SVN)|
|Summary||0022893: Debugger: Run Parameters --all is not passed to program|
|Description||The attached fpcunit test program needs to be run with --all or -a to run all tests.|
I set a breakpoint here:
TestDataset := TSDFDataset.Create(nil);
... which should always hit.
Specifying --all in Run/Run Parameters/Command line Parameters however does not have any effect and the breakpoint is not hit. Debugging does work because breakpoints elsewhere work.
Specifying -a or "--all" does work.
|Steps To Reproduce||See above; run attached program.|
Not tested with FPC trunk.
|Additional Information||Occurs on |
Laz 1.0/FPC 2.6.0 x86, Windows
Laz trunk/FPC 2.6.1 x86, Windows
Laz trunk/FPC trunk x86, Windows
|Tags||No tags attached.|
|Fixed in Revision|
testmultilinequotes.zip (25,513 bytes)
The following program run from the IDE and --all as command line parameters does not print anything on windows:
for i:=1 to Paramcount do
Seems to be a windows gdb problem. Debug output shows:
Last edited: 2012-09-15 20:11
Versions for the original bug report:
Laz 1.0/FPC 2.6.0 x86, Windows: GDB 7.4
Laz trunk/FPC 2.6.1 x86, Windows: GDB 7.4
Laz trunk/FPC trunk x86, Windows: GDB 7.4
It works here. Win Vista 32 bit gdb 7.4 fpc 2.6.0
It stops at procedure Ttestexport1.Setup;
And in LPR adding the following code
for i:=1 to Paramcount do
Please use the above to ensure if the argument is or is not passed.
Please supply a log as described
You may also try to quote the entire argument(s). "-a" (if multiple args, only one quote for all "-a -all")
It may be a gdb 64 bit issue. (though 7.5 may cause other problems. It currently fails some watches data)
Try updating http://www.drangon.org/mingw/
Didn't notice that the report specified x64. My test was on win xp 32. Tried also 7.2 which fails also.
> B:\tmp\dbg_app_args\testmultiline.exe -a
-a is mentioned in the report as working
> try "--all"
"--all" is mentioned in the report as working
Only --all fails. Looks as if --all is an undocumented parameter for -exec-arguments on gdb windows. This is confirmed by the following test:
1)start gdb from the command line with --interpreter=mi. Enter: -exec-arguments --all. Enter: show args. Returns: ~"Argument list to give program being debugged when it is started is \"\".\n"
2)start gdb. Enter: set args --all. Enter: show args. Result: Argument list to give program being debugged when it is started is "--all".
Do the same while replacing --all with for example --alll and the results are the same in both modes.
Last edited: 2012-09-16 11:57
@Martin,Anton, thanks. Please read the bug report. As mentioned in the report, I tried -a and "--all" with success. The point is that --all doesn't work, it's not documented that it shouldn't etc. Please test with --all instead of -a or "--all"
The bug report was made on x64 Windows but with x86 FPC/Lazarus, as indicated e.g. in Additional Information. I've updated my profile to indicate I'm using the x86 compiler; hope that is clearer.
GetCommandLine function does not exist... (perhaps it does in Delphi)
Attached is the test program and the debug output, run with --all, Lazarus x86, SVN 38659, FPC 2.7.1 r22397
testprogram_and_debuggerlog.zip (5,669 bytes)
> GetCommandLine function does not exist...
Martin forgot to say you need to add Windows to the uses clause.
Ok, indeed --all does not work.
Tested outside the IDE: DGB does remove it for some reason.
There in no documentation for GDB (not that I found). So this issue is currently not fixable.
Thanks, Martin. Mentioned it in http://wiki.lazarus.freepascal.org/fpcunit; perhaps a note in the debugger wiki articles would help too?
I'm sure you have thought about an upstream bug report... but I know you're a busy man.
Happy with whatever status you want to assign to this bug...
|Perhaps close this as unable to fix?|
||As the reporter said.|
||File Added: testmultilinequotes.zip|
|2012-09-15 19:23||Ludo Brands||Note Added: 0062403|
|2012-09-15 20:04||Ludo Brands||Note Added: 0062404|
||Note Added: 0062405|
||Note Edited: 0062405|
|2012-09-15 20:52||Martin Friebe||Note Added: 0062406|
|2012-09-15 20:52||Martin Friebe||Status||new => assigned|
|2012-09-15 20:52||Martin Friebe||Assigned To||=> Martin Friebe|
|2012-09-15 20:54||Martin Friebe||Note Edited: 0062406|
|2012-09-15 20:54||Anton||Note Added: 0062407|
|2012-09-15 20:55||Martin Friebe||Note Edited: 0062406|
|2012-09-16 10:49||Ludo Brands||Note Added: 0062414|
||Note Added: 0062418|
||File Added: testprogram_and_debuggerlog.zip|
||Note Edited: 0062418|
|2012-09-16 12:11||Ludo Brands||Note Added: 0062419|
|2012-09-16 12:45||Martin Friebe||Note Added: 0062421|
|2012-09-16 12:46||Martin Friebe||Note Edited: 0062421|
||Note Added: 0062422|
||Note Added: 0077252|
|2017-10-12 17:23||Juha Manninen||LazTarget||=> -|
|2017-10-12 17:23||Juha Manninen||Note Added: 0103381|
|2017-10-12 17:23||Juha Manninen||Status||assigned => resolved|
|2017-10-12 17:23||Juha Manninen||Resolution||open => not fixable|