This is the mail archive of the gdb-patches@sourceware.org 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] Wrong error message when parsing invalid --thread-group


Hi,

with the fix of
http://sourceware.org/ml/gdb-patches/2010-12/msg00049.html
that added a missing else clause, another latent (mini) issue came out.

(gdb) interpreter-exec mi "28-break-insert --thread-group ix"
28^error,msg="Invalid value for the '--thread' option"

The error msg says "thread" instead of "thread-group".

Here is a fix.
Ok for HEAD and 7_2? (this is not so important for 7_2)

Thanks

2010-12-07  Marc Khouzam  <marc.khouzam@ericsson.com>

	* mi/mi-parse.c (mi_parse): Wrong error message.
        
### 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.2.1
diff -u -r1.21.2.1 mi-parse.c
--- gdb/mi/mi-parse.c   6 Dec 2010 14:23:40 -0000       1.21.2.1
+++ gdb/mi/mi-parse.c   8 Dec 2010 01:09:37 -0000
@@ -338,7 +338,8 @@
 
       if (*chp != '\0' && !isspace (*chp))
        error (_("Invalid value for the '%s' option"),
-              start[2] == 't' ? "--thread" : "--frame");
+              start[2] == 'f' ? "--frame" :
+                start[8] == '-' ? "--thread-group" : "--thread");
       while (isspace (*chp))
        chp++;
     }


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