From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30700 invoked by alias); 25 May 2002 01:33:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30568 invoked from network); 25 May 2002 01:33:06 -0000 Received: from unknown (HELO mail.alinoe.com) (24.132.80.10) by sources.redhat.com with SMTP; 25 May 2002 01:33:06 -0000 Received: (qmail 6840 invoked by uid 500); 25 May 2002 01:33:02 -0000 Date: Fri, 24 May 2002 18:33:00 -0000 From: Carlo Wood To: liams@redhat.com Cc: gdb@sources.redhat.com Subject: Re: gdb bugs showing while working on libcwd Message-ID: <20020525033302.A20587@alinoe.com> References: <20020522115242.C28512@redhat.com> <20020523153816.A4454@alinoe.com> <20020524114149.A2793@redhat.com> <20020524184234.A22858@alinoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020524184234.A22858@alinoe.com>; from carlo@alinoe.com on Fri, May 24, 2002 at 06:42:34PM +0200 X-SW-Source: 2002-05/txt/msg00277.txt.bz2 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(&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