Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [MI][Patch] -exec-continue/interrupt --thread-group expects wrong id
@ 2009-06-05 17:34 Marc Khouzam
  2009-06-05 18:36 ` Vladimir Prus
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Khouzam @ 2009-06-05 17:34 UTC (permalink / raw)
  To: gdb-patches

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]);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [MI][Patch] -exec-continue/interrupt --thread-group expects wrong id
  2009-06-05 17:34 [MI][Patch] -exec-continue/interrupt --thread-group expects wrong id Marc Khouzam
@ 2009-06-05 18:36 ` Vladimir Prus
  2009-06-05 18:42   ` Marc Khouzam
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2009-06-05 18:36 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

Marc Khouzam wrote:

> 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, I have applied this patch as attached. Please include changelog
entry for future patch submissions though -- somebody still has to write
them before "cvs commit" :-)

- Volodya

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: final.diff --]
[-- Type: text/x-diff; name="final.diff", Size: 1545 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.10553
diff -u -p -r1.10553 ChangeLog
--- ChangeLog	5 Jun 2009 18:08:52 -0000	1.10553
+++ ChangeLog	5 Jun 2009 18:33:36 -0000
@@ -1,3 +1,9 @@
+2009-06-05  Marc Khouzam <marc.khouzam@ericsson.com>
+
+	* mi/mi-main.c (mi_cmd_exec_continue)
+	(mi_cmd_exec_interrupt): Adjust parsing of thread group
+	ids to current reality, where they don't have any 'p' prefix.
+
 2009-06-05  Aleksandar Ristovski  <aristovski@qnx.com>
 
 	* corelow.c (core_open): Check for core_gdbarch before calling
Index: mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.149
diff -u -p -r1.149 mi-main.c
--- mi/mi-main.c	28 May 2009 01:09:20 -0000	1.149
+++ mi/mi-main.c	5 Jun 2009 18:33:37 -0000
@@ -205,7 +205,7 @@ mi_cmd_exec_continue (char *command, cha
       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 @@ mi_cmd_exec_interrupt (char *command, ch
       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]);
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE:  Re: [MI][Patch] -exec-continue/interrupt --thread-group expects wrong id
  2009-06-05 18:36 ` Vladimir Prus
@ 2009-06-05 18:42   ` Marc Khouzam
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Khouzam @ 2009-06-05 18:42 UTC (permalink / raw)
  To: Vladimir Prus, gdb-patches

 

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org 
> [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Vladimir Prus
> Sent: June-05-09 2:36 PM
> To: gdb-patches@sources.redhat.com
> Subject: Re: [MI][Patch] -exec-continue/interrupt 
> --thread-group expects wrong id
> 
> Marc Khouzam wrote:
> 
> > 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, I have applied this patch as attached. Please include 
> changelog
> entry for future patch submissions though -- somebody still 
> has to write
> them before "cvs commit" :-)

Woops, I forgot about the ChangeLog.

Thanks for applying!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-05 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05 17:34 [MI][Patch] -exec-continue/interrupt --thread-group expects wrong id Marc Khouzam
2009-06-05 18:36 ` Vladimir Prus
2009-06-05 18:42   ` Marc Khouzam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox