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: [RFC v4] fix regressions with target-async


This is OK with one issue below addressed.

On 03/06/2014 03:52 PM, Tom Tromey wrote:
> @@ -387,6 +383,15 @@ complete_target_initialization (struct target_ops *t)
>    if (t->to_has_execution == NULL)
>      t->to_has_execution = return_zero_has_execution;
>  
> +  if (t->to_supports_non_stop == NULL)
> +    t->to_supports_non_stop = return_zero;
> +

It seems to me this should be under the same comment and condition
as to_can_async_p below?  Seems like as is we'll always return
false when a thread_stratum target is already pushed?  Say, starting
a second inferior with "run&" when the first inferior is
threaded (and is still running) ?

> +  /* This method can be called on an unpushed target and so requires a
> +     default implementation if the target might plausibly be the
> +     default run target.  */
> +  if (t->to_can_run != NULL && t->to_can_async_p == NULL)
> +    t->to_can_async_p = return_zero;

BTW, I just thought of another way to do this (for another day).

Almost all native targets have been converted to inherit
inf-child.c, except 3:

 go32-nat.c:  go32_ops.to_can_run = go32_can_run;
 nto-procfs.c:  procfs_ops.to_can_run = procfs_can_run;
 windows-nat.c:  windows_ops.to_can_run = windows_can_run;

If we converted those, we'd have a superclass for all native
targets, and we could put these default run target
defaults there.

-- 
Pedro Alves


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