This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[MI] Duplicate --thread-group flag not detected


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

> ./gdb
GNU gdb (GDB)
(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.

What about the 7_2 branch?

2010-11-25  Marc Khouzam  <>

	* 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"));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]