This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Print thread name when executing thread commands


Currently the thread family of commands only prints the thread ID and
PID. GDB also has access to the thread's name, which is often an easier
way of quickly identifying a thread. This simple patch uses the same
mechanism as `info threads' to get the name of a thread and add it to
the thread identifier line when it's printed.

I wrapped the name in []'s to offset it and make it visually distinct
from the ()'s that wrap the other thread information. I'm not at all
attached to this look, just looked best to me.

Diff should be from current cvs. This is my first patch to GDB, if I
messed something up don't hesitate to yell at me.

Bonus: solves my old SO question:
http://stackoverflow.com/questions/12679339/make-gdb-show-thread-names-on-apply-all-operations

-Pat

-- 
Pat Pannuto
NSF/NDSEG/Qualcomm Fellow
Computer Engineering
University of Michigan
248.990.4548

Attachment: print_thread_names.ChangeLog
Description: Binary data

Attachment: print_thread_names.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]