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: Pedro Alves <palves at redhat dot com>
- To: John Baldwin <jhb at freebsd dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 24 Jun 2016 16:52:23 +0100
- 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> <53d24aec-5588-ea4f-7d6d-085aca553457 at redhat dot com> <7374404 dot qtI4NAOGSQ at ralph dot baldwin dot cx>
On 06/24/2016 01:24 AM, John Baldwin wrote:
> So I'm not quite sure how to implement an arch-specific target_op.
> There are various linux_nat_set_* functions that accept a function pointer
> but then just set a global variable. The amd64 version might have to copy
> with different ABIs rather than depending on teh i386 gdbarch method, etc.
See amd64-linux-nat.c:amd64_linux_siginfo_fixup for example.
>
> One option that is a bit smaller in scale would be to move the error
> in break-catch-syscall.c into linux_child_set_syscall_catchpoint in
> linux-nat.c. It could return 1 to fail the request if the gdbarch
> method wasn't present.
That might work indeed.
In any case, I think what you have is reasonable, given the current
framework. Please do feel free to push what you already have with
the nits addressed. I did not mean for you to go eliminate
the gdbarch hook as prerequisite; was really mainly thinking out loud.
Sorry if it sounded otherwise.
Thanks,
Pedro Alves