[fpc-devel] difference between stabs and dwarf for "var param"
Martin
lazarus at mfriebe.de
Thu Dec 9 17:40:41 CET 2010
I found that for:
procedure Foo(var AVal1: integer);
The value for AVal is correctly shown with stabs, but not with dwarf.
(See below).
Is this a bug, and is it worth a bug report?
Results below for fpc 2.4.2 (but same for trunk)
With GDB 7.2-1 on W32 (but similar with other recent gdb versions)
I understand that a var param is passed by ref (internally), but if
Stabs can tell the debugger, to hide this, then shouldn't dwarf be able
to do that too?
Or is dwarf showing the internal pointer intentionally?
If it is intention: Is there a way to distinguis between a user defined
pointer (Aval1: PInteger) and the internal pointer (var AVal1: Integer) ?
2.4.2 / 7.2 / Stabs
Executing (Recurse-Count=1) queued= 0:
"TGDBMIDebuggerCommandEvaluate: AVal1" State=Pause PauseWaitState=0
>> TCmdLineDebugger.SendCmdLn "-data-evaluate-expression AVal1"
<< TCmdLineDebugger.ReadLn "^done,value="10""
<< TCmdLineDebugger.ReadLn "(gdb) "
>> TCmdLineDebugger.SendCmdLn "ptype AVal1"
<< TCmdLineDebugger.ReadLn "&"ptype AVal1\n""
[Debugger] Log output: &"ptype AVal1\n"
<< TCmdLineDebugger.ReadLn "~"type = LONGINT\n""
<< TCmdLineDebugger.ReadLn "^done"
<< TCmdLineDebugger.ReadLn "(gdb) "
Exec done
2.4.2 / 7.2 / Dwarf
Executing (Recurse-Count=1) queued= 0:
"TGDBMIDebuggerCommandEvaluate: AVal1" State=Pause PauseWaitState=0
>> TCmdLineDebugger.SendCmdLn "-data-evaluate-expression AVal1"
<< TCmdLineDebugger.ReadLn "^done,value="@0x14cff34""
<< TCmdLineDebugger.ReadLn "(gdb) "
>> TCmdLineDebugger.SendCmdLn "ptype AVal1"
<< TCmdLineDebugger.ReadLn "&"ptype AVal1\n""
[Debugger] Log output: &"ptype AVal1\n"
<< TCmdLineDebugger.ReadLn "~"type = &LONGINT\n""
<< TCmdLineDebugger.ReadLn "^done"
<< TCmdLineDebugger.ReadLn "(gdb) "
Exec done
More information about the fpc-devel
mailing list