Re: c++/1210: Printing fails/aborts for some attributes (Cannot access memory at address)
The following reply was made to PR c++/1210; it has been noted by GNATS.
From: Michael Bjerking <[hidden email]>
To: [hidden email] Cc:
Subject: Re: c++/1210: Printing fails/aborts for some attributes (Cannot
access memory at address)
Date: Sat, 18 Mar 2006 09:50:03 +0100
This bug still exist in gdb v6.3.50 and 22.214.171.12460316 !?
Here is output from the testsuite:
WARNING: No tool specified
Test Run By mbj on Sat Mar 18 09:33:31 2006
Native configuration is i686-suse-linux
=== tests ===
Schedule of variations:
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file
Using /usr/share/dejagnu/config/unix.exp as generic interface file for
Using ./../config/unix.exp as tool-and-target-specific interface file.
Running ./pr-1210.exp ...
FAIL: print *obj
FAIL: print obj->myB
=== Summary ===
# of expected passes 1
# of unexpected failures 2
I have also a very simple example where the problem is accuring:
mbj@linux:~/moduletesting> gdb main
GNU gdb 126.96.36.19960316
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
This GDB was configured as "--host= --target=i686-pc-linux-gnu"...Using
host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x80486ee: file main.cpp, line 30.
Starting program: /home/mbj/moduletesting/main
Breakpoint 1, main () at main.cpp:30
30 Base base;
32 cout << "Start" << endl;
33 cout << base.id().geti() << endl;
34 cout << "End" << endl;
(gdb) p base.id().geti()
Attempt to take address of value not located in memory.