From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18641 invoked by alias); 24 Jan 2007 16:42:29 -0000 Received: (qmail 18628 invoked by uid 22791); 24 Jan 2007 16:42:27 -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; Wed, 24 Jan 2007 16:42:19 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H9lCL-0003wt-9K; Wed, 24 Jan 2007 11:42:09 -0500 Date: Wed, 24 Jan 2007 16:42:00 -0000 From: Daniel Jacobowitz To: Markus Deuling Cc: GDB Patches Subject: Re: [RFC] remote step over pthread_create()/dlopen() bug Message-ID: <20070124164209.GA14985@nevyn.them.org> Mail-Followup-To: Markus Deuling , GDB Patches References: <45B78B4E.8050903@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45B78B4E.8050903@de.ibm.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00502.txt.bz2 On Wed, Jan 24, 2007 at 05:37:34PM +0100, Markus Deuling wrote: > diff -urN src/gdb/gdbserver/linux-low.c dev/gdb/gdbserver/linux-low.c > --- src/gdb/gdbserver/linux-low.c 2007-01-09 23:55:10.000000000 +0100 > +++ dev/gdb/gdbserver/linux-low.c 2007-01-24 17:27:45.000000000 +0100 > @@ -1078,8 +1078,11 @@ > GDB removes the breakpoint to single-step a particular thread > past it, then re-inserts it and resumes all threads. We want > to report the second thread without resuming it in the interim. */ > - if (process->status_pending_p) > - check_removed_breakpoint (process); > + if (process->status_pending_p) > + { > + check_removed_breakpoint (process); > + return 0; > + } > > if (process->status_pending_p) > * (int *) flag_p = 1; > > Now the pending_flag for this process isn't set, which maybe cause > misbehavior in some ways. > Now linux_queue_one_thread() isn't called. Instead > linux_continue_one_thread() is called and the > original thread is resumed. > > I really would like to know your opinion about that patch. Is it ok to > apply or is there a better > way to handle it? Do you see any problems resulting from that patch? Sorry, I think that's the symptom, not the problem. GDB stops every thread when a new thread is created, but gdbserver is designed not to do that - it performs better when there are a lot of threads. So we expect the two cases (native and remote) to be different. GDB ought to handle either one correctly. -- Daniel Jacobowitz CodeSourcery