This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC] if (INNER_THAN (read_sp(), step_sp - 16))
- To: "Peter.Schauer" <Peter dot Schauer at Regent dot E-Technik dot TU-Muenchen dot DE>, gdb-patches at sources dot redhat dot com
- Subject: [RFC] if (INNER_THAN (read_sp(), step_sp - 16))
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Fri, 15 Jun 2001 16:18:31 -0700
- Organization: Red Hat
Hellooooooo, Peter Schauer!
Back in April of 1998 a patch from you was checked in (you may have
submitted it some time earlier) for x86 Solaris. Among other things,
it contained a test in infrun.c (wait_for_inferior) that looked like:
[stuff...]
(CURRENTLY_STEPPING ()
&& prev_pc != stop_pc - DECR_PC_AFTER_BREAK
&& !(step_range_end
&& read_sp () INNER_THAN (step_sp - 16)));
A comment explains that the INNER_THAN expression is meant to detect
hitting a breakpoint in a signal handler without an intervening stop
in sigtramp.
The lines have metamorphosed since then, but the expression with
(step_sp - 16) is still in there, and I would really like to get
rid of it. Especially since I have now found that it can cause
serious bugs in debugging native Linux x86.
But I have no idea how to detect the situation that you are
trying to test for. So I'd like to toss it back to you.
Can you find a better way to test for this? Maybe with
(ugh) another state variable?
And if not, can you put those two lines into an ifdef,
so they won't affect targets for which they're not intended?
Thanks a lot,
Michael