aboutsummaryrefslogtreecommitdiff
path: root/opcodes/m68k-dis.c
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
commitf095b97b59e3cc52388cb63f4495b352cfce37a3 (patch)
tree32aa7a86fd0310b7228e023bc4e9caf0f1b2716a /opcodes/m68k-dis.c
parenta2a8ff2ba094ca6e78b795743efd0408ef9dbbca (diff)
downloadgdb-f095b97b59e3cc52388cb63f4495b352cfce37a3.zip
gdb-f095b97b59e3cc52388cb63f4495b352cfce37a3.tar.gz
gdb-f095b97b59e3cc52388cb63f4495b352cfce37a3.tar.bz2
Fix buglet noticed while looking at PR 1298.
* m68k-dis.c (match_insn_m68k): Restore fprintf_func before printing error message.
Diffstat (limited to 'opcodes/m68k-dis.c')
-rw-r--r--opcodes/m68k-dis.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c
index 8fc70152..3094963 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;
}
}