[PATCH 1/4] catch syscall -- try 4 -- Architecture-independent part

Daniel Jacobowitz drow@false.org
Mon Mar 9 18:56:00 GMT 2009


On Mon, Mar 09, 2009 at 06:39:49PM +0000, Pedro Alves wrote:
> On Monday 09 March 2009 15:09:24, Sérgio Durigan Júnior wrote:
> > if (catch_syscall_enabled () > 0) ...
> > 
> > What happens is that the code does not freeze. GDB still works with
> > this, and as far as I could investigate it shows everything fine.
> > Therefore, I think this function is not needed at all.
> 
> Oh, was that because you're only enabling PTRACE_O_TRACESYSGOOD
> after startup_inferior is finished, in linux_child_post_startup_inferior,
> and, PT_SYSCALL just behaves as PT_CONTINUE in that case?  That
> would make sense to me.

No - without PTRACE_O_TRACESYSGOOD, PT_SYSCALL reports a SIGTRAP on
each syscall entry or exit.  With it, it reports 0x80 | SIGTRAP.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list