From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25490 invoked by alias); 21 Mar 2004 22:38:32 -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 25483 invoked from network); 21 Mar 2004 22:38:32 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 21 Mar 2004 22:38:32 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4815C2B9B; Sun, 21 Mar 2004 17:38:29 -0500 (EST) Message-ID: <405E1965.2010005@gnu.org> Date: Sun, 21 Mar 2004 22:38:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Use frame_type for sigtramp test in infrun.c References: <40574DFC.9060706@gnu.org> In-Reply-To: <40574DFC.9060706@gnu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00486.txt.bz2 > Hello, > > The attached patch modifies infrun.c so that, for the non-legacy case, the test: > frame_type == SIGTRAMP frame > && step_frame_id != stop_frame_id > is used to determine if a single-step caused the inferior to stumble into a signal trampoline (either via a signal, or by returning from the handler). This replaces two pc_in_sigtramp calls and a stack-pointer heuristic -- not the most robust of tests. > > The new test: > > - eliminates the call pc_in_sigtramp(step_pc) > (i.e., on the PC from before the single step) (this was an unexpected bonus :-) > > - uses the caching call get_frame_type call > pc_in_sigtramp has to re-do all the computation each time it is called (typically duplicating the effort of get_frame_type) > > - uses !frame_id_eq > Which is a 100% robust frame-changed test. The old test couldn't detect a signal trampoline calling (via a signal) a singnal trampoline. > > thoughts? > > I'll look to commit this in a few days (already committed to my trad-frame branch). I've checked this in. Andrew > 2004-03-16 Andrew Cagney > > * infrun.c (handle_inferior_event): For non legacy frames, use the > frame ID and frame type to identify a signal trampoline. Update > comments.