This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB 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]

c++/1069: Issues printing derived objects with gdb


>Number:         1069
>Category:       c++
>Synopsis:       Issues printing derived objects with gdb
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 19 16:28:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Monte Becker
>Release:        GDB 5.3,  GCC 2.95.3
>Organization:
>Environment:
(gdb) show version
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8".

monte-cristo > gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)
>Description:
Try as I might, I can't look at the contents of a derived 
object.  The object in question has some static members.
For example:  

...AHHHH... 

It worked the second time.  OK, here's the first time:

(gdb) p RV0_3
$1 = {<random_variable> = {static m_default_seed = Internal: global symbol `_15random_variable.m_default_seed' found in /net/cristo/ldisk/work/monte/sand/tga_top/tga/cv_verif/c_shared_tb/random_variable.C psymtab but not in symtab.
_15random_variable.m_default_seed may be an inlined function, or may be a template function
(if a template, try specifying an instantiation: _15random_variable.m_default_seed<type>).

And here's the second time:

(gdb) whatis RV0_3
type = uniform_rv
(gdb) p RV0_3
$2 = {<random_variable> = {static m_default_seed = 0x6, 
    _vptr. = 0x61a50 <uniform_rv virtual table>}, m_min = 0x0, m_max = 0x3, 
  mt = {0x995147ee, 0xddfb0c04, 0x8fbe12, 0xd9e031f0, 0xc140f856, 0x6b1316dc, 
....(The stuff I would expect)


Then I tried to print the result of a method:

(gdb) p RV0_3.gen()

Breakpoint 2, filebuf::filebuf ()
    at /net/cristo/ldisk/work/monte/sand/tga_top/tga/cv_verif/c_dram_tb/TgaDRamTest_Rand.C:105
The program being debugged stopped while in a function called from GDB.
When the function (uniform_rv::gen(void)) is done executing, GDB will silently
stop (instead of continuing to evaluate the expression containing
the function call).

There are no breaks inside of this object.


To make matters even more interesting, I have a STL vector
of these sorts of objects, and though I can't get it to 
reproduce just now, I tried to print out one of those,
and GDB core dumped.


I've look around some, and there have been some messages/bugs
in this area in the past, but I can't find anything resent.

If this is a known issue, sorry I didn't find the fix/
discussion already.  If this is new, I'm able and ready to 
spend some time coming up with a test case.  Just let me
know.

             Monte
>How-To-Repeat:

(Will construct test case if needed.  Let me know.)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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