This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix regression in pascal class type
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 16 Mar 2012 12:13:02 +0100
- Subject: [PATCH] Fix regression in pascal class type
GDB 7.4 introduces a regression (as compared to 7.3 release)
for pascal display of class type:
E:\pas>gdb74 ppc386
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from e:\pas\fpc-2.7.1\bin\i386-win32/ppc386.exe...done.
Warning: e:/cygwin/usr/local/src/gdbcvs/src/gdb: No such file or directory.
(gdb) ptyp TLABEL
No symbol "TLABEL" in current context.
(gdb) ptyp TLABEL
TLABELNODE TLABELNODE__PPULOAD
TLABELNODECLASS TLABELNODE__PPUWRITE
TLABELNODE__BUILDDEREFIMPL TLABELSYM
TLABELNODE__CREATE TLABELSYM__CREATE
TLABELNODE__DEREFIMPL TLABELSYM__MANGLEDNAME
TLABELNODE__DESTROY TLABELSYM__PPULOAD
TLABELNODE__DOCOMPARE TLABELSYM__PPUWRITE
TLABELNODE__DOGETCOPY TLABELTABLE
TLABELNODE__PASS_1 TLABELTABLEITEM
TLABELNODE__PASS_TYPECHECK TLABELTYPE
(gdb) ptyp TLABELSYM
type = TLABELSYM = class : public TSTOREDSYM
public
USED : BOOLEAN;
DEFINED : BOOLEAN;
NONLOCAL : BOOLEAN;
CODE : POINTER;
JUMPBUF : ^TSTOREDSYM;
ASMBLOCKLABEL : ^TASMLABEL;
constructor CREATE (777777777TLABELSYM7POINTER11SHORTSTRING,
1111111POINTER1
1SHORTSTRING, SHORTSTRING) : ^TLABELSYM;
constructor PPULOAD (777777777TLABELSYM7POINTER16TCOMPILERPPUFILE,
1111111PO
INTER16TCOMPILERPPUFILE, TCOMPILERPPUFILE) : ^TLABELSYM;
procedure PPUWRITE (111111111TLABELSYM16TCOMPILERPPUFILE,
TCOMPILERPPUFILE);
virtual;
function MANGLEDNAME (111111111TLABELSYM11SHORTSTRING, SHORTSTRING) :
SHORTSTRING; virtual;
end
(gdb) q
E:\pas>gdbsrc ppc386
GNU gdb (GDB) 7.4.50.20120316-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from e:\pas\fpc-2.7.1\bin\i386-win32\ppc386.exe...done.
Warning: e:/cygwin/usr/local/src/gdbcvs/src/gdb: No such file or directory.
(gdb) ptyp TLABELSYM
type = TLABELSYM = class : public TSTOREDSYM
public
USED : BOOLEAN;
DEFINED : BOOLEAN;
NONLOCAL : BOOLEAN;
CODE : POINTER;
JUMPBUF : ^TSTOREDSYM;
ASMBLOCKLABEL : ^TASMLABEL;
constructor CREATE (TLABELSYM, POINTER, SHORTSTRING) : ^TLABELSYM;
constructor PPULOAD (TLABELSYM, POINTER, TCOMPILERPPUFILE) : ^TLABELSYM;
procedure PPUWRITE (TLABELSYM, TCOMPILERPPUFILE); virtual;
function MANGLEDNAME (TLABELSYM, SHORTSTRING) : SHORTSTRING; virtual;
end
The regression is related to some oversight in
a patch from the series of constant-ification of functions args,
dating back May 18. 2011 (i.e. after gdb-7.3 branch creation,
which explains why it only showed up in 7.4 release).
I didn't read that patch carefully enough...
Is there any change that a gdb 7.4.1 will be released?
If yes, I would like to put that into
current branch as well.
Pierre
This is what I committed:
http://sourceware.org/ml/gdb-cvs/2012-03/msg00205.html
2012-03-16 Pierre Muller <muller@ics.u-strasbg.fr>
* p-typeprint.c (pascal_type_print_method_args):
Fix display of parameter of methods.
Index: p-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-typeprint.c,v
retrieving revision 1.44
diff -u -p -r1.44 p-typeprint.c
--- p-typeprint.c 7 Feb 2012 04:48:21 -0000 1.44
+++ p-typeprint.c 16 Mar 2012 10:58:53 -0000
@@ -183,8 +183,7 @@ pascal_type_print_method_args (const cha
physname += len;
for (j = 0; j < i; ++j)
- fputc_filtered (physname[i], stream);
- fputs_filtered (physname, stream);
+ fputc_filtered (physname[j], stream);
physname += i;
if (physname[0] != 0)