Hi All,
I am wondering if I could get some clarification on how the disassembly command (in the disassembly service, disassembly.c) is meant to deal with cases when
symbols are loaded.
The behavior I have noticed:
Command: Disassembly disassemble “ContextID” Addr 1 {}
This will return us at least 1 instruction (even though we’ve only specified one byte).
Then, we continue to ask for more instructions e.g.:
Command: Disassembly disassemble “ContextID” Addr 500 {}
And this will return us instructions up to the given size.
However –
we have noticed, with symbols loaded, that this will reach a “limit” on the size of instructions we can ask for (i.e. we reach a point where we cannot ask for more.
This means even if we ask for: Command: Disassembly disassemble “ContextID” Addr 1000 {}
We still get the same number of instructions returned.
This happens because of the following block:
if (sym_addr_ok && sym_size_ok &&
sym_addr <= buf_addr && sym_addr + sym_size > buf_addr &&
sym_addr + sym_size <= buf_addr + buf_size) {
buf_size = sym_addr + sym_size - buf_addr;
mem_size = (size_t)buf_size;
}
I am wondering if this behavior is expected, and if so – what the purpose of it is.
Kind Regards
David Wilson