Created attachment 11154 [details] gdbthread.h and thread.c When gdb is used with the rr record/replay tool, the thread number changes everytime a thread creation gets re-executed. For more information look at this rr issue: https://github.com/mozilla/rr/issues/2229 I fixed this bug, by saving a map with corresponding thread id's to thread numbers. When the thread id already existed, we are using the old thread number, if not everything stays the same. Normal using of gdb doesn't get affected, it only affects, when used with rr (and maybe other record/replay debugger...) I attach my changes in thread.c and gdbthread.h
Hi. Thanks for the patch. gdb patches should be sent to the gdb-patches list; see the contribution checklist for details: https://sourceware.org/gdb/wiki/ContributionChecklist