Re: [PATCH v5] gdb/gcore: interrupt all threads before generating the corefile

Simon Marchi via Gdb-patches
2023-02-10T21:46:51Z

On 1/30/23 11:51, Lancelot SIX wrote:
> Hi, this V5 follows
> https://sourceware.org/pipermail/gdb-patches/2022-December/194504.html.
>
> Changes since V4:
>
> - Update gdb/NEWS to fall into the "Changes since GDB 13" section.
> - Use "build_executable" instead of "prepare_for_testing" in the test
> to avoid one useless start of GDB.
> - Updated the test's description.
> - Updated the copyright year to include 2023.
>
> Best,
> Lancelot.

Hi Lancelot,

It seems like this version does not address the comment I made on v4,
the "what if a thread is doing an inline step" when we call this. Maybe
another way to look at it is, if the inferior was resumed with schedlock
on. Only one thread is "executing", and any_thread_of_inferior could
fall on a non-executing thread. Also, we'd want to end in the same
state as where we started. Can you check that case (with schedlock)? I
have the feeling that it's not handled.

Simon