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
* [Bug c++/14388] wrong error msg when printing deferenced this pointer.
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 ` yanliu at ca dot ibm dot com
2004-03-02 19:39 ` [Bug debug/14388] " bangerth at dealii dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: yanliu at ca dot ibm dot com @ 2004-03-02 19:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From yanliu at ca dot ibm dot com 2004-03-02 19:28 -------
Created an attachment (id=5844)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5844&action=view)
testcase
The testcase is running on linux-ppc 2.4.21-111-pseries64 #1 SMP Thu Oct 30
23:57:04 UTC 2003 ppc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14388
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14388] wrong error msg when printing deferenced this pointer.
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 ` bangerth at dealii dot org
2004-03-02 19:47 ` yanliu at ca dot ibm dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-03-02 19:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-03-02 19:39 -------
This works for me on x86-linux. Unfortunately, you don't say how you
compiled your executable, and don't provide the exact output of gcc -v.
Also note that 3.2.2 is no longer maintained, could you try with
gcc 3.3.3?
Thanks
Wolfgang
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Component|c++ |debug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14388
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14388] wrong error msg when printing deferenced this pointer.
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: yanliu at ca dot ibm dot com @ 2004-03-02 19:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From yanliu at ca dot ibm dot com 2004-03-02 19:47 -------
Here is the command that I am using:
xlCb -g t1.C
ddd a.out
THis is what I got using the gcc -v :
Reading specs from /usr/lib/gcc-lib/powerpc-suse-linux/3.2.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-
prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --
libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --enable-libgcj --
with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --
enable-shared --enable-__cxa_atexit powerpc-suse-linux
Thread model: posix
gcc version 3.2.2
I don't have gcc version 3.3 at hand, so cannot run the tc now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14388
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14388] wrong error msg when printing deferenced this pointer.
2004-03-02 19:10 [Bug c++/14388] New: wrong error msg when printing deferenced this pointer yanliu at ca dot ibm dot com
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-02 20:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-02 20:29 -------
The other is that this might not be a GCC bug but rather a gdb bug which should be reported to them.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14388
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14388] wrong error msg when printing deferenced this pointer.
2004-03-02 19:10 [Bug c++/14388] New: wrong error msg when printing deferenced this pointer yanliu at ca dot ibm dot com
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-03-02 22:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-03-02 22:53 -------
Right, I forgot to ask that: what is the version of the debugger? ddd
is only a fancy frontend, but it works on top of gdb or some other
debugger. You should tell us which debugger and which version.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14388
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/14388] wrong error msg when printing deferenced this pointer.
2004-03-02 19:10 [Bug c++/14388] New: wrong error msg when printing deferenced this pointer yanliu at ca dot ibm dot com
` (4 preceding siblings ...)
2004-03-02 22:53 ` bangerth at dealii dot org
@ 2004-03-03 16:11 ` yanliu at ca dot ibm dot com
5 siblings, 0 replies; 7+ messages in thread
From: yanliu at ca dot ibm dot com @ 2004-03-03 16:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From yanliu at ca dot ibm dot com 2004-03-03 16:11 -------
you are right, I should report this bug to GDB.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
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).