diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2010-06-05 05:56:02 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2010-06-05 05:56:02 +0000 |
commit | 2f29611481c5b740af6b2f61ec90a1359296a95b (patch) | |
tree | 279d831d0461fc0dc55f90e12cb07404c38f83c9 /gdb/mi | |
parent | dbc313398f0ad07b649e654341b0c83922c52621 (diff) | |
download | gdb-2f29611481c5b740af6b2f61ec90a1359296a95b.zip gdb-2f29611481c5b740af6b2f61ec90a1359296a95b.tar.gz gdb-2f29611481c5b740af6b2f61ec90a1359296a95b.tar.bz2 |
* mi/mi-main.c (mi_cmd_list_thread_groups): Adjust
for current naming of thread groups (iN, not N).
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-main.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index c9472ed..ec6753d 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -817,10 +817,15 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc) for (; optind < argc; ++optind) { char *end; - int inf = strtoul (argv[optind], &end, 0); + int inf; + + if (*(argv[optind]) != 'i') + error ("invalid syntax of group id '%s'", argv[optind]); + + inf = strtoul (argv[optind] + 1, &end, 0); if (*end != '\0') - error ("invalid group id '%s'", argv[optind]); + error ("invalid syntax of group id '%s'", argv[optind]); VEC_safe_push (int, ids, inf); } if (VEC_length (int, ids) > 1) @@ -837,11 +842,13 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc) else if (VEC_length (int, ids) == 1) { /* Local thread groups, single id. */ - int pid = *VEC_address (int, ids); + int id = *VEC_address (int, ids); + struct inferior *inf = find_inferior_id (id); - if (!in_inferior_list (pid)) - error ("Invalid thread group id '%d'", pid); - print_thread_info (uiout, -1, pid); + if (!inf) + error ("Non-existent thread group id '%d'", id); + + print_thread_info (uiout, -1, inf->pid); } else { |