This is the mail archive of the gdb-patches@sourceware.org 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] Add support for catching system calls to native FreeBSD targets.


On Tuesday, June 14, 2016 01:57:51 PM John Baldwin wrote:
> All platforms on FreeBSD use a shared system call table, so use a
> single XML file to describe the system calls available on each FreeBSD
> platform.
> 
> xRecent versions of FreeBSD include the identifier of the current
> system call when reporting a system call entry or exit event in the
> ptrace_lwpinfo structure obtained via PT_LWPINFO in fbsd_wait.  As
> such, FreeBSD native targets do not use the gdbarch method to fetch
> the system call code.  In addition, FreeBSD register sets fetched via
> ptrace do not include an equivalent of 'orig_rax' (on amd64 for
> example), so the system call code cannot be extracted from the
> available registers during a system call exit.  However, GDB assumes
> that system call catch points are not supported if the gdbarch method
> is not present.  As a workaround, FreeBSD ABIs install a dummy gdbarch
> method that throws an internal_error if it is ever invoked.

Ping?  I don't think this conflicts with the pending patches to add
system call groups.  (Presumbly I would just need a followup change to
annotate the groups in freebsd.xml.)

-- 
John Baldwin


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