Sorry I missed this in the initial pr. Previously, using the context command would cause llef to render the disassembly the current instruction being the start of the frame, rather than at a frame offset. Thanks to @jthorpe6 for spotting this.
When reaching an instruction by stepping (si)
When running context, on that instruction
This is because the display_code function looked for the presence of an arrow marker to denote the current instruction, however this is not present in the SBExecutionContext that is passed via the context command. To fix this, the patch identifies the current instruction by comparing the disassembly addresses to the current PC
Thanks for the fix @XploitBengineer - this is a much nicer way of getting the current instruction. Tested on a bunch of architectures with no problems.
Sorry I missed this in the initial pr. Previously, using the context command would cause llef to render the disassembly the current instruction being the start of the frame, rather than at a frame offset. Thanks to @jthorpe6 for spotting this.
When reaching an instruction by stepping (si)
When running context, on that instruction
This is because the
display_code
function looked for the presence of an arrow marker to denote the current instruction, however this is not present in theSBExecutionContext
that is passed via the context command. To fix this, the patch identifies the current instruction by comparing the disassembly addresses to the current PC