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]
Other format: [Raw text]

Re: [patch/rfc] Simplify stepping-through sigtramp; Fix step outof handler


Hello,

The attached patch modifies infrun so that, when skipping uninteresting functions, the inferior is simply single-stepped through the signal trampolines. This replaces logic that was trying to handle:

- signaled into sigtramp (i.e., signal delivered)
Now handled by my other patch, and in the case of gnu/linux which jumps direct to the handler, useless.

- returned into sigtramp (step, next)
Which already does a single step (as the comments note unwinding through signal trampolines isn't so reliable).

A follow-on patch would be to detect a step-out-of-handler and implement that by setting a breakpoint at the signal trampoline return address.

On NetBSD/PPC, due to a kernel bug (gdb/1639), sees stepi into the trampoline fixed but step still broken.

On GNU/Linux i386 step out of handler now works.

I've checked this in. Stepping out of signal trampolines (minus kernel bugs) should work. Null pointers are next.


Andrew

2004-05-08 Andrew Cagney <cagney@redhat.com>

	* infrun.c (handle_inferior_event): Simplify code handling
	step-into or return-from a signal trampoline.

Index: testsuite/ChangeLog
2004-05-08  Andrew Cagney  <cagney@redhat.com>

	* gdb.base/sigstep.exp (advancei): Update KFAILs.  gdb/1613 is
	fixed but revealed gdb/1639.



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