From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24400 invoked by alias); 2 Mar 2007 13:57:22 -0000 Received: (qmail 24391 invoked by uid 22791); 2 Mar 2007 13:57:21 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 02 Mar 2007 13:57:14 +0000 Received: from dsl093-172-095.pit1.dsl.speakeasy.net ([66.93.172.95] helo=caradoc.them.org) by nevyn.them.org with esmtp (Exim 4.63) (envelope-from ) id 1HN8G0-0005GA-Ri; Fri, 02 Mar 2007 08:57:12 -0500 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HN8G0-0007ud-KX; Fri, 02 Mar 2007 08:57:12 -0500 Date: Fri, 02 Mar 2007 13:57:00 -0000 From: Daniel Jacobowitz To: Markus.Grunwald@pruftechnik.com Cc: gdb@sourceware.org Subject: Re: gdb continues when I want "next" Message-ID: <20070302135712.GB30113@caradoc.them.org> Mail-Followup-To: Markus.Grunwald@pruftechnik.com, gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00034.txt.bz2 On Fri, Mar 02, 2007 at 02:44:14PM +0100, Markus.Grunwald@pruftechnik.com wrote: > Hello, > > Using gdb 6.3 (where the version doesn't matter that much. I had the same > trouble with 6.6) on an up to date debian etch I have (at least) two > errors: > > 1) I set (exactly) one breakpoint. gdb stops on it. But more often then > not when you issue a "next" or "finish" command, the program just > continues without halt and breaks at this breakpoint agin. The program > that is debugged is multi threaded. > I _suspect_ that this only happens the first time that I debug the > program: When the program ends and I type "run" for the second (and more) > time, I can degub quite fine. Anything like this sounds like a hardware or kernel problem, rather than a GDB problem - either that or you're just getting lucky. > 2) Conditions as above, but: Sometimes, I get this when reaching the > breakpoint for the first time: > > Breakpoint 1, CPTLinearGraphic::CalculateLinLines (this=0x9251de0) > at > /home/gru/projects/vxp/branches/branch-0-2-10-X/Dafit_Code/drawdevices/CPTLinearGraphic.cpp:1640 > (gdb) n > (gdb) n > Detaching after fork from child process 29873. > [Thread -1863816272 (LWP 29869) exited] > > Program received signal SIGTRAP, Trace/breakpoint trap. > [Switching to Thread -1863816272 (LWP 29869)] > 0xb7446891 in __nptl_death_event () from > /lib/tls/i686/cmov/libpthread.so.0 > (gdb) fin > Run till exit from #0 0xb7446891 in __nptl_death_event () > from /lib/tls/i686/cmov/libpthread.so.0 > 0x90e86490 in ?? () > (gdb) > Run till exit from #0 0x90e86490 in ?? () > Warning: > Cannot insert breakpoint 0. > Error accessing memory address 0x0: Input/output error. I have no idea. Part of this sounds like GDB is confused by an excessive rate of forking and thread creation / destruction. After that, I don't know where you've ended up. I don't think we will be able to help you without a testcase we can use to reproduce your problems. > One more note: The debugged program is compiled with gcc 2.95.4. Ancient, > but we have no other choice at the moment... :( Expect very poor results for both C++ and optimized code if you're using this compiler. -- Daniel Jacobowitz CodeSourcery