diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-03-08 17:15:19 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-03-08 17:15:19 -0800 |
commit | 7a22a21995001cbdf72c5e3b92f52c9abcee3202 (patch) | |
tree | b876c36d1788ee8d3c091e1ee05dacb6b839c44c /subx/012elf.cc | |
parent | 092cede5da0f329f2b624d31cfe76136cfc6a6ed (diff) | |
download | mu-7a22a21995001cbdf72c5e3b92f52c9abcee3202.tar.gz |
4996 - back on pack.subx
Yet another redrawing of responsibilities between convert and its helpers. In the process I discovered a bug in `write-stream-buffered` which ended up taking me through a detour to extract `browse_trace` into its own tool. It turns out just having long buffers is enough to need browse_trace. Simple operations like clearing a stream swamp a flat view of the trace.
Diffstat (limited to 'subx/012elf.cc')
-rw-r--r-- | subx/012elf.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subx/012elf.cc b/subx/012elf.cc index c9bbfc70..0f058504 100644 --- a/subx/012elf.cc +++ b/subx/012elf.cc @@ -145,10 +145,10 @@ void dump_stack() { ostringstream out; trace(Callstack_depth+1, "run") << "stack:" << end(); for (uint32_t a = AFTER_STACK-4; a > Reg[ESP].u; a -= 4) - trace(Callstack_depth+1, "run") << " 0x" << HEXWORD << a << " => 0x" << HEXWORD << read_mem_u32(a) << end(); - trace(Callstack_depth+1, "run") << " 0x" << HEXWORD << Reg[ESP].u << " => 0x" << HEXWORD << read_mem_u32(Reg[ESP].u) << " <=== ESP" << end(); + trace(Callstack_depth+2, "run") << " 0x" << HEXWORD << a << " => 0x" << HEXWORD << read_mem_u32(a) << end(); + trace(Callstack_depth+2, "run") << " 0x" << HEXWORD << Reg[ESP].u << " => 0x" << HEXWORD << read_mem_u32(Reg[ESP].u) << " <=== ESP" << end(); for (uint32_t a = Reg[ESP].u-4; a > Reg[ESP].u-40; a -= 4) - trace(Callstack_depth+1, "run") << " 0x" << HEXWORD << a << " => 0x" << HEXWORD << read_mem_u32(a) << end(); + trace(Callstack_depth+2, "run") << " 0x" << HEXWORD << a << " => 0x" << HEXWORD << read_mem_u32(a) << end(); } inline uint32_t u32_in(uint8_t* p) { |