diff options
author | Marc Khouzam <marc.khouzam@ericsson.com> | 2010-12-09 20:41:54 +0000 |
---|---|---|
committer | Marc Khouzam <marc.khouzam@ericsson.com> | 2010-12-09 20:41:54 +0000 |
commit | 30a7f059d8215866e82ed241cfe7bd6f6307a056 (patch) | |
tree | b973ed3b26497d02f52373f89b93aaf586071b30 /gdb | |
parent | de6d4f0568f7b3c1676b117f9ac563dd33a98014 (diff) | |
download | gdb-30a7f059d8215866e82ed241cfe7bd6f6307a056.zip gdb-30a7f059d8215866e82ed241cfe7bd6f6307a056.tar.gz gdb-30a7f059d8215866e82ed241cfe7bd6f6307a056.tar.bz2 |
* mi/mi-parse.c (mi_parse): Wrong error message.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/mi/mi-parse.c | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6199e4b..37c58a4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-12-09 Marc Khouzam <marc.khouzam@ericsson.com> + + * mi/mi-parse.c (mi_parse): Wrong error message. + 2010-12-09 Doug Evans <dje@google.com> * symfile.h (quick_symbol_functions): Clarify usage of diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c index 774d368..092cf72 100644 --- a/gdb/mi/mi-parse.c +++ b/gdb/mi/mi-parse.c @@ -297,7 +297,7 @@ mi_parse (char *cmd, char **token) to CLI. */ for (;;) { - char *start = chp; + const char *option; size_t as = sizeof ("--all ") - 1; size_t tgs = sizeof ("--thread-group ") - 1; size_t ts = sizeof ("--thread ") - 1; @@ -316,6 +316,7 @@ mi_parse (char *cmd, char **token) } if (strncmp (chp, "--thread-group ", tgs) == 0) { + option = "--thread-group"; if (parse->thread_group != -1) error (_("Duplicate '--thread-group' option")); chp += tgs; @@ -326,6 +327,7 @@ mi_parse (char *cmd, char **token) } else if (strncmp (chp, "--thread ", ts) == 0) { + option = "--thread"; if (parse->thread != -1) error (_("Duplicate '--thread' option")); chp += ts; @@ -333,6 +335,7 @@ mi_parse (char *cmd, char **token) } else if (strncmp (chp, "--frame ", fs) == 0) { + option = "--frame"; if (parse->frame != -1) error (_("Duplicate '--frame' option")); chp += fs; @@ -342,8 +345,7 @@ mi_parse (char *cmd, char **token) break; if (*chp != '\0' && !isspace (*chp)) - error (_("Invalid value for the '%s' option"), - start[2] == 't' ? "--thread" : "--frame"); + error (_("Invalid value for the '%s' option"), option); while (isspace (*chp)) chp++; } |