[patch] m68k-dis.c: Don't get stuck in a strange state.

Daniel Jacobowitz drow@false.org
Mon Apr 9 15:40:00 GMT 2007


On Wed, Apr 04, 2007 at 05:21:39PM -0700, Kazu Hirata wrote:
> The patch fixes the problem by restoring insn->fprintf_func and
> insn->print_address_func in print_insn_m68k when longjmp is used.
> 
> Now, I admit that this solution is a bit dirty.  Specifically, this
> patch exposes the fact that match_insn_m68k temporarily replaces
> insn->fprintf_func and insn->print_address_func.
> 
> Perhaps, a real fix is to report a FETCH_DATA failure with a return
> value of some sort, without using setjmp/longjmp.  A better fix may be
> to teach the m68k disassembler do its job without temporarily
> replacing insn->fprintf_func and insn->print_address_func, but that
> sounds like too big a surgery.
> 
> OK to apply?
> 
> Kazu Hirata
> 
> opcodes/
> 2007-04-04  Kazu Hirata  <kazu@codesourcery.com>
> 
> 	* m68k-dis.c (print_insn_m68k): Restore info->fprintf_func and
> 	info->print_address_func if longjmp is called.

I agree with your reasoning; this is OK to apply.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list