mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 05:00:46 +01:00
DBG: moved example gdb results out of the unit
git-svn-id: trunk@33414 -
This commit is contained in:
parent
0259bd6959
commit
219935fe22
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -2914,6 +2914,9 @@ debugger/test/Gdbmi/testgdbtype.pas svneol=native#text/pascal
|
||||
debugger/test/Gdbmi/testwatches.pas svneol=native#text/pascal
|
||||
debugger/test/examples/testcntr.pp svneol=native#text/pascal
|
||||
debugger/test/examples/testwait.pp svneol=native#text/pascal
|
||||
debugger/test/gdb[!!-~]responses/ptype_resp_for_array.txt svneol=native#text/plain
|
||||
debugger/test/gdb[!!-~]responses/ptype_whatis_for_enum_set.txt.txt svneol=native#text/plain
|
||||
debugger/test/gdb[!!-~]responses/ptype_whatis_for_object.txt svneol=native#text/plain
|
||||
debugger/threaddlg.lfm svneol=native#text/plain
|
||||
debugger/threaddlg.pp svneol=native#text/pascal
|
||||
debugger/watchesdlg.lfm svneol=native#text/plain
|
||||
|
||||
@ -50,91 +50,9 @@ uses
|
||||
[ name = "..." ]
|
||||
[ type = "..." ]
|
||||
|
||||
Examples: (tested with fpc 2.4.2 and 2.5.1 (Jan 2011) / gdb 7.0, gdb 7.2
|
||||
(excluding the '~"type = ' and the '\n"')
|
||||
|
||||
* procedure x(ArgTFoo: TFoo; var VArgTFoo: TFoo); // TFoo = class end;
|
||||
* procedure x(ArgPFoo: PFoo; var VArgPFoo: PFoo); // PFoo = ^TFoo;
|
||||
|
||||
"PType" Results (for the "???" part):
|
||||
ptype Arg<YYY> ~"type = <???> = class : public TOBJECT \n" ## followed by lines of fields (exlude inherited)
|
||||
Normal | Param-by-ref
|
||||
Stabs Dwarf | Stabs Dwarf Dwarf(fpc 2.6 up)
|
||||
ArgTFoo ^TFOO ^TFOO | VArgTFoo ^TFOO &TFOO ^TFOO
|
||||
ArgTFoo^ TFOO TFOO | VArgTFoo^ ^TFOO ^TFOO TFOO
|
||||
@ArgTFoo ^TFOO ^TFOO | @VArgTFoo ^TFOO ^&TFOO ^TFOO
|
||||
|
||||
ArgPFoo ^TFOO ^TFOO | VArgPFoo ^TFOO &TFOO ^TFOO
|
||||
ArgPFoo^ ^TFOO ^TFOO | VArgPFoo^ ^TFOO ^TFOO ^TFOO
|
||||
@ArgPFoo ^TFOO ^TFOO | @VArgPFoo ^TFOO ^&TFOO ^TFOO
|
||||
|
||||
Stabs Dwarf
|
||||
TFoo TFOO ^TFOO
|
||||
PFoo ^TFOO ^TFOO
|
||||
|
||||
"WhatIs" Results: Normal | Param-by-ref
|
||||
- some "whatis" have a trailing "=class\n" (indicated by a "=" below
|
||||
Stabs Dwarf | Stabs Dwarf Dwarf(fpc 2.6 up)
|
||||
ArgTFoo TFOO TFOO | VArgTFoo TFOO &TFOO TFOO
|
||||
ArgTFoo^ TFOO TFOO= | VArgTFoo^ TFOO TFOO TFOO=
|
||||
@ArgTFoo PFOO ^TFOO | @VArgTFoo PFOO ^&TFOO ^TFOO ## whatis @ArgTFoo may be ^TFoo under Stabs if no named type PFoo exists
|
||||
|
||||
ArgPFoo PFOO PFOO | VArgPFoo PFOO &PFOO PFOO
|
||||
ArgPFoo^ TFOO TFOO | VArgPFoo^ TFOO PFOO TFOO
|
||||
@ArgPFoo PPFOO ^PFOO | @VArgPFoo PPFOO ^&PFOO ^PFOO ## whatis @ArgPFoo may be ^PFoo under Stabs if no named type PPFoo exists
|
||||
|
||||
Stabs Dwarf
|
||||
TFoo TFOO ^TFOO = class
|
||||
PFoo PFOO ^TFOO ## requires gdb 7 (mayb 6.7)
|
||||
|
||||
==> "ptype SomeVariable" does not differ between TFoo and PFoo
|
||||
==> dwarf ptype is the same for TFoo and PFoo (whatis can tell the diff)
|
||||
|
||||
|
||||
* procedure x(ArgEnum: TEnum); // TEnum = (One, Two, Three);
|
||||
* procedure x(ArgEnumSet: TEnumSet; var VArgEnumSet: TEnumSet); // TEnumSet = set of TEnum;
|
||||
* procedure x(ArgSet: TSet; var VArgSet: TSet); // TSet = Set of (Alpha, Beta, Gamma);
|
||||
* var VarEnumA: (e1,e2,e3); VarEnumSetA: set of TEnum; VarSetA: Set of (s1,s2,s3);
|
||||
|
||||
"WhatIs" Results (| marks a new line / gdb starts a new line with ~"):
|
||||
Stabs Dwarf Dwarf without -godwarfset
|
||||
ArgEnumSet TENUMSET TENUMSET TENUMSET
|
||||
VArgEnumSet TENUMSET &TENUMSET &TENUMSET
|
||||
ArgSet TSET TSET TSET
|
||||
VArgSet TSET &TSET &TSET
|
||||
VarEnumSetA set of TENUM set of |ONE..THREE <invalid unnamed pascal type code 8>
|
||||
VarSetA set of = (...) set of |S1..S3 <invalid unnamed pascal type code 8>
|
||||
|
||||
TEnumSet TENUMSET set of |ONE..THREE TENUMSET
|
||||
TSet TSET set of |ALPHA..GAMMA TSET
|
||||
|
||||
ArgEnum TENUM ## same for stabs (both)
|
||||
VarEnumA = (...) ## same for stabs (both)
|
||||
TEnum TENUN ## same for stabs (both)
|
||||
|
||||
"PType" Results:
|
||||
Stabs Dwarf Dwarf without -godwarfset
|
||||
|
||||
ArgEnumSet set of TENUM set of |ONE..THREE TENUMSET
|
||||
VArgEnumSet set of TENUM &set of |ONE..THREE &TENUMSET
|
||||
ArgSet set of = (ALPHA, BETA, GAMMA) set of |ALPHA..GAMMA TSET
|
||||
VArgSet set of = (ALPHA, BETA, GAMMA) &set of |ALPHA..GAMMA &TSET
|
||||
VarEnumSetA set of TENUM set of |ONE..THREE <invalid unnamed pascal type code 8>
|
||||
VarSetA set of = (S1, S2, S3) set of |S1..S3 <invalid unnamed pascal type code 8>
|
||||
|
||||
TEnumSet set of TENUM set of |ONE..THREE TENUMSET
|
||||
TSet set of = (ALPHA, BETA, GAMMA) set of |ALPHA..GAMMA TSET
|
||||
|
||||
ArgEnum TENUM = (ONE, TWO, THREE) ## same for stabs (both)
|
||||
VarEnumA = (E1, E2, E3) ## same for stabs (both)
|
||||
TEnum TENUM = (ONE, TWO, THREE) ## same for stabs (both)
|
||||
|
||||
## Alternative new lines: set of ONE|..THREE| set of S1|..S3|
|
||||
## All results can be prefixed by ^, for unamed pointertypes (^& for var param)
|
||||
|
||||
|
||||
|
||||
TODO: functions ? Stabs seem to always add pointer; dwarf does not?
|
||||
For example results, comparision between similar types, different GDB versions
|
||||
or stabs vs dwarf, see the folder "test/gdb responses/"
|
||||
|
||||
*)
|
||||
type
|
||||
|
||||
103
debugger/test/gdb responses/ptype_resp_for_array.txt
Normal file
103
debugger/test/gdb responses/ptype_resp_for_array.txt
Normal file
@ -0,0 +1,103 @@
|
||||
Sample / Abstract of results for "ptype SomeArray"
|
||||
|
||||
The "&" is only present with FPC 2.4 DWARF. (indicates param by ref)
|
||||
It must be deref-ed once, to yield "normal" results
|
||||
|
||||
&xxx
|
||||
=> Deref to "xxx"
|
||||
=> Deref to "^xxx" // maybe dyn array
|
||||
=> Deref to "array [3..5] of xxx" // static array to NONE pointer
|
||||
X> Deref to "^array [3..5] of xxx" // POINTER
|
||||
&^xxx
|
||||
=> Deref to "^^xxx" // maybe dyn array
|
||||
=> Deref to "array [3..5] of ^xxx" // static array to POINTER
|
||||
&^(array of xxx)
|
||||
=> Deref to "array [3..5] of ^(array of xxx)"
|
||||
&^(array [0..-1] of xxx)
|
||||
=> Deref to "^^(array [0..-1] of xxx)"
|
||||
|
||||
|
||||
|
||||
|
||||
^xxx
|
||||
all GDB, DWARF: DynArray or pointer
|
||||
=> "array [0..-1] of xxx" DYN-ARRAY (gdb 6.7) or STABS
|
||||
=> "array of xxx" DYN-ARRAY
|
||||
X> "array [3..5] of xxx" POINTER to array
|
||||
X> "^(array ... )" POINTER also "^array [] .."
|
||||
|
||||
^^xxx (Stabs + dwarf / any GDB)
|
||||
=> "array [0..-1] of ^xxx" DynArray to pointer (DWARF only)
|
||||
=> "array of ^xxx" DynArray to pointer (DWARF only
|
||||
X> "^(array [0..-1] of ^xxx)" pointer
|
||||
X> "array [3..5] of ^xxx" POINTER to array
|
||||
|
||||
|
||||
^array [3..5] of ^xxx (Stabs + dwarf / any GDB)
|
||||
^array [3..5] of xxx (Stabs + dwarf / any GDB)
|
||||
=> "array [0..-1] of array [3..5] of ^xxx // Dyn Array of stat array (dwarf only)
|
||||
X> "^array ..." POINTER
|
||||
X> "^(array ..." POINTER
|
||||
|
||||
|
||||
^(array of xxx) DWARF only (GDB 7.x)
|
||||
^(array of ^xxx) DWARF only (GDB 7.x)
|
||||
^(array [0..-1] of xxx) STABS / DWARF only GDB 6.x
|
||||
^(array [0..-1] of ^xxx) STABS / DWARF only GDB 6.x
|
||||
DYN ARRAY
|
||||
=> array of xxx
|
||||
=> array [0..-1] of xxx
|
||||
|
||||
|
||||
^^(array of xxx)
|
||||
^^(array of ^xxx)
|
||||
^^(array [0..-1] of xxx)
|
||||
^^(array [0..-1] of ^xxx)
|
||||
STABS => POINTER
|
||||
DWARF (GDB 6.x has [0..-1)
|
||||
=> "array of ^(array of xxx)) // dyn array of dyn array
|
||||
|
||||
array of xxx
|
||||
array of ^xxx
|
||||
array [0..-1] of xxx
|
||||
array [0..-1] of ^xxx
|
||||
ONLY as result of DEREF
|
||||
|
||||
array [3..5] of xxx
|
||||
array [3..5] of ^xxx
|
||||
STATIC ARRAY
|
||||
|
||||
^(array [3..5] of xxx)
|
||||
^(array [3..5] of ^xxx)
|
||||
^^(array [3..5] of xxx)
|
||||
^^(array [3..5] of ^xxx)
|
||||
NOT EXISTENT
|
||||
|
||||
|
||||
var a: Array of Array of Pxxx;
|
||||
STABS: type = ^(array [0..-1] of ^(array [0..-1] of ^TRECFORARRAY1))\n
|
||||
DWARF: type = ^^(array [0..-1] of ^TRECFORARRAY1)\n
|
||||
with more levels:
|
||||
type = ^(array of ^(array of ^(array of TRECFORARRAY1)))\n
|
||||
type = ^(array [0..-1] of ^(array [0..-1] of ^(array [0..-1] of ^(array [0..-1] of TRECFORARRAY1))))\n
|
||||
|
||||
|
||||
var a: Array of Array of xxx;
|
||||
STABS: type = ^(array [0..-1] of ^(array [0..-1] of TRECFORARRAY1))\n
|
||||
DWARF: type = ^^(array [0..-1] of TRECFORARRAY1)\n
|
||||
|
||||
var a: Array of Array [3..5] of xxx;
|
||||
STABS: type = ^(array [0..-1] of array [3..5] of TRECFORARRAY1)\n
|
||||
DWARF: type = ^array [3..5] of TRECFORARRAY1\n
|
||||
|
||||
var a: Array [3..5] of Array of xxx; / dwarf with gdb 6.x returns like stabs
|
||||
STABS: type = array [3..5] of ^(array [0..-1] of TRECFORARRAY1)\n
|
||||
DWARF: type = array [3..5] of ^(array of TRECFORARRAY1)\n
|
||||
|
||||
|
||||
var a: Array [3..5] of Array [3..5] of xxx;
|
||||
STABS: type = array [3..5] of array [3..5] of TRECFORARRAY1\n
|
||||
DWARF: type = array [3..5] of array [3..5] of TRECFORARRAY1\n
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
|
||||
* procedure x(ArgEnum: TEnum); // TEnum = (One, Two, Three);
|
||||
* procedure x(ArgEnumSet: TEnumSet; var VArgEnumSet: TEnumSet); // TEnumSet = set of TEnum;
|
||||
* procedure x(ArgSet: TSet; var VArgSet: TSet); // TSet = Set of (Alpha, Beta, Gamma);
|
||||
* var VarEnumA: (e1,e2,e3); VarEnumSetA: set of TEnum; VarSetA: Set of (s1,s2,s3);
|
||||
|
||||
"WhatIs" Results (| marks a new line / gdb starts a new line with ~"):
|
||||
Stabs Dwarf Dwarf without -godwarfset
|
||||
ArgEnumSet TENUMSET TENUMSET TENUMSET
|
||||
VArgEnumSet TENUMSET &TENUMSET &TENUMSET
|
||||
ArgSet TSET TSET TSET
|
||||
VArgSet TSET &TSET &TSET
|
||||
VarEnumSetA set of TENUM set of |ONE..THREE <invalid unnamed pascal type code 8>
|
||||
VarSetA set of = (...) set of |S1..S3 <invalid unnamed pascal type code 8>
|
||||
|
||||
TEnumSet TENUMSET set of |ONE..THREE TENUMSET
|
||||
TSet TSET set of |ALPHA..GAMMA TSET
|
||||
|
||||
ArgEnum TENUM ## same for stabs (both)
|
||||
VarEnumA = (...) ## same for stabs (both)
|
||||
TEnum TENUN ## same for stabs (both)
|
||||
|
||||
"PType" Results:
|
||||
Stabs Dwarf Dwarf without -godwarfset
|
||||
|
||||
ArgEnumSet set of TENUM set of |ONE..THREE TENUMSET
|
||||
VArgEnumSet set of TENUM &set of |ONE..THREE &TENUMSET
|
||||
ArgSet set of = (ALPHA, BETA, GAMMA) set of |ALPHA..GAMMA TSET
|
||||
VArgSet set of = (ALPHA, BETA, GAMMA) &set of |ALPHA..GAMMA &TSET
|
||||
VarEnumSetA set of TENUM set of |ONE..THREE <invalid unnamed pascal type code 8>
|
||||
VarSetA set of = (S1, S2, S3) set of |S1..S3 <invalid unnamed pascal type code 8>
|
||||
|
||||
TEnumSet set of TENUM set of |ONE..THREE TENUMSET
|
||||
TSet set of = (ALPHA, BETA, GAMMA) set of |ALPHA..GAMMA TSET
|
||||
|
||||
ArgEnum TENUM = (ONE, TWO, THREE) ## same for stabs (both)
|
||||
VarEnumA = (E1, E2, E3) ## same for stabs (both)
|
||||
TEnum TENUM = (ONE, TWO, THREE) ## same for stabs (both)
|
||||
|
||||
## Alternative new lines: set of ONE|..THREE| set of S1|..S3|
|
||||
## All results can be prefixed by ^, for unamed pointertypes (^& for var param)
|
||||
|
||||
39
debugger/test/gdb responses/ptype_whatis_for_object.txt
Normal file
39
debugger/test/gdb responses/ptype_whatis_for_object.txt
Normal file
@ -0,0 +1,39 @@
|
||||
Examples: (tested with fpc 2.4.2 and 2.5.1 (Jan 2011) / gdb 7.0, gdb 7.2
|
||||
(excluding the '~"type = ' and the '\n"')
|
||||
|
||||
* procedure x(ArgTFoo: TFoo; var VArgTFoo: TFoo); // TFoo = class end;
|
||||
* procedure x(ArgPFoo: PFoo; var VArgPFoo: PFoo); // PFoo = ^TFoo;
|
||||
|
||||
"PType" Results (for the "???" part):
|
||||
ptype Arg<YYY> ~"type = <???> = class : public TOBJECT \n" ## followed by lines of fields (exlude inherited)
|
||||
Normal | Param-by-ref
|
||||
Stabs Dwarf | Stabs Dwarf Dwarf(fpc 2.6 up)
|
||||
ArgTFoo ^TFOO ^TFOO | VArgTFoo ^TFOO &TFOO ^TFOO
|
||||
ArgTFoo^ TFOO TFOO | VArgTFoo^ ^TFOO ^TFOO TFOO
|
||||
@ArgTFoo ^TFOO ^TFOO | @VArgTFoo ^TFOO ^&TFOO ^TFOO
|
||||
|
||||
ArgPFoo ^TFOO ^TFOO | VArgPFoo ^TFOO &TFOO ^TFOO
|
||||
ArgPFoo^ ^TFOO ^TFOO | VArgPFoo^ ^TFOO ^TFOO ^TFOO
|
||||
@ArgPFoo ^TFOO ^TFOO | @VArgPFoo ^TFOO ^&TFOO ^TFOO
|
||||
|
||||
Stabs Dwarf
|
||||
TFoo TFOO ^TFOO
|
||||
PFoo ^TFOO ^TFOO
|
||||
|
||||
"WhatIs" Results: Normal | Param-by-ref
|
||||
- some "whatis" have a trailing "=class\n" (indicated by a "=" below
|
||||
Stabs Dwarf | Stabs Dwarf Dwarf(fpc 2.6 up)
|
||||
ArgTFoo TFOO TFOO | VArgTFoo TFOO &TFOO TFOO
|
||||
ArgTFoo^ TFOO TFOO= | VArgTFoo^ TFOO TFOO TFOO=
|
||||
@ArgTFoo PFOO ^TFOO | @VArgTFoo PFOO ^&TFOO ^TFOO ## whatis @ArgTFoo may be ^TFoo under Stabs if no named type PFoo exists
|
||||
|
||||
ArgPFoo PFOO PFOO | VArgPFoo PFOO &PFOO PFOO
|
||||
ArgPFoo^ TFOO TFOO | VArgPFoo^ TFOO PFOO TFOO
|
||||
@ArgPFoo PPFOO ^PFOO | @VArgPFoo PPFOO ^&PFOO ^PFOO ## whatis @ArgPFoo may be ^PFoo under Stabs if no named type PPFoo exists
|
||||
|
||||
Stabs Dwarf
|
||||
TFoo TFOO ^TFOO = class
|
||||
PFoo PFOO ^TFOO ## requires gdb 7 (mayb 6.7)
|
||||
|
||||
==> "ptype SomeVariable" does not differ between TFoo and PFoo
|
||||
==> dwarf ptype is the same for TFoo and PFoo (whatis can tell the diff)
|
||||
Loading…
Reference in New Issue
Block a user