mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
Properly respect a disassemble x,y command (prior behavior would do
y-x instructions, no matter how wide each instruction was).
This commit is contained in:
parent
627260f89e
commit
193c83f646
@ -314,7 +314,7 @@ extern BOOL memory_get_current_stack(ADDRESS* address);
|
||||
extern BOOL memory_get_current_frame(ADDRESS* address);
|
||||
extern BOOL memory_get_string(HANDLE hp, void* addr, BOOL in_debuggee, BOOL unicode, char* buffer, int size);
|
||||
extern BOOL memory_get_string_indirect(HANDLE hp, void* addr, BOOL unicode, char* buffer, int size);
|
||||
extern void memory_disassemble(const struct dbg_lvalue*, const struct dbg_lvalue*, int offset);
|
||||
extern void memory_disassemble(const struct dbg_lvalue*, const struct dbg_lvalue*, int instruction_count);
|
||||
extern BOOL memory_disasm_one_insn(ADDRESS* addr);
|
||||
extern void print_bare_address(const ADDRESS* addr);
|
||||
extern void print_address(const ADDRESS* addr, BOOLEAN with_line);
|
||||
|
@ -598,9 +598,11 @@ BOOL memory_disasm_one_insn(ADDRESS* addr)
|
||||
}
|
||||
|
||||
void memory_disassemble(const struct dbg_lvalue* xstart,
|
||||
const struct dbg_lvalue* xend, int offset)
|
||||
const struct dbg_lvalue* xend, int instruction_count)
|
||||
{
|
||||
static ADDRESS last = {0,0,0};
|
||||
int stop = 0;
|
||||
int i;
|
||||
|
||||
if (!xstart && !xend)
|
||||
{
|
||||
@ -613,7 +615,10 @@ void memory_disassemble(const struct dbg_lvalue* xstart,
|
||||
last.Mode = AddrModeFlat;
|
||||
last.Offset = types_extract_as_integer(xstart);
|
||||
}
|
||||
if (xend) offset = types_extract_as_integer(xend) - last.Offset + 1;
|
||||
if (xend)
|
||||
stop = types_extract_as_integer(xend);
|
||||
}
|
||||
while (offset-- > 0 && memory_disasm_one_insn(&last));
|
||||
for (i = 0; (instruction_count == 0 || i < instruction_count) &&
|
||||
(stop == 0 || last.Offset <= stop); i++)
|
||||
memory_disasm_one_insn(&last);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user