public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14388] New: wrong error msg when printing deferenced this pointer.
@ 2004-03-02 19:10 yanliu at ca dot ibm dot com
  2004-03-02 19:28 ` [Bug c++/14388] " yanliu at ca dot ibm dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: yanliu at ca dot ibm dot com @ 2004-03-02 19:10 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-03-03 16:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-02 19:10 [Bug c++/14388] New: wrong error msg when printing deferenced this pointer yanliu at ca dot ibm dot com
2004-03-02 19:28 ` [Bug c++/14388] " yanliu at ca dot ibm dot com
2004-03-02 19:39 ` [Bug debug/14388] " bangerth at dealii dot org
2004-03-02 19:47 ` yanliu at ca dot ibm dot com
2004-03-02 20:29 ` pinskia at gcc dot gnu dot org
2004-03-02 22:53 ` bangerth at dealii dot org
2004-03-03 16:11 ` yanliu at ca dot ibm dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).