View Issue Details

IDProjectCategoryView StatusLast Update
0022893LazarusIDEpublic2017-10-12 17:23
ReporterBigChimpAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionnot fixable 
Platformx64OSWindowsOS VersionVista
Product Version1.1 (SVN)Product Buildr38659 
Target VersionFixed in Version 
Summary0022893: Debugger: Run Parameters --all is not passed to program
DescriptionThe attached fpcunit test program needs to be run with --all or -a to run all tests.

I set a breakpoint here:
procedure Ttestexport1.Setup;

begin
  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 ReproduceSee above; run attached program.

Not tested with FPC trunk.
Additional InformationOccurs on
Laz 1.0/FPC 2.6.0 x86, Windows
Laz trunk/FPC 2.6.1 x86, Windows
Laz trunk/FPC trunk x86, Windows
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

2012-09-15 19:11

 

testmultilinequotes.zip (25,513 bytes)

Ludo Brands

2012-09-15 19:23

developer   ~0062403

The following program run from the IDE and --all as command line parameters does not print anything on windows:

var i:integer;
begin
  for i:=1 to Paramcount do
    writeln(paramstr(1));
  readln;
end.

Ludo Brands

2012-09-15 20:04

developer   ~0062404

Seems to be a windows gdb problem. Debug output shows:

<-exec-arguments --all>
^done

gdb 7.3

Reinier Olislagers

2012-09-15 20:10

developer   ~0062405

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

Martin Friebe

2012-09-15 20:52

manager   ~0062406

Last edited: 2012-09-15 20:55

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
  writeln(GetCommandLine);
  for i:=1 to Paramcount do
    writeln(paramstr(1));

prints
B:\tmp\dbg_app_args\testmultiline.exe -a
-a

Please use the above to ensure if the argument is or is not passed.

Please supply a log as described
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session


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/

Anton

2012-09-15 20:54

reporter   ~0062407

try "--all"

Ludo Brands

2012-09-16 10:49

developer   ~0062414

Didn't notice that the report specified x64. My test was on win xp 32. Tried also 7.2 which fails also.

> prints
> B:\tmp\dbg_app_args\testmultiline.exe -a
> -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.

Reinier Olislagers

2012-09-16 11:44

developer   ~0062418

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

Thanks,
Reinier

2012-09-16 11:45

 

testprogram_and_debuggerlog.zip (5,669 bytes)

Ludo Brands

2012-09-16 12:11

developer   ~0062419

> GetCommandLine function does not exist...
Martin forgot to say you need to add Windows to the uses clause.

Martin Friebe

2012-09-16 12:45

manager   ~0062421

Last edited: 2012-09-16 12:46

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.

Reinier Olislagers

2012-09-16 13:05

developer   ~0062422

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...

Reinier Olislagers

2014-09-15 12:02

developer   ~0077252

Perhaps close this as unable to fix?

Juha Manninen

2017-10-12 17:23

developer   ~0103381

As the reporter said.

Issue History

Date Modified Username Field Change
2012-09-15 19:11 Reinier Olislagers New Issue
2012-09-15 19:11 Reinier Olislagers File Added: testmultilinequotes.zip
2012-09-15 19:11 Reinier Olislagers Widgetset => Win32/Win64
2012-09-15 19:23 Ludo Brands Note Added: 0062403
2012-09-15 20:04 Ludo Brands Note Added: 0062404
2012-09-15 20:10 Reinier Olislagers Note Added: 0062405
2012-09-15 20:11 Reinier Olislagers 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
2012-09-16 11:44 Reinier Olislagers Note Added: 0062418
2012-09-16 11:45 Reinier Olislagers File Added: testprogram_and_debuggerlog.zip
2012-09-16 11:57 Reinier Olislagers 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
2012-09-16 13:05 Reinier Olislagers Note Added: 0062422
2014-09-15 12:02 Reinier Olislagers 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