[PATCH v2] gdb/dap - Getting thread names

Tom Tromey tom@tromey.com
Wed Jun 14 15:05:35 GMT 2023


>>>>> Simon Farre via Gdb-patches <gdb-patches@sourceware.org> writes:

> So I couldn't determine right now, what operation of name change that
> GDB does not pick up, but with this patch, GDB will pick up the thread
> names for an applications that set the name of a thread in ways that
> aren't obvious.

I think gdb just reads the thread names on demand.  So, on Linux, it
doesn't really notice when they change.  (On Windows there's a different
mechanism and thread names can sometimes be seen by the debugger via an
SEH handler.)

Maybe gdb could use inotify on the comm files but it's probably not
really worthwhile.  For DAP, I don't think there's really a way to
notify the client of thread name changes anyway.

Anyway, this patch is ok.

Approved-By: Tom Tromey <tom@tromey.com>

Tom


More information about the Gdb-patches mailing list