diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-11 21:38:25 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-11 21:38:25 -0700 |
commit | 554bd0996872ffcadf808229cc38e445d6016dae (patch) | |
tree | 34ac4352ef3f8e7e5752d6b9237d711dff571bd3 | |
parent | be995e2193ba054488e9752373c07fc250b06026 (diff) | |
download | mu-554bd0996872ffcadf808229cc38e445d6016dae.tar.gz |
label offset computation still has a bug
I changed the test a little to make it obvious. Basically there's no way we can compute the segment offset correctly without knowing the segment name in the previous assertion.
-rw-r--r-- | subx/apps/survey.subx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx index abdd6939..0cedd7bc 100644 --- a/subx/apps/survey.subx +++ b/subx/apps/survey.subx @@ -671,6 +671,7 @@ test-compute-offsets: # == code 0x1 # ab x/imm32 # == data 0x1000 + # 00 # x: # 34 # @@ -679,8 +680,8 @@ test-compute-offsets: # segment 'code' has size 0x5 # segment 'data' is at file offset 0x5 # label 'x' is in segment 'data' - # label 'x' is at segment offset 0x0 - # segment 'data' has size 0x1 + # label 'x' is at segment offset 0x1 + # segment 'data' has size 0x2 # # . prolog 55/push-EBP @@ -805,10 +806,10 @@ test-compute-offsets: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP - # . check-trace-contains("segment 'data' has size 0x00000001.", msg) + # . check-trace-contains("segment 'data' has size 0x00000002.", msg) # . . push args 68/push "F - test-compute-offsets/3"/imm32 - 68/push "segment 'data' has size 0x00000001."/imm32 + 68/push "segment 'data' has size 0x00000002."/imm32 # . . call e8/call check-trace-contains/disp32 # . . discard args @@ -821,10 +822,10 @@ test-compute-offsets: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP - # . check-trace-contains("label 'x' is at segment offset 0x00000000.", msg) + # . check-trace-contains("label 'x' is at segment offset 0x00000001.", msg) # . . push args 68/push "F - test-compute-offsets/5"/imm32 - 68/push "label 'x' is at segment offset 0x00000000."/imm32 + 68/push "label 'x' is at segment offset 0x00000001."/imm32 # . . call e8/call check-trace-contains/disp32 # . . discard args |