This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14388] New: wrong error msg when printing deferenced this pointer.
- From: "yanliu at ca dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2004 19:10:04 -0000
- Subject: [Bug c++/14388] New: wrong error msg when printing deferenced this pointer.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
using ddd debuger to debug the executable file, a breakpoint is set on
most_derived::method(). When program stops at the breakpoint, typing p *this,
the ddd debugger print out the following error message:
GNU DDD 3.3.1 (powerpc-suse-linux), by Dorothea Lütkehaus and Andreas Zeller.
Copyright © 1995-1999 Technische Universität Braunschweig, Germany.
Copyright © 1999-2001 Universität Passau, Germany.
(gdb) break t1.C:68
Breakpoint 1 at 0x10001740: file t1.C, line 68.
(gdb) run
Breakpoint 1, most_derived::method() (this=0x10011dbc) at t1.C:68
(gdb) p *this
$1 = {<left_class> = {Expected a negative vbase offset (old compiler?)
But when printing the dereference of this pointer address, which I think is the
same as print *this, it doesn't give any error msg:
(gdb) p *(0x10011dbc)
$3 = 268441408
Using ddd debugging the same excetible compiled with g++ 3.2.2, I got a
different error msg:
Breakpoint 1, most_derived::method() (this=0x10000c34) at t1.C:68
(gdb) p *this
can't find linker symbol for virtual table for `most_derived' value
Please verify whether this error msg is valid, and explain the meaning of this
error msg.
--
Summary: wrong error msg when printing deferenced this pointer.
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yanliu at ca dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14388