On Tue, Feb 24, 2015 at 1:19 PM, Keno Fischer <kfisc...@college.harvard.edu> wrote: > The basic problem is the following. In, LLDB I get an instruction from the > target and then I ask the LLVM disassembler to disassemble it for me. > Depending on the instruction and what the arguments are, I can now construct > an unwind plan. I get an MCInst back from the disassembler, so what I want > to do is sth like: > > if (Inst.getOpcode() == Mips::Addiu || Inst.getOpcode() == Mips::DAddiu) { > // This is an addiu instruction, look at the registers and construct the > unwind plan > } > > but that enum is the one that's tablegen'd. I guess a possible interface > would be to ask for the opcode of an instruction by name? Seems somewhat > ugly though.
Equally ugly (and subject to silent breakage) would be to match the opcode names, as given by MCInstrInfo::getName. -Ahmed _______________________________________________ lldb-dev mailing list lldb-dev@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev