[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb
Subject:    Re: Break on syscall?
From:       Daniel Jacobowitz <drow () false ! org>
Date:       2006-05-20 0:18:38
Message-ID: 20060520001838.GA19268 () nevyn ! them ! org
[Download RAW message or body]

On Fri, May 19, 2006 at 03:09:31PM -0700, PAUL GILLIAM wrote:
> > traditionally ptrace has no way to request a single step and stop if
> > entering a syscall, so you'd need an arch hook to detect it to handle
> > that case.

> From the ptrace(2) man page on Linux:
> 
> PTRACE_SYSCALL, PTRACE_SINGLESTEP

That doesn't conflict with what I said.  You can't issue PTRACE_SYSCALL
and PTRACE_SINGLESTEP at the same time.

> The 'ltrace' utility uses this to trace system calls.  It uses a sleazy
> table (/etc/ltrace.cfg) to find out about their arguments...  GDB should
> be able to do a much better job, although matching syscall numbers to
> their associated library routines would be a challenge (at least for me
> 8-)

GDB can do vastly better, but it's not a small project.

-- 
Daniel Jacobowitz
CodeSourcery

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic