This is the mail archive of the gdb@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: PTRACE_SINGLESTEP into signal handler


On Fri, Nov 26, 2004 at 06:25:26PM +0100, Ulrich Weigand wrote:
> Does gdb assume PTRACE_SINGLESTEP into a handle returns *before*
> the first instruction of the handler was executed?
> 
> We could change the kernel to do that, and this fixes the test case
> failures, but I'm not sure if this is the right thing to do --
> the ptrace documentation says "arranges for the child to be stopped
> after execution of a single instruction", which would appear to
> indicate the current behaviour is correct.
> 
> How does this work on other platforms?

I'm pretty sure that the answer is yes - we should stop on the first
instruction.  It does seem a little strange as a behavior when
requesting single-step to step no instructions, but we have no other
way to get to the beginning of the handler.  i386 was changed recently.

-- 
Daniel Jacobowitz


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