Re: [PATCH] Fix signals.exp test case on S/390

Ulrich Weigand
2004-03-11T00:09:37Z

>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.