From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7047 invoked by alias); 31 Aug 2006 23:28:41 -0000 Received: (qmail 7038 invoked by uid 22791); 31 Aug 2006 23:28:40 -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; Thu, 31 Aug 2006 23:28:38 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GIvxb-0005c7-A2; Thu, 31 Aug 2006 19:28:35 -0400 Date: Thu, 31 Aug 2006 23:28:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: "Bizhan Gholikhamseh (bgholikh)" , gdb@sourceware.org Subject: Re: Error running remote gdb Message-ID: <20060831232835.GA21472@nevyn.them.org> Mail-Followup-To: Michael Snyder , "Bizhan Gholikhamseh (bgholikh)" , gdb@sourceware.org References: <1157064448.4466.45.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1157064448.4466.45.camel@localhost.localdomain> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00295.txt.bz2 On Thu, Aug 31, 2006 at 03:47:28PM -0700, Michael Snyder wrote: > > Sending packet: $vCont?#49...Ack > > Packet received: vCont;c;C;s;S > > Packet vCont (verbose-resume) is supported > > Sending packet: $vCont;c#a8...Ack > > Packet received: T0501:7ffff850;40:3000ce98; > > gdb asks the target to continue. Target continues, > then informs gdb "I hit a breakpoint at 0x3000ce98". > > This is the first breakpoint that gdb set, above. > I'm pretty sure now that it's the thread event breakpoint. More likely it's the shared library event breakpoint; we don't set the thread breakpoints until after we've got a load event for libpthread. > > Packet received: T0501:7ffffd30;40:10000560;thread:6098; > > [Switching to thread 24728] > > Sending packet: $m3000ce98,4#c9...Ack > > Packet received: 9421fff0 > > Sending packet: $M3000ce98,4:7d821008#b1...Ack > > Packet received: OK > > Sending packet: $m10000560,4#59...Ack > > Packet received: 48000181 > > Sending packet: $M10000560,4:7d821008#41...Ack > > Packet received: OK > > Sending packet: $vCont;s:6098;c#67...Ack > > Finally, gdb restores the breakpoints and tells the target > to continue. > > > Packet received: T0501:7ffffd30;40:10000560;thread:6098; > > Whereupon we immediately hit the breakpoint at main. > This is where we went wrong. This shouldn't have happened. Actually, this looks fine. But we're at 0x10000560; why are we reinserting the breakpoint _at this address_ and then continuing? Normally you leave the breakpoint out to step over it. I can't think what could cause that. > This is where I have to admit that I don't know the exact > semantics of the vCont message. Over to you, Daniel? That's a "step only thread 6098, continue all other threads" packet, in other words, it corresponds to a single step other than over a breakpoint. If we're stepping over a breakpoint we'd have not had the trailing ;c. -- Daniel Jacobowitz CodeSourcery