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 4/4] gdb: After inferior call, finish all threads in process


On 05/24/2018 11:50 AM, Andrew Burgess wrote:

> diff --git a/gdb/infcall.c b/gdb/infcall.c
> index b13f5b61d96..b33123d6c75 100644
> --- a/gdb/infcall.c
> +++ b/gdb/infcall.c
> @@ -658,7 +658,7 @@ run_inferior_call (struct call_thread_fsm *sm,
>    if (!was_running
>        && ptid_equal (call_thread_ptid, inferior_ptid)
>        && stop_stack_dummy == STOP_STACK_DUMMY)
> -    finish_thread_state (user_visible_resume_ptid (0));
> +    finish_thread_state (pid_to_ptid (ptid_get_pid (inferior_ptid)));

I have to leave for now, so I have to admit to not having thought
through this one fully, but off hand this doesn't look right, so
I thought I'd send this quick comment anyway.

E.g., if in non-stop mode, that "finishes" all threads of the process, while
some thread may be user-visibly running but internally suspended waiting
for its turn in the displaced stepping queue, for example?

And what if "set schedule-multiple on" is in effect?  Then more than
one process will have been resumed, but this only finishes the one
process?

I'll have to think about the schedlock on + new threads thing too.
I've thought about that multiple times, but I never recall what
my previous conclusion was.  :-P

Thanks,
Pedro Alves


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