This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 2/9] add "this" pointers to more target APIs
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 28 Oct 2013 16:04:02 +0000
- Subject: Re: [PATCH v4 2/9] add "this" pointers to more target APIs
- Authentication-results: sourceware.org; auth=none
- References: <1382464769-2465-1-git-send-email-tromey at redhat dot com> <1382464769-2465-3-git-send-email-tromey at redhat dot com>
On 10/22/2013 06:59 PM, Tom Tromey wrote:
> @@ -4758,8 +4756,8 @@ static void
> linux_nat_close (void)
> {
> /* Unregister from the event loop. */
> - if (linux_nat_is_async_p ())
> - linux_nat_async (NULL, 0);
> + if (linux_nat_is_async_p (linux_ops))
> + linux_nat_async (linux_ops, NULL, 0);
It doesn't matter much since linux_nat_async doesn't use it's
argument, but FYI, this one here doesn't look 100% correct.
"linux_ops" is the single-threaded target linux-nat itself
delegates some work to (it's never pushed anywhere, etc.).
Ideally, to_close would be passed in a "this" pointer too.
> static int
> -record_full_stopped_by_watchpoint (void)
> +record_full_stopped_by_watchpoint (struct target_ops *ops)
> {
> if (RECORD_FULL_IS_REPLAY)
> return record_full_hw_watchpoint;
> else
> - return record_full_beneath_to_stopped_by_watchpoint ();
> + return record_full_beneath_to_stopped_by_watchpoint (find_target_beneath (ops));
> }
>
Line too long.
--
Pedro Alves