This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14388] New: wrong error msg when printing deferenced this pointer.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]