Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [MI] Duplicate --thread-group flag not detected
@ 2010-11-25 20:56 Marc Khouzam
  2010-11-26 16:39 ` Joel Brobecker
  0 siblings, 1 reply; 11+ messages in thread
From: Marc Khouzam @ 2010-11-25 20:56 UTC (permalink / raw)
  To: 'gdb-patches@sourceware.org'

Hi,

There is a missing 'else' in mi_parse() which prevents the
detection of a duplicate --thread-group flag.

> ./gdb
GNU gdb (GDB) 7.2.50.20101125-cvs
(gdb) interpreter-exec mi "-break-insert --thread-group i1 --thread-group i1 main"
^error,msg="mi_cmd_break_insert: Unknown option ``-thread-group''"

instead of giving an error about "Duplicate --thread-group flag".

No regressions.

Ok?
What about the 7_2 branch?

2010-11-25  Marc Khouzam  <marc.khouzam@ericsson.com>

	* mi/mi-parse.c (mi_parse): Missing else.

### Eclipse Workspace Patch 1.0
#P src
Index: gdb/mi/mi-parse.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-parse.c,v
retrieving revision 1.21
diff -u -r1.21 mi-parse.c
--- gdb/mi/mi-parse.c   17 May 2010 20:49:39 -0000      1.21
+++ gdb/mi/mi-parse.c   25 Nov 2010 20:43:31 -0000
@@ -319,7 +319,7 @@
          chp += 1;
          parse->thread_group = strtol (chp, &chp, 10);
        }
-      if (strncmp (chp, "--thread ", ts) == 0)
+      else if (strncmp (chp, "--thread ", ts) == 0)
        {
          if (parse->thread != -1)
            error (_("Duplicate '--thread' option"));


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

end of thread, other threads:[~2010-12-10 12:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-25 20:56 [MI] Duplicate --thread-group flag not detected Marc Khouzam
2010-11-26 16:39 ` Joel Brobecker
2010-12-02 16:40   ` Tom Tromey
2010-12-02 17:10     ` Joel Brobecker
2010-12-04 18:10       ` Marc Khouzam
2010-12-04 18:47         ` Joel Brobecker
2010-12-05 19:27           ` Marc Khouzam
2010-12-06 11:04             ` Joel Brobecker
2010-12-06 14:26               ` Marc Khouzam
2010-12-06 15:02               ` [MI] --thread-group test (was: RE: [MI] Duplicate --thread-group flag not detected) Marc Khouzam
2010-12-10 12:15                 ` Joel Brobecker

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