This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/19: gdb v3 demangler fails on hairyfunc5 hairyfunc6 hairyfunc7
- To: gdb-gnats at sources dot redhat dot com
- Subject: gdb/19: gdb v3 demangler fails on hairyfunc5 hairyfunc6 hairyfunc7
- From: chastain at redhat dot com
- Date: 5 Feb 2001 02:12:42 -0000
- Reply-To: chastain at redhat dot com
>Number: 19
>Category: gdb
>Synopsis: gdb v3 demangler fails on hairyfunc5 hairyfunc6 hairyfunc7
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 04 18:18:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Michael Chastain
>Release: cvs 2001-02-02
>Organization:
>Environment:
Red Hat Linux 7 native (stabs debugging format)
>Description:
gdb has two demanglers for g++ names.
The new demangler produces incorrect results on the symbols "hairyfunc5" "hairyfunc6" "hairyfunc7" in testsuite/gdb.c++/cplusfuncs.cc.
The old demangler works fine.
The stabs in the generated assembly code are:
.stabs "_Z10hairyfunc5PFPFilEPcE:F(0,1)",36,0,183,_Z10hairyfunc5PFPFilEPcE
.stabs "_Z10hairyfunc6PFPFilEPiE:F(0,1)",36,0,184,_Z10hairyfunc6PFPFilEPiE
.stabs "_Z10hairyfunc7PFPFilEPFiPcEE:F(0,1)",36,0,185,_Z10hairyfunc7PFPFilEPFiPcEE
These stabs are correct. gdb's demangler interprets them wrong.
>How-To-Repeat:
Build testsuite/gdb.c++/cplusfuncs with a recent g++ compiler (such as cvs g++ 2001-02-02).
Invoke gdb and enter the following commands:
(gdb) print &'hairyfunc5'
$1 = (int (*)(PFPc_PFl_i)) 0x8049120 <hairyfunc5(int (*)(long) (*)(char*))>
(gdb) print &'hairyfunc6'
$2 = (int (*)(PFPi_PFl_i)) 0x8049140 <hairyfunc6(int (*)(long) (*)(int*))
(gdb) print &'hairyfunc7'
$3 = (int (*)(PFPFPc_i_PFL_i)) 0x8049160 <hairyfunc7(int (*)(long (*)(int (*)(char*)))>
>Fix:
Take a PATH train to New Jersey and geek-slap DMR for designing declarators with both prefix and postfix operators.
>Release-Note:
>Audit-Trail:
>Unformatted: