summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2006-04-29 03:11:31 +0000
committerJim Wilson <wilson@tuliptree.org>2006-04-29 03:11:31 +0000
commitf1c36c77a06875505ab7f0bfee5035268dfd1393 (patch)
tree9809233121ff949ac7010377476d32a424fb3156
parentb0e59197b7520aebd3a30b609b0d37cd68d47d6c (diff)
downloadgdb-f1c36c77a06875505ab7f0bfee5035268dfd1393.tar.gz
Fix buglet noticed while looking at PR 1298.
* m68k-dis.c (match_insn_m68k): Restore fprintf_func before printing error message.
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/m68k-dis.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index e786c1cc600..84ecdcfcbd7 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-28 James E Wilson <wilson@specifix.com>
+
+ * m68k-dis.c (match_insn_m68k): Restore fprintf_func before printing
+ error message.
+
2006-04-28 Thiemo Seufer <ths@mips.com>
David Ung <davidu@mips.com>
Nigel Stephens <nigel@mips.com>
diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c
index 8fc70152663..309496381de 100644
--- a/opcodes/m68k-dis.c
+++ b/opcodes/m68k-dis.c
@@ -1308,12 +1308,14 @@ match_insn_m68k (bfd_vma memaddr,
}
else
{
+ /* We must restore the print functions before trying to print the
+ error message. */
+ info->fprintf_func = save_printer;
+ info->print_address_func = save_print_address;
info->fprintf_func (info->stream,
/* xgettext:c-format */
_("<internal error in opcode table: %s %s>\n"),
best->name, best->args);
- info->fprintf_func = save_printer;
- info->print_address_func = save_print_address;
return 2;
}
}