This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add support for catching system calls to native FreeBSD targets.
- From: John Baldwin <jhb at freebsd dot org>
- To: gdb-patches at sourceware dot org
- Date: Mon, 20 Jun 2016 09:58:52 -0700
- Subject: Re: [PATCH] Add support for catching system calls to native FreeBSD targets.
- Authentication-results: sourceware.org; auth=none
- References: <20160614205751 dot 11566-1-jhb at FreeBSD dot org>
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