From: John Baldwin <jhb@freebsd.org>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add support for catching system calls to native FreeBSD targets.
Date: Mon, 20 Jun 2016 17:10:00 -0000 [thread overview]
Message-ID: <3027504.g5mkIDnfYi@ralph.baldwin.cx> (raw)
In-Reply-To: <20160614205751.11566-1-jhb@FreeBSD.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
next prev parent reply other threads:[~2016-06-20 17:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 20:58 John Baldwin
2016-06-20 17:10 ` John Baldwin [this message]
2016-06-20 22:56 ` Pedro Alves
2016-06-24 0:24 ` John Baldwin
2016-06-24 15:52 ` Pedro Alves
2016-06-24 17:57 ` John Baldwin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3027504.g5mkIDnfYi@ralph.baldwin.cx \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox