]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix type name in ptype-o.exp
authorTom Tromey <tromey@adacore.com>
Thu, 12 Sep 2024 14:18:10 +0000 (08:18 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 6 Mar 2025 21:17:17 +0000 (14:17 -0700)
commitfb77dfe48b5e40a5ed06f8482cd808a13e136db2
treed9c048582246ed7e15bdb1a1abf42e000d554209
parentcabd5456c78f431517b4c76ed93feff1608e0cf0
Fix type name in ptype-o.exp

The "Rec" type in ptype-o.exp is currently named "prog__rec" by the
compiler.  However, with my changes to GNAT, the type will no longer
have a prefix, as it is local to a procedure.

Changing this to just use "rec" works fine with the new compiler, but
then fails with older compilers.  To allow correct operation with both
compilers, this patch simply moves the type into a new package.  This
doesn't affect the meaning of the test, which is just ensuring that
ptype/o works in a certain case.

Note that the more obvious fix of just using "ptype/o rec" does not
work with the current GNAT.  I haven't investigated this but I did
file a bug to track it:

    https://sourceware.org/bugzilla/show_bug.cgi?id=32169
gdb/testsuite/gdb.ada/ptype-o.exp
gdb/testsuite/gdb.ada/ptype-o/pck.ads [new file with mode: 0644]
gdb/testsuite/gdb.ada/ptype-o/prog.adb