This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[MI][Patch] -exec-continue/interrupt --thread-group expects wrong id
- From: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 5 Jun 2009 13:33:58 -0400
- Subject: [MI][Patch] -exec-continue/interrupt --thread-group expects wrong id
Hi,
After Pedro kindly pointed out that there is a
--thread-group parameter to -exec-continue and -exec-interrupt
(how did I miss that?) I tried them out.
I found that they still expect the old form of the
threadGroupId (starting with a 'p').
The patch below fixes both methods.
This is hard to test since HEAD does not have a fully functional
multi-process, but I was able to confirm that the threadGroupId
gets properly accepted with my patch.
Thanks
marc
--- gdb/mi/mi-main.c 8 Apr 2009 06:58:37 -0000 1.147
+++ gdb/mi/mi-main.c 5 Jun 2009 17:15:42 -0000
@@ -205,7 +205,7 @@
int pid;
if (argv[1] == NULL || argv[1] == '\0')
error ("Thread group id not specified");
- pid = atoi (argv[1] + 1);
+ pid = atoi (argv[1]);
if (!in_inferior_list (pid))
error ("Invalid thread group id '%s'", argv[1]);
@@ -260,7 +260,7 @@
int pid;
if (argv[1] == NULL || argv[1] == '\0')
error ("Thread group id not specified");
- pid = atoi (argv[1] + 1);
+ pid = atoi (argv[1]);
if (!in_inferior_list (pid))
error ("Invalid thread group id '%s'", argv[1]);