[RFA] 'set print thread-events' to control printing of thread start/exit messages

Chris Demetriou cgd@google.com
Thu Dec 20 13:46:00 GMT 2007


[hi!  long time no see!]

The attached patch makes the printing of thread start/exit messages on
Linux configurable via 'set print thread-events'.  (A coworker
commented that for the benchmarks he was trying to debug, printing of
thread start/exit messages was ... quite tedious.  And i figured a
patch would be ... quite straightforward.)

I'm ambivalent about the name of the new option, and the location of
the option in the docs.  I'm willing to listen to suggestions
(especially from approvers! 8-) of better alternatives.


Built w/ gdb head sources as of 2007-12-19 mid-day (US/Pacific),
configured w/ host/target/build=i686-linux, tested with the new test
("make RUNTESTFLAGS=thread_events.exp") + using "info .../gdb.info" to
view the new docs.




chris
----
[gdb/ChangeLog]
2007-12-19  Chris Demetriou  <cgd@google.com>

        * gdbthread.h (print_thread_events): New variable declaration.
        * thread.c (print_thread_events): New variable definition.
        (show_print_thread_events): New function.
        (_initialize_thread): Add "set print thread-events" and
        "show print thread-events" commands.
        * linux-thread-db.c (check_event): Make attach_thread and
        detach_thread be verbose only if print_thread_events is set.

[gdb/doc/ChangeLog]
2007-12-19  Chris Demetriou  <cgd@google.com>

        * gdb.texinfo (Threads): Document new "set print thread-events"
        and "show print thread-events" commands.

[gdb/testsuite/ChangeLog]
2007-12-19  Chris Demetriou  <cgd@google.com>

        * gdb.threads/thread_events.c: New testcase source file.
        * gdb.threads/thread_events.exp: New testcase expect file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb_thread_event_messages.patch
Type: application/octet-stream
Size: 11735 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20071220/c0b10833/attachment.obj>


More information about the Gdb-patches mailing list