Re: [PATCH v2 1/2] gdb: keep record of thread numbers for reverse execution targets

Pedro Alves
2023-09-20T16:43:11Z

On 2023-09-19 17:33, Tom Tromey wrote:
>>>>>> "Magne" == Magne Hov via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Magne> Targets that support reverse execution may report threads that have
> Magne> previously been seen to exit. Currently, GDB assigns a new thread
> Magne> number every time it sees the same thread (re)appearing, but this is
> Magne> problematic because it makes the output of `info threads` inconsistent,
> Magne> and because thread-specific breakpoints depend on stable thread-numbers
> Magne> in order to stop on the right thread.
>
> Thank you for the patch.
>
> Magne> + std::unordered_map<ptid_t, std::pair<int, int>, hash_ptid> ptid_thread_num_map;
>
> You'll have to update this for the hash_ptid -> std::hash<ptid_t>
> change. However, that's trivial.

I think I have some concerns. Could you hold off a bit?

Sorry I've not managed to stay on top of patch as I'd wish I would.