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 v4 2/9] add "this" pointers to more target APIs


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


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