This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFC] if (INNER_THAN (read_sp(), step_sp - 16))


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]