mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-01 11:59:27 +08:00
Add thread-exit annotation.
gdb/ChangeLog 2019-04-26 Amos Bird <amosbird@gmail.com> * annotate.c (annotate_thread_exited): Add "thread-exited" annotation. gdb/doc/ChangeLog 2019-06-06 Amos Bird <amosbird@gmail.com> * annotate.texinfo (Multi-threaded Apps): Add entry for thread-exited annotation. gdb/testsuite/ChangeLog 2019-06-06 Amos Bird <amosbird@gmail.com> * gdb.base/annota1.exp (thread_switch): Add test for thread-exited annotation.
This commit is contained in:
@ -241,6 +241,19 @@ annotate_thread_changed (void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Emit notification on thread exit. */
|
||||
|
||||
static void
|
||||
annotate_thread_exited (struct thread_info *t, int silent)
|
||||
{
|
||||
if (annotation_level > 1)
|
||||
{
|
||||
printf_filtered(("\n\032\032thread-exited,"
|
||||
"id=\"%d\",group-id=\"i%d\"\n"),
|
||||
t->global_num, t->inf->num);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
annotate_field_begin (struct type *type)
|
||||
{
|
||||
@ -595,4 +608,5 @@ _initialize_annotate (void)
|
||||
gdb::observers::breakpoint_created.attach (breakpoint_changed);
|
||||
gdb::observers::breakpoint_deleted.attach (breakpoint_changed);
|
||||
gdb::observers::breakpoint_modified.attach (breakpoint_changed);
|
||||
gdb::observers::thread_exit.attach (annotate_thread_exited);
|
||||
}
|
||||
|
Reference in New Issue
Block a user