From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 353 invoked by alias); 5 May 2009 21:43:49 -0000 Received: (qmail 344 invoked by uid 22791); 5 May 2009 21:43:47 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 May 2009 21:43:43 +0000 Received: (qmail 18580 invoked from network); 5 May 2009 21:43:41 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 May 2009 21:43:41 -0000 From: Pedro Alves To: "Ulrich Weigand" Subject: Re: [rfc] Do not call read_pc in startup_inferior Date: Tue, 05 May 2009 21:43:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org, Daniel Jacobowitz References: <200905041738.n44Hcx78013893@d12av02.megacenter.de.ibm.com> In-Reply-To: <200905041738.n44Hcx78013893@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200905052244.19929.pedro@codesourcery.com> 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: 2009-05/txt/msg00095.txt.bz2 On Monday 04 May 2009 18:38:59, Ulrich Weigand wrote: > Makes sense. =A0This means we'd have to remember the "thread we last > stopped at" so we can show its stop_pc. =A0I don't think we actually > have this information right now? We have `get_last_target_status', which infcmd.c:program_info already uses. > Indeed. That's another odd corner that I've never quite understood: > at the point where we look at breakpoints, the "bpstat" structure is > already able to represent that multiple causes of actions have occurred > at the same time. But this detailed status is then reduced via bpstat_wh= at > to a single action code ... Maybe handle_inferior_event should > really make full use of all the information present in the bpstat. Yeah... I think that the basic idea was that most of the stop actions in the bpstat structure are mutually exclusive. E.g., set-longjmp-resume, step-resume, longjmp-resume, single-stepping, user breakpoints. If you're handling one of these, all the other actions that could be associated with one of the other simultaneous breakpoints should be cancelled, so in a sense, the=20 ordering and reducing make some sense. This breaks if the actions aren't really mutually exclusive, like in the shlib event case. Probably, something like eliminating BPSTAT_WHAT_CHECK_SHLIBS and adding a check_shlibs boolean field to `struct bpstat_what' isn't too far from fixing this case. --=20 Pedro Alves