aboutsummaryrefslogtreecommitdiff
path: root/opcodes/cgen-asm.in
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2000-12-28 19:53:54 +0000
committerFrank Ch. Eigler <fche@redhat.com>2000-12-28 19:53:54 +0000
commit149fe25ee94d47858761726166e32626278fb97a (patch)
treec6a29b00ba96cb7d253810fc6b85666e0271c9a9 /opcodes/cgen-asm.in
parent799051fc87b3473f72cf37a74e28562dae9d7bd7 (diff)
downloadgdb-149fe25ee94d47858761726166e32626278fb97a.zip
gdb-149fe25ee94d47858761726166e32626278fb97a.tar.gz
gdb-149fe25ee94d47858761726166e32626278fb97a.tar.bz2
* error msg tweak
2000-12-28 Frank Ch. Eigler <fche@redhat.com> * cgen-asm.in (parse_insn_normal): Print better error message for instructions with missing operands.
Diffstat (limited to 'opcodes/cgen-asm.in')
-rw-r--r--opcodes/cgen-asm.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/opcodes/cgen-asm.in b/opcodes/cgen-asm.in
index ad6d172..9915f06 100644
--- a/opcodes/cgen-asm.in
+++ b/opcodes/cgen-asm.in
@@ -127,7 +127,7 @@ parse_insn_normal (cd, insn, strp, fields)
++ syn;
++ str;
}
- else
+ else if (*str)
{
/* Syntax char didn't match. Can't be this insn. */
static char msg [80];
@@ -136,6 +136,15 @@ parse_insn_normal (cd, insn, strp, fields)
*syn, *str);
return msg;
}
+ else
+ {
+ /* Ran out of input. */
+ static char msg [80];
+ /* xgettext:c-format */
+ sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"),
+ *syn);
+ return msg;
+ }
continue;
}