Al Viro <[email protected]> writes: > On Thu, Sep 30, 2010 at 10:21:47AM +0200, Andreas Schwab wrote: >> Geert Uytterhoeven <[email protected]> writes: >> >> >> So what's that SIGTRAP on exit from syscall in single-stepping mode for? >> >> The trace exception is low priority exception that is executed after all >> other exceptions are processed. So if the cpu single steps over a trap >> insns, the trace exception processing is started when the trap exception >> processing is complete, which is just before the cpu starts executing >> the trap exception handler in the kernel. You want the SIGTRAP to be >> sent to the user process, so you have to delay sending it until the >> kernel returns to user space. > > Um... What's wrong with doing that from trap_c()?
IIRC that was the only way to make gdb work correctly wrt. single stepping over system calls and into signal handlers. If anyone wants to test it with today's kernel on real hardware, please go ahead. Andreas. -- Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
