From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31441 invoked by alias); 11 Mar 2004 00:09:37 -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 30550 invoked from network); 11 Mar 2004 00:07:21 -0000 Received: from unknown (HELO faui10.informatik.uni-erlangen.de) (131.188.31.10) by sources.redhat.com with SMTP; 11 Mar 2004 00:07:21 -0000 Received: from faui1d.informatik.uni-erlangen.de (faui1d [131.188.31.34]) by faui10.informatik.uni-erlangen.de (8.9.3p3/8.1.9-FAU) with ESMTP id BAA13284; Thu, 11 Mar 2004 01:07:20 +0100 (CET) From: Ulrich Weigand Received: (from weigand@localhost) by faui1d.informatik.uni-erlangen.de (8.9.3p3/8.1.6-FAU) id BAA05694; Thu, 11 Mar 2004 01:07:20 +0100 (CET) Message-Id: <200403110007.BAA05694@faui1d.informatik.uni-erlangen.de> Subject: Re: [PATCH] Fix signals.exp test case on S/390 To: cagney@gnu.org Date: Fri, 19 Mar 2004 00:09:00 -0000 Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00258.txt.bz2 Andrew Cagney wrote: >I'm lost here. What happens with: > >- get_frame_id (get_prev_frame (signal handler)) >- get_frame_id (sigreturn trampoline) > >They should match Well, they do match, that's why things work with my patch. The problem is that without my patch, step_over_function doesn't actually *use* get_frame_id (get_prev_frame ...), see the code: if (frame_id_p (step_frame_id) && !IN_SOLIB_DYNSYM_RESOLVE_CODE (sr_sal.pc)) /* NOTE: cagney/2004-02-27: Use the global state's idea of the stepping frame ID. I suspect this is done as it is lighter weight than a call to get_prev_frame. */ sr_id = step_frame_id; else if (legacy_frame_p (current_gdbarch)) /* NOTE: cagney/2004-02-27: This is the way it was 'cos this is the way it always was. It should be using the unwound (or caller's) ID, and not this (or the callee's) ID. It appeared to work because: legacy architectures used the wrong end of the frame for the ID.stack (inner-most rather than outer-most) so that the callee's id.stack (un adjusted) matched the caller's id.stack giving the "correct" id; more often than not !IN_SOLIB_DYNSYM_RESOLVE_CODE and hence the code above (it was originally later in the function) fixed the ID by using global state. */ sr_id = get_frame_id (get_current_frame ()); else sr_id = get_frame_id (get_prev_frame (get_current_frame ())); It will run into the first if, and simply use step_frame_id, which is wrong in this case. That's why my patch add another condition to the first if, to make it not taken and actually use the (correct) get_prev_frame case. Bye, Ulrich -- Dr. Ulrich Weigand weigand@informatik.uni-erlangen.de From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31441 invoked by alias); 11 Mar 2004 00:09:37 -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 30550 invoked from network); 11 Mar 2004 00:07:21 -0000 Received: from unknown (HELO faui10.informatik.uni-erlangen.de) (131.188.31.10) by sources.redhat.com with SMTP; 11 Mar 2004 00:07:21 -0000 Received: from faui1d.informatik.uni-erlangen.de (faui1d [131.188.31.34]) by faui10.informatik.uni-erlangen.de (8.9.3p3/8.1.9-FAU) with ESMTP id BAA13284; Thu, 11 Mar 2004 01:07:20 +0100 (CET) From: Ulrich Weigand Received: (from weigand@localhost) by faui1d.informatik.uni-erlangen.de (8.9.3p3/8.1.6-FAU) id BAA05694; Thu, 11 Mar 2004 01:07:20 +0100 (CET) Message-ID: <200403110007.BAA05694@faui1d.informatik.uni-erlangen.de> Subject: Re: [PATCH] Fix signals.exp test case on S/390 To: cagney@gnu.org Date: Thu, 11 Mar 2004 00:09:00 -0000 Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03.o/txt/msg00258.txt Message-ID: <20040311000900.ndWAU91pHd9XW9W5fZIg7ZpyTDKCSUpJhZ5ncZL08Jw@z> Andrew Cagney wrote: >I'm lost here. What happens with: > >- get_frame_id (get_prev_frame (signal handler)) >- get_frame_id (sigreturn trampoline) > >They should match Well, they do match, that's why things work with my patch. The problem is that without my patch, step_over_function doesn't actually *use* get_frame_id (get_prev_frame ...), see the code: if (frame_id_p (step_frame_id) && !IN_SOLIB_DYNSYM_RESOLVE_CODE (sr_sal.pc)) /* NOTE: cagney/2004-02-27: Use the global state's idea of the stepping frame ID. I suspect this is done as it is lighter weight than a call to get_prev_frame. */ sr_id = step_frame_id; else if (legacy_frame_p (current_gdbarch)) /* NOTE: cagney/2004-02-27: This is the way it was 'cos this is the way it always was. It should be using the unwound (or caller's) ID, and not this (or the callee's) ID. It appeared to work because: legacy architectures used the wrong end of the frame for the ID.stack (inner-most rather than outer-most) so that the callee's id.stack (un adjusted) matched the caller's id.stack giving the "correct" id; more often than not !IN_SOLIB_DYNSYM_RESOLVE_CODE and hence the code above (it was originally later in the function) fixed the ID by using global state. */ sr_id = get_frame_id (get_current_frame ()); else sr_id = get_frame_id (get_prev_frame (get_current_frame ())); It will run into the first if, and simply use step_frame_id, which is wrong in this case. That's why my patch add another condition to the first if, to make it not taken and actually use the (correct) get_prev_frame case. Bye, Ulrich -- Dr. Ulrich Weigand weigand@informatik.uni-erlangen.de