MCPcopy Create free account
hub / github.com/qilingframework/qiling / context_asm

Method context_asm

qiling/debugger/qdb/render/render.py:241–260  ·  view source on GitHub ↗

Disassemble srrounding instructions.

(self)

Source from the content-addressed store, hash-verified

239
240 @Render.divider_printer("[ DISASM ]", footer=True)
241 def context_asm(self) -> None:
242 """Disassemble srrounding instructions.
243 """
244
245 address = self.cur_addr
246 prediction = self.predictor.predict()
247
248 # assuming a single instruction is in the same size of a native pointer.
249 # this is not true for all architectures.
250 ptr = address - self.pointersize * self.disasm_num
251 listing = []
252
253 # taking disasm_num instructions before, current, and disasm_num instructions after
254 for _ in range(self.disasm_num * 2 + 1):
255 insn = self.disasm(ptr)
256 listing.append(insn)
257
258 ptr += insn.size
259
260 self.render_assembly(listing, address, prediction)

Callers 1

do_contextMethod · 0.45

Calls 4

disasmMethod · 0.80
render_assemblyMethod · 0.80
predictMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected