public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug exp/9683] New: 'ptype aClass()' crashes when inside a method of aClass
@ 2008-12-24 16:20 pedro at codesourcery dot com
2010-01-25 16:35 ` [Bug exp/9683] " tromey at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: pedro at codesourcery dot com @ 2008-12-24 16:20 UTC (permalink / raw)
To: gdb-prs
While reproducing PR 9376, I noticed this GDB crash:
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3), x86_64 GNU/Linux
GNU gdb (GDB) 6.8.50.20081224-cvs
$ cat 1783.cc
#include <stdlib.h>
#include <stdio.h>
class Sthread
{
public:
int x ;
int y ;
Sthread() { printf ("Nice sthread\n") ;}
~Sthread() ;
void test_sthread (void) ;
};
void Sthread::test_sthread (void)
{
int i ;
i = 10 ;
i++ ;
printf ("Value of I = %d\n", i) ;
}
int main ()
{
class Sthread *newThr ;
printf ("This code tests gdb type printing \n") ;
newThr = new Sthread() ;
newThr->test_sthread() ;
return 0 ;
}
$ g++ 1783.cc -o 1783 -g3 -O0
>gdb --args ./gdb /home/pedro/1783
(top-gdb) r
Starting program: /home/pedro/gdb/baseline/build/gdb/gdb /home/pedro/1783
GNU gdb (GDB) 6.8.50.20081224-cvs
This GDB was configured as "x86_64-unknown-linux-gnu".
(gdb) start
Temporary breakpoint 1 at 0x40073d: file 1783.cc, line 27.
Starting program: /home/pedro/1783
Temporary breakpoint 1, main () at 1783.cc:27
27 printf ("This code tests gdb type printing \n") ;
(gdb) n
This code tests gdb type printing
28 newThr = new Sthread() ;
(gdb) s
Sthread (this=0x601010) at 1783.cc:9
9 Sthread() { printf ("Nice sthread\n") ;}
(gdb) ptype Sthread()
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f0d427366e0 (LWP 23067)]
0x00000000004da69e in value_fn_field (arg1p=0x7fff4a75bc90, f=0xbf8c10, j=0,
type=0xbf88a0, offset=0)
at ../../src/gdb/value.c:1482
1482 VALUE_ADDRESS (v) = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
(top-gdb) p *sym
$2 = {ginfo = {name = 0xbf8910 "Sthread", value = {ivalue = 0, block = 0x0,
bytes = 0x0, address = 0, chain = 0x0},
language_specific = {cplus_specific = {demangled_name = 0x0}}, language =
language_cplus, section = 0,
obj_section = 0x0}, type = 0xbf88a0, symtab = 0xc17450, domain =
STRUCT_DOMAIN, aclass = LOC_TYPEDEF,
is_argument = 0, line = 5, ops = 0x0, aux_value = 0x0, hash_next = 0xbf8d20}
(top-gdb) p SYMBOL_BLOCK_VALUE (sym)
$3 = (struct block *) 0x0
(top-gdb)
--
Summary: 'ptype aClass()' crashes when inside a method of aClass
Product: gdb
Version: 6.50
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: exp
AssignedTo: unassigned at sourceware dot org
ReportedBy: pedro at codesourcery dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=9683
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug exp/9683] 'ptype aClass()' crashes when inside a method of aClass
2008-12-24 16:20 [Bug exp/9683] New: 'ptype aClass()' crashes when inside a method of aClass pedro at codesourcery dot com
@ 2010-01-25 16:35 ` tromey at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: tromey at redhat dot com @ 2010-01-25 16:35 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2010-01-25 16:35 -------
*** This bug has been marked as a duplicate of 9540 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://sourceware.org/bugzilla/show_bug.cgi?id=9683
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-25 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-24 16:20 [Bug exp/9683] New: 'ptype aClass()' crashes when inside a method of aClass pedro at codesourcery dot com
2010-01-25 16:35 ` [Bug exp/9683] " tromey at redhat 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).