This is the mail archive of the 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]

Re: gdb bugs showing while working on libcwd

I couldn't find the kernel patch to dump multithreaded cores yet,
but I installed gdb from cvs, and it seems to work now :).

Ok, so lets start with one of the problems I did run into
most frequently, something that I could therefore reproduce
easily and what shouldn't give you any problems to reproduce

$ cd libcwd
$ cvs update -r gdbbug01
$ ./bootstrap
$ CXX="g++-3.0.4" CC="gcc-3.0.4" ./configure --enable-maintainer-mode --enable-debug --enable-debugt --enable-debugm --disable-debug-output
$ make
$ cd testsuite
$ make tst_alloctag_shared

Then I get:

~/c++/libcwd/testsuite>gdb tst_alloctag_shared
GNU gdb 2002-05-25-cvs
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 "i686-pc-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x80521cd: file libcwd.tst/, line 25.
(gdb) r
Starting program: /home/carlo/c++/libcwd/testsuite/tst_alloctag_shared

Breakpoint 1, main () at libcwd.tst/
25        Debug( check_configuration() );
(gdb) b
Breakpoint 2 at 0x4007b660: file, line 1197.
(gdb) c
BFD     : Disabled
DEBUG   : Disabled
MALLOC  : Enabled
NOTICE  : Enabled
SYSTEM  : Enabled
WARNING : Enabled
MALLOC  : operator new[] (size = 50) = 0x81d1b28
MALLOC  : operator new (size = 4) = 0x81d1c08
MALLOC  : malloc(33) = 0x805f260
MALLOC  : malloc(55) = 0x807df90
MALLOC  : calloc(22, 10) = 0x80cbab8
MALLOC  : calloc(55, 10) = 0x8066028
MALLOC  : malloc(11) = 0x81d2990
MALLOC  : realloc(0x81d2990, 1000) = 0x80664a8
MALLOC  : malloc(66) = 0x814dfa0
MALLOC  : realloc(0x814dfa0, 1000) = 0x8066a58
MALLOC  : Allocated memory: 2912 bytes in 8 blocks.

Breakpoint 2, libcw::debug::dm_alloc_copy_ct::show_alloc_list(int, libcw::debug::channel_ct const&, libcw::debug::ooam_filter_ct const&) const (this=0x8066980, depth=1, channel=@0x400d4954, filter=@0xbffff540) at
1197        const_cast<location_ct*>(&alloc->location())->handle_delayed_initialization();
(gdb) p this
$1 = (dm_alloc_copy_ct *) 0x8066980
(gdb) p *this
Value can't be converted to integer.

The problem here is that apparently gdb doesn't know
the definition of class dm_alloc_copy_ct.  It should
know that imho.

Carlo Wood <>

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