From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14146 invoked by alias); 30 Jan 2004 19:09:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14138 invoked from network); 30 Jan 2004 19:09:28 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 30 Jan 2004 19:09:28 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Ame19-00055j-V7; Fri, 30 Jan 2004 14:09:27 -0500 Date: Fri, 30 Jan 2004 19:09:00 -0000 From: Daniel Jacobowitz To: Jeff Johnston Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA]: pending breakpoint support [1/3] Message-ID: <20040130190927.GA19379@nevyn.them.org> Mail-Followup-To: Jeff Johnston , gdb-patches@sources.redhat.com References: <400EE69A.5030902@redhat.com> <20040122222741.GA17425@nevyn.them.org> <4016CCE0.5060900@redhat.com> <20040130041316.GA28843@nevyn.them.org> <401AA79B.7010307@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <401AA79B.7010307@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00764.txt.bz2 On Fri, Jan 30, 2004 at 01:51:07PM -0500, Jeff Johnston wrote: > >>+ input_radix = b->input_radix; > >>+ rc = break_command_1 (b->addr_string, b->flag, b->from_tty, b); > >>+ > >>+ if (rc == GDB_RC_OK) > >>+ /* Pending breakpoint has been resolved. */ > >>+ printf_filtered ("Resolves pending breakpoint \"%s\"\n", > >>b->addr_string); > >> > >> > > > >Spelling error, though. > > > > > Actually, I meant it to be: > > Breakpoint set at..... > Resolves pending breakpoint "....." > > So the bottom line ties to the breakpoint just set. If this isn't very > clear I can put "which" in front or just make it "Resolved" which I > think you are alluding to. If there is some other spelling error, > please point it out as I don't see it. I read it and assumed that you meant "Resolved". I think that "resolves" is grammatically confusing here, since there's no implicit subject. How about "Pending breakpoint \"%s\" resolved"? > > > > > > >>@@ -4779,6 +4888,26 @@ create_breakpoints (struct symtabs_and_l > >> b->ignore_count = ignore_count; > >> b->enable_state = bp_enabled; > >> b->disposition = disposition; > >>+ /* If resolving a pending breakpoint, a check must be made to see if > >>+ the user has specified a new condition or commands for the > >>+ breakpoint. A new condition will override any condition that was > >>+ initially specified with the initial breakpoint command. */ > >>+ if (pending_bp) > >>+ { > >>+ char *arg; > >>+ if (pending_bp->cond_string) > >>+ { > >>+ arg = pending_bp->cond_string; > >>+ b->cond_string = savestring (arg, strlen (arg)); > >>+ b->cond = parse_exp_1 (&arg, block_for_pc (b->loc->address), > >>0); > >>+ if (*arg) > >>+ error ("Junk at end of pending breakpoint condition > >>expression"); > >>+ } > >>+ /* If there are commands associated with the breakpoint, they > >>should + be copied too. */ > >>+ if (pending_bp->commands) > >>+ b->commands = copy_command_lines (pending_bp->commands); > >>+ } > >> mention (b); > >> } > >> } > >> > >> > > > >Here's the one question. > > > >The only way to get here with a PENDING_BP is from break_command_1 from > >resolve_pending_breakpoint. So I don't think it is possible for there > >to be a condition already set on B, which makes the comment about > >"overriding" such a condition a little strange. Am I right, or is > >there some other way to get a condition to here? > > > > > The scenario would be: 1. User creates a pending breakpoint with a > condition in the break location. 2. User specifies a condition for the > breakpoint number given back for the pending breakpoint using the > condition command. 3. The shared library gets loaded that resolves the > breakpoint. The resolution of the breakpoint will find the original > condition in the location string, but won't know about the 2nd one which > gets stored in the pending breakpoint cond_string (see condition_command > support for pending breakpoint). I'd have thought the original condition would have been removed from addr_string already. Can we not do that without being able to parse the location? Won't this produce confusing "info breakpoints" output? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer