From: Carlo Wood <carlo@alinoe.com>
To: liams@redhat.com
Cc: gdb@sources.redhat.com
Subject: Re: gdb bugs showing while working on libcwd
Date: Fri, 24 May 2002 18:33:00 -0000 [thread overview]
Message-ID: <20020525033302.A20587@alinoe.com> (raw)
In-Reply-To: <20020524184234.A22858@alinoe.com>; from carlo@alinoe.com on Fri, May 24, 2002 at 06:42:34PM +0200
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
either:
$ 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/alloctag.cc, line 25.
(gdb) r
Starting program: /home/carlo/c++/libcwd/testsuite/tst_alloctag_shared
Breakpoint 1, main () at libcwd.tst/alloctag.cc:25
25 Debug( check_configuration() );
(gdb) b debugmalloc.cc:1197
Breakpoint 2 at 0x4007b660: file debugmalloc.cc, line 1197.
(gdb) c
Continuing.
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 debugmalloc.cc:1197
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 <carlo@alinoe.com>
next prev parent reply other threads:[~2002-05-25 1:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20020522115242.C28512@redhat.com>
[not found] ` <20020523153816.A4454@alinoe.com>
[not found] ` <20020523094527.B25730@redhat.com>
2002-05-23 17:35 ` Carlo Wood
2002-05-23 18:58 ` Daniel Jacobowitz
2002-05-24 8:41 ` Huge problems with debugging threaded C++ programs Liam Stewart
2002-05-24 9:42 ` gdb bugs showing while working on libcwd Carlo Wood
2002-05-24 18:33 ` Carlo Wood [this message]
2002-05-24 18:41 ` Daniel Jacobowitz
2002-05-26 18:43 ` Carlo Wood
2002-05-26 23:03 ` Daniel Jacobowitz
2002-05-27 5:42 ` Carlo Wood
2002-05-27 11:05 ` Daniel Jacobowitz
2002-05-27 17:01 ` Carlo Wood
2002-05-28 1:17 ` Daniel Jacobowitz
2002-05-28 5:50 ` Carlo Wood
2002-05-28 10:37 ` Daniel Jacobowitz
2002-05-28 15:54 ` Carlo Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020525033302.A20587@alinoe.com \
--to=carlo@alinoe.com \
--cc=gdb@sources.redhat.com \
--cc=liams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox