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

Tom Tromey
2023-09-19T16:33:41Z

>>>>> "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.

Tom