From 4694da01479181361c847bb9185c458e1ec51c46 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 19 Jan 2011 17:21:39 +0000 Subject: gdb PR mi/8618: * thread.c (free_thread): Free 'name'. (print_thread_info): Emit thread name. Change CLI output. (thread_name_command): New function. (do_captured_thread_select): Emit newline. (_initialize_thread): Register 'thread name' command. * target.h (struct target_ops) : New field. (target_thread_name): New macro. * target.c (update_current_target): Handle to_thread_name. * python/py-infthread.c (thpy_get_name): New function. (thpy_set_name): Likewise. (thread_object_getset): Add "name". * linux-nat.c (linux_nat_thread_name): New function. (linux_nat_add_target): Set to_thread_name. * gdbthread.h (struct thread_info) : New field. gdb/doc * gdb.texinfo (Threads): Document thread name output and `thread name' command. (Threads In Python): Document Thread.name attribute. (GDB/MI Thread Commands): Document thread attributes. gdb/testsuite * gdb.python/py-infthread.exp: Add thread tests. --- gdb/testsuite/gdb.threads/manythreads.exp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/testsuite/gdb.threads') diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp index 1bd3e8d..12a25b9 100644 --- a/gdb/testsuite/gdb.threads/manythreads.exp +++ b/gdb/testsuite/gdb.threads/manythreads.exp @@ -99,6 +99,9 @@ gdb_test_multiple $cmd $cmd { } } +gdb_test_no_output "thread name zardoz" "give a name to the thread" +gdb_test "info threads" ".*zardoz.*" "check thread name" + set message "second continue" gdb_test_multiple "continue" "second continue" { -re "error:.*$gdb_prompt $" { -- cgit v1.1