ARM: Improved IT disassembly

Richard Earnshaw Richard.Earnshaw@arm.com
Thu Jun 9 16:50:00 GMT 2005


On Thu, 2005-06-09 at 17:43, Zack Weinberg wrote:
> Richard Earnshaw <Richard.Earnshaw@arm.com> writes:
> 
> >
> > I'm not very keen on the abort in ifthen_step.  It seems likely to me
> > that disassembling random single instructions from within GDB would
> > likely hit that without trying too hard.  It's one thing to cache known
> > state and try to reuse it to accelerate object disassembly, but we must
> > recover cleanly if a user does, say,
> >
> > (gdb) x/i $pc
> > .... iteee eq
> > (gdb) x/5i $pc-32
> 
> I'm honestly at a loss for any other viable approach.  The instruction
> encoding doesn't lend itself to scanning backward, and in any case, in
> print_insn I have no information to say where a backward scan should
> stop.
> 
> zw

There is a reasonable bound (any code label must be on an instruction
boundary) and scanning back should converge rapidly.  I'll send you a
private mail with the details, but it will have to wait until tomorrow
now.

R.



More information about the Binutils mailing list