aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-02-21 23:40:47 +0000
committerMichael Snyder <msnyder@vmware.com>2011-02-21 23:40:47 +0000
commitaea5b2797c9c4e3a33c9a9ebd14614165486c293 (patch)
tree790a4578852964b7974de41d2b7503cfc1b8f445 /gdb/mi
parentdfa58db10cd0f761a650f63cd47c15423cda88de (diff)
downloadgdb-aea5b2797c9c4e3a33c9a9ebd14614165486c293.zip
gdb-aea5b2797c9c4e3a33c9a9ebd14614165486c293.tar.gz
gdb-aea5b2797c9c4e3a33c9a9ebd14614165486c293.tar.bz2
2011-02-21 Michael Snyder <msnyder@vmware.com>
* gdbthread.h (print_thread_info): Change prototype. * thread.c (print_thread_info): Accept char* instead of int for requested_threads argument. Use new function number_is_in_list to determine which threads to list. (info_threads_command): Pass char* to print_thread_info. * cli/cli-utils.c (number_is_in_list): New function. * cli/cli-utils.h (number_is_in_list): Export. * mi/mi-main.c (mi_cmd_thread_info): Pass char* to print_thread_info. (print_one_inferior): Ditto. (mi_cmd_list_thread_groups): Ditto. 2011-02-21 Michael Snyder <msnyder@vmware.com> * gdb.threads/thread-find.exp: Update patterns for changes in output of "info threads" command.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 1f1b712..6ffe207 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -503,15 +503,10 @@ mi_cmd_thread_list_ids (char *command, char **argv, int argc)
void
mi_cmd_thread_info (char *command, char **argv, int argc)
{
- int thread = -1;
-
if (argc != 0 && argc != 1)
error ("Invalid MI command");
- if (argc == 1)
- thread = atoi (argv[0]);
-
- print_thread_info (uiout, thread, -1);
+ print_thread_info (uiout, argv[0], -1);
}
struct collect_cores_data
@@ -607,7 +602,7 @@ print_one_inferior (struct inferior *inferior, void *xdata)
}
if (top_data->recurse)
- print_thread_info (uiout, -1, inferior->pid);
+ print_thread_info (uiout, NULL, inferior->pid);
do_cleanups (back_to);
}
@@ -872,7 +867,7 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc)
if (!inf)
error ("Non-existent thread group id '%d'", id);
- print_thread_info (uiout, -1, inf->pid);
+ print_thread_info (uiout, NULL, inf->pid);
}
else
{