diff options
author | Alon Zakai <azakai@google.com> | 2020-10-27 10:42:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 10:42:07 -0700 |
commit | 6c28516678b12fb04715c046b39f256cd26d0726 (patch) | |
tree | 2ea7a194d362f94e3cc4949966ab89360dad57df | |
parent | 9a174f0ce9dc44b74db0e04728de62e6556176f9 (diff) | |
download | binaryen-6c28516678b12fb04715c046b39f256cd26d0726.tar.gz binaryen-6c28516678b12fb04715c046b39f256cd26d0726.tar.bz2 binaryen-6c28516678b12fb04715c046b39f256cd26d0726.zip |
DWARF: Fix handling of the end of control flow instructions (#3288)
Previously when we processed a block for example, we'd do this:
;; start is here
(block (result type)
;; end is here
.. contents ..
)
;; end delimiter is here
Not how this represents the block's start and end as the "header", and
uses an extra delimiter to mark the end.
I think this is wrong, and was an attempt to handle some offsets from
LLVM that otherwise made no sense, ones at the end of the "header".
But it turns out that this makes us completely incorrect on some things
where there is a low/high pc pair, and we need to understand that the
end of a block is at the end opcode at the very end, and not the end of
the header. This PR changes us to do that, i.e.
;; start is here
(block (result type)
.. contents ..
)
;; end is here
This fixes a testcase already in the test suite,
test/passes/fib_nonzero-low-pc_dwarf.bin.txt
where you can see that lexical block now has a valid value for the end, and
not a 0 (the proper scope extends all the way to the end of the big block in
that function, and is now the same in the DWARF before and after we
process it). test/passes/fannkuch3_dwarf.bin.txt is also improved by
this.
To implement this, this removes the BinaryLocations::End delimeter. After
this we just need one type of delimiter actually, but I didn't refactor that any
more to keep this PR small (see TODO).
This removes an assertion in writeDebugLocationEnd() that is no longer
valid: the assert ensures that we wrote an end only if there was a 0 for
the end, but for a control flow structure, we write the end of the "header"
automatically like for any expression, and then overwrite it later when we
finish writing the children and the end marker. We could in theory special-case
control flow structures to avoid the first write, but it would add more complexity.
This uncovered what appears to be a possible bug in our debug_line
handling, see test/passes/fannkuch3_manyopts_dwarf.bin.txt. That needs
to be looked into more, but I suspect that was invalid info from when we
looked at the end of the "header" of control flow structures. Note that there
was one definite bug uncovered here, fixed by the extra
} else if (locationUpdater.hasOldExprEnd(oldAddr)) {
that is added here, which was definitely a bug.
-rw-r--r-- | src/wasm.h | 17 | ||||
-rw-r--r-- | src/wasm/wasm-binary.cpp | 18 | ||||
-rw-r--r-- | src/wasm/wasm-debug.cpp | 2 | ||||
-rw-r--r-- | src/wasm/wasm-stack.cpp | 4 | ||||
-rw-r--r-- | test/passes/fannkuch3_dwarf.bin.txt | 2 | ||||
-rw-r--r-- | test/passes/fannkuch3_manyopts_dwarf.bin.txt | 340 | ||||
-rw-r--r-- | test/passes/fib_nonzero-low-pc_dwarf.bin.txt | 2 |
7 files changed, 181 insertions, 204 deletions
diff --git a/src/wasm.h b/src/wasm.h index 04e2faeb3..295088780 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1413,10 +1413,10 @@ struct BinaryLocations { // control flow, have, like 'end' for loop and block. We keep these in a // separate map because they are rare and we optimize for the storage space // for the common type of instruction which just needs a Span. We implement - // this as a simple struct with two elements (as two extra elements is the - // maximum currently needed; due to 'catch' and 'end' for try-catch). The - // second value may be 0, indicating it is not used. - struct DelimiterLocations : public std::array<BinaryLocation, 2> { + // this as a simple array with one element at the moment (more elements may + // be necessary in the future). + // TODO: If we are sure we won't need more, make this a single value? + struct DelimiterLocations : public std::array<BinaryLocation, 1> { DelimiterLocations() { // Ensure zero-initialization. for (auto& item : *this) { @@ -1425,14 +1425,7 @@ struct BinaryLocations { } }; - enum DelimiterId { - // All control flow structures have an end, so use index 0 for that. - End = 0, - // Use index 1 for all other current things. - Else = 1, - Catch = 1, - Invalid = -1 - }; + enum DelimiterId { Else = 0, Catch = 0, Invalid = -1 }; std::unordered_map<Expression*, DelimiterLocations> delimiters; // DWARF debug info can refer to multiple interesting positions in a function. diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 5c25fd0d2..0c56af8e0 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -865,7 +865,6 @@ void WasmBinaryWriter::writeDebugLocation(Expression* curr, Function* func) { void WasmBinaryWriter::writeDebugLocationEnd(Expression* curr, Function* func) { if (func && !func->expressionLocations.empty()) { auto& span = binaryLocations.expressions.at(curr); - assert(span.end == 0); span.end = o.size(); } } @@ -2580,7 +2579,12 @@ BinaryConsts::ASTNodes WasmBinaryBuilder::readExpression(Expression*& curr) { break; case BinaryConsts::End: curr = nullptr; - continueControlFlow(BinaryLocations::End, startPos); + // Pop the current control flow structure off the stack. If there is none + // then this is the "end" of the function itself, which also emits an + // "end" byte. + if (!controlFlowStack.empty()) { + controlFlowStack.pop_back(); + } break; case BinaryConsts::Else: curr = nullptr; @@ -2808,22 +2812,12 @@ void WasmBinaryBuilder::startControlFlow(Expression* curr) { void WasmBinaryBuilder::continueControlFlow(BinaryLocations::DelimiterId id, BinaryLocation pos) { if (DWARF && currFunction) { - if (controlFlowStack.empty()) { - // We reached the end of the function, which is also marked with an - // "end", like a control flow structure. - assert(id == BinaryLocations::End); - assert(pos + 1 == endOfFunction); - return; - } assert(!controlFlowStack.empty()); auto currControlFlow = controlFlowStack.back(); // We are called after parsing the byte, so we need to subtract one to // get its position. currFunction->delimiterLocations[currControlFlow][id] = pos - codeSectionLocation; - if (id == BinaryLocations::End) { - controlFlowStack.pop_back(); - } } } diff --git a/src/wasm/wasm-debug.cpp b/src/wasm/wasm-debug.cpp index 0f37374b5..448bcaaa9 100644 --- a/src/wasm/wasm-debug.cpp +++ b/src/wasm/wasm-debug.cpp @@ -680,6 +680,8 @@ static void updateDebugLines(llvm::DWARFYAML::Data& data, newAddr = locationUpdater.getNewFuncStart(oldAddr); } else if (locationUpdater.hasOldDelimiter(oldAddr)) { newAddr = locationUpdater.getNewDelimiter(oldAddr); + } else if (locationUpdater.hasOldExprEnd(oldAddr)) { + newAddr = locationUpdater.getNewExprEnd(oldAddr); } if (newAddr && state.needToEmit()) { // LLVM sometimes emits the same address more than once. We should diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 2ec156eea..1d290f53c 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -1880,10 +1880,10 @@ void BinaryInstWriter::visitArrayLen(ArrayLen* curr) { void BinaryInstWriter::emitScopeEnd(Expression* curr) { assert(!breakStack.empty()); breakStack.pop_back(); + o << int8_t(BinaryConsts::End); if (func && !sourceMap) { - parent.writeExtraDebugLocation(curr, func, BinaryLocations::End); + parent.writeDebugLocationEnd(curr, func); } - o << int8_t(BinaryConsts::End); } void BinaryInstWriter::emitFunctionEnd() { o << int8_t(BinaryConsts::End); } diff --git a/test/passes/fannkuch3_dwarf.bin.txt b/test/passes/fannkuch3_dwarf.bin.txt index 84be99be5..ae8a30e65 100644 --- a/test/passes/fannkuch3_dwarf.bin.txt +++ b/test/passes/fannkuch3_dwarf.bin.txt @@ -2851,7 +2851,7 @@ Abbrev table for offset: 0x00000000 0x00000278: DW_TAG_inlined_subroutine [24] * DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x01a8 => {0x000001a8} "_ZL8fannkuchi") DW_AT_low_pc [DW_FORM_addr] (0x00000000000003ec) - DW_AT_high_pc [DW_FORM_data4] (0x0000026c) + DW_AT_high_pc [DW_FORM_data4] (0x0000029e) DW_AT_call_file [DW_FORM_data1] ("/usr/local/google/home/azakai/Dev/emscripten/tests/fannkuch.cpp") DW_AT_call_line [DW_FORM_data1] (159) DW_AT_call_column [DW_FORM_data1] (0x29) diff --git a/test/passes/fannkuch3_manyopts_dwarf.bin.txt b/test/passes/fannkuch3_manyopts_dwarf.bin.txt index 36c9db37b..20b59c325 100644 --- a/test/passes/fannkuch3_manyopts_dwarf.bin.txt +++ b/test/passes/fannkuch3_manyopts_dwarf.bin.txt @@ -2303,7 +2303,7 @@ Contains section .debug_info (851 bytes) Contains section .debug_loc (1073 bytes) Contains section .debug_ranges (88 bytes) Contains section .debug_abbrev (333 bytes) -Contains section .debug_line (2702 bytes) +Contains section .debug_line (2682 bytes) Contains section .debug_str (434 bytes) .debug_abbrev contents: @@ -3119,7 +3119,7 @@ Abbrev table for offset: 0x00000000 .debug_line contents: debug_line[0x00000000] Line table prologue: - total_length: 0x00000a8a + total_length: 0x00000a76 version: 4 prologue_length: 0x000000dd min_inst_length: 1 @@ -4364,299 +4364,287 @@ file_names[ 4]: 0x0000000000000547 122 14 1 0 0 -0x000008a5: 00 DW_LNE_set_address (0x000000000000054c) -0x000008ac: 03 DW_LNS_advance_line (130) -0x000008ae: 06 DW_LNS_negate_stmt -0x000008af: 01 DW_LNS_copy - 0x000000000000054c 130 14 1 0 0 is_stmt - - -0x000008b0: 00 DW_LNE_set_address (0x000000000000054d) -0x000008b7: 03 DW_LNS_advance_line (110) -0x000008b9: 05 DW_LNS_set_column (11) -0x000008bb: 01 DW_LNS_copy +0x000008a5: 00 DW_LNE_set_address (0x000000000000054d) +0x000008ac: 03 DW_LNS_advance_line (110) +0x000008ae: 05 DW_LNS_set_column (11) +0x000008b0: 06 DW_LNS_negate_stmt +0x000008b1: 01 DW_LNS_copy 0x000000000000054d 110 11 1 0 0 is_stmt -0x000008bc: 00 DW_LNE_set_address (0x0000000000000559) -0x000008c3: 03 DW_LNS_advance_line (113) -0x000008c5: 05 DW_LNS_set_column (10) -0x000008c7: 01 DW_LNS_copy +0x000008b2: 00 DW_LNE_set_address (0x0000000000000559) +0x000008b9: 03 DW_LNS_advance_line (113) +0x000008bb: 05 DW_LNS_set_column (10) +0x000008bd: 01 DW_LNS_copy 0x0000000000000559 113 10 1 0 0 is_stmt -0x000008c8: 00 DW_LNE_set_address (0x000000000000055c) -0x000008cf: 03 DW_LNS_advance_line (118) -0x000008d1: 05 DW_LNS_set_column (16) -0x000008d3: 01 DW_LNS_copy +0x000008be: 00 DW_LNE_set_address (0x000000000000055c) +0x000008c5: 03 DW_LNS_advance_line (118) +0x000008c7: 05 DW_LNS_set_column (16) +0x000008c9: 01 DW_LNS_copy 0x000000000000055c 118 16 1 0 0 is_stmt -0x000008d4: 00 DW_LNE_set_address (0x0000000000000565) -0x000008db: 03 DW_LNS_advance_line (119) -0x000008dd: 05 DW_LNS_set_column (10) -0x000008df: 01 DW_LNS_copy +0x000008ca: 00 DW_LNE_set_address (0x0000000000000565) +0x000008d1: 03 DW_LNS_advance_line (119) +0x000008d3: 05 DW_LNS_set_column (10) +0x000008d5: 01 DW_LNS_copy 0x0000000000000565 119 10 1 0 0 is_stmt -0x000008e0: 00 DW_LNE_set_address (0x0000000000000567) -0x000008e7: 05 DW_LNS_set_column (18) -0x000008e9: 06 DW_LNS_negate_stmt -0x000008ea: 01 DW_LNS_copy +0x000008d6: 00 DW_LNE_set_address (0x0000000000000567) +0x000008dd: 05 DW_LNS_set_column (18) +0x000008df: 06 DW_LNS_negate_stmt +0x000008e0: 01 DW_LNS_copy 0x0000000000000567 119 18 1 0 0 -0x000008eb: 00 DW_LNE_set_address (0x0000000000000570) -0x000008f2: 05 DW_LNS_set_column (10) -0x000008f4: 01 DW_LNS_copy +0x000008e1: 00 DW_LNE_set_address (0x0000000000000570) +0x000008e8: 05 DW_LNS_set_column (10) +0x000008ea: 01 DW_LNS_copy 0x0000000000000570 119 10 1 0 0 -0x000008f5: 00 DW_LNE_set_address (0x0000000000000572) -0x000008fc: 05 DW_LNS_set_column (23) -0x000008fe: 01 DW_LNS_copy +0x000008eb: 00 DW_LNE_set_address (0x0000000000000572) +0x000008f2: 05 DW_LNS_set_column (23) +0x000008f4: 01 DW_LNS_copy 0x0000000000000572 119 23 1 0 0 -0x000008ff: 00 DW_LNE_set_address (0x0000000000000577) -0x00000906: 03 DW_LNS_advance_line (118) -0x00000908: 05 DW_LNS_set_column (16) -0x0000090a: 06 DW_LNS_negate_stmt -0x0000090b: 01 DW_LNS_copy +0x000008f5: 00 DW_LNE_set_address (0x0000000000000577) +0x000008fc: 03 DW_LNS_advance_line (118) +0x000008fe: 05 DW_LNS_set_column (16) +0x00000900: 06 DW_LNS_negate_stmt +0x00000901: 01 DW_LNS_copy 0x0000000000000577 118 16 1 0 0 is_stmt -0x0000090c: 00 DW_LNE_set_address (0x0000000000000582) -0x00000913: 05 DW_LNS_set_column (7) -0x00000915: 06 DW_LNS_negate_stmt -0x00000916: 01 DW_LNS_copy +0x00000902: 00 DW_LNE_set_address (0x0000000000000582) +0x00000909: 05 DW_LNS_set_column (7) +0x0000090b: 06 DW_LNS_negate_stmt +0x0000090c: 01 DW_LNS_copy 0x0000000000000582 118 7 1 0 0 -0x00000917: 00 DW_LNE_set_address (0x0000000000000588) -0x0000091e: 03 DW_LNS_advance_line (122) -0x00000920: 05 DW_LNS_set_column (16) -0x00000922: 06 DW_LNS_negate_stmt -0x00000923: 01 DW_LNS_copy +0x0000090d: 00 DW_LNE_set_address (0x0000000000000588) +0x00000914: 03 DW_LNS_advance_line (122) +0x00000916: 05 DW_LNS_set_column (16) +0x00000918: 06 DW_LNS_negate_stmt +0x00000919: 01 DW_LNS_copy 0x0000000000000588 122 16 1 0 0 is_stmt -0x00000924: 00 DW_LNE_set_address (0x000000000000058d) -0x0000092b: 05 DW_LNS_set_column (14) -0x0000092d: 06 DW_LNS_negate_stmt -0x0000092e: 01 DW_LNS_copy +0x0000091a: 00 DW_LNE_set_address (0x000000000000058d) +0x00000921: 05 DW_LNS_set_column (14) +0x00000923: 06 DW_LNS_negate_stmt +0x00000924: 01 DW_LNS_copy 0x000000000000058d 122 14 1 0 0 -0x0000092f: 00 DW_LNE_set_address (0x0000000000000596) -0x00000936: 03 DW_LNS_advance_line (125) -0x00000938: 05 DW_LNS_set_column (22) -0x0000093a: 06 DW_LNS_negate_stmt -0x0000093b: 01 DW_LNS_copy +0x00000925: 00 DW_LNE_set_address (0x0000000000000596) +0x0000092c: 03 DW_LNS_advance_line (125) +0x0000092e: 05 DW_LNS_set_column (22) +0x00000930: 06 DW_LNS_negate_stmt +0x00000931: 01 DW_LNS_copy 0x0000000000000596 125 22 1 0 0 is_stmt -0x0000093c: 00 DW_LNE_set_address (0x00000000000005a3) -0x00000943: 03 DW_LNS_advance_line (126) -0x00000945: 05 DW_LNS_set_column (27) -0x00000947: 01 DW_LNS_copy +0x00000932: 00 DW_LNE_set_address (0x00000000000005a3) +0x00000939: 03 DW_LNS_advance_line (126) +0x0000093b: 05 DW_LNS_set_column (27) +0x0000093d: 01 DW_LNS_copy 0x00000000000005a3 126 27 1 0 0 is_stmt -0x00000948: 00 DW_LNE_set_address (0x00000000000005ac) -0x0000094f: 03 DW_LNS_advance_line (127) -0x00000951: 05 DW_LNS_set_column (16) -0x00000953: 01 DW_LNS_copy +0x0000093e: 00 DW_LNE_set_address (0x00000000000005ac) +0x00000945: 03 DW_LNS_advance_line (127) +0x00000947: 05 DW_LNS_set_column (16) +0x00000949: 01 DW_LNS_copy 0x00000000000005ac 127 16 1 0 0 is_stmt -0x00000954: 00 DW_LNE_set_address (0x00000000000005b4) -0x0000095b: 05 DW_LNS_set_column (27) -0x0000095d: 06 DW_LNS_negate_stmt -0x0000095e: 01 DW_LNS_copy +0x0000094a: 00 DW_LNE_set_address (0x00000000000005b4) +0x00000951: 05 DW_LNS_set_column (27) +0x00000953: 06 DW_LNS_negate_stmt +0x00000954: 01 DW_LNS_copy 0x00000000000005b4 127 27 1 0 0 -0x0000095f: 00 DW_LNE_set_address (0x00000000000005b6) -0x00000966: 05 DW_LNS_set_column (35) -0x00000968: 01 DW_LNS_copy +0x00000955: 00 DW_LNE_set_address (0x00000000000005b6) +0x0000095c: 05 DW_LNS_set_column (35) +0x0000095e: 01 DW_LNS_copy 0x00000000000005b6 127 35 1 0 0 -0x00000969: 00 DW_LNE_set_address (0x00000000000005bf) -0x00000970: 05 DW_LNS_set_column (27) -0x00000972: 01 DW_LNS_copy +0x0000095f: 00 DW_LNE_set_address (0x00000000000005bf) +0x00000966: 05 DW_LNS_set_column (27) +0x00000968: 01 DW_LNS_copy 0x00000000000005bf 127 27 1 0 0 -0x00000973: 00 DW_LNE_set_address (0x00000000000005c4) -0x0000097a: 05 DW_LNS_set_column (25) -0x0000097c: 01 DW_LNS_copy +0x00000969: 00 DW_LNE_set_address (0x00000000000005c4) +0x00000970: 05 DW_LNS_set_column (25) +0x00000972: 01 DW_LNS_copy 0x00000000000005c4 127 25 1 0 0 -0x0000097d: 00 DW_LNE_set_address (0x00000000000005c7) -0x00000984: 03 DW_LNS_advance_line (126) -0x00000986: 05 DW_LNS_set_column (27) -0x00000988: 06 DW_LNS_negate_stmt -0x00000989: 01 DW_LNS_copy +0x00000973: 00 DW_LNE_set_address (0x00000000000005c7) +0x0000097a: 03 DW_LNS_advance_line (126) +0x0000097c: 05 DW_LNS_set_column (27) +0x0000097e: 06 DW_LNS_negate_stmt +0x0000097f: 01 DW_LNS_copy 0x00000000000005c7 126 27 1 0 0 is_stmt -0x0000098a: 00 DW_LNE_set_address (0x00000000000005cc) -0x00000991: 05 DW_LNS_set_column (13) -0x00000993: 06 DW_LNS_negate_stmt -0x00000994: 01 DW_LNS_copy +0x00000980: 00 DW_LNE_set_address (0x00000000000005cc) +0x00000987: 05 DW_LNS_set_column (13) +0x00000989: 06 DW_LNS_negate_stmt +0x0000098a: 01 DW_LNS_copy 0x00000000000005cc 126 13 1 0 0 -0x00000995: 00 DW_LNE_set_address (0x00000000000005d4) -0x0000099c: 03 DW_LNS_advance_line (128) -0x0000099e: 06 DW_LNS_negate_stmt -0x0000099f: 01 DW_LNS_copy +0x0000098b: 00 DW_LNE_set_address (0x00000000000005d4) +0x00000992: 03 DW_LNS_advance_line (128) +0x00000994: 06 DW_LNS_negate_stmt +0x00000995: 01 DW_LNS_copy 0x00000000000005d4 128 13 1 0 0 is_stmt -0x000009a0: 00 DW_LNE_set_address (0x00000000000005dc) -0x000009a7: 05 DW_LNS_set_column (22) -0x000009a9: 06 DW_LNS_negate_stmt -0x000009aa: 01 DW_LNS_copy +0x00000996: 00 DW_LNE_set_address (0x00000000000005dc) +0x0000099d: 05 DW_LNS_set_column (22) +0x0000099f: 06 DW_LNS_negate_stmt +0x000009a0: 01 DW_LNS_copy 0x00000000000005dc 128 22 1 0 0 -0x000009ab: 00 DW_LNE_set_address (0x00000000000005e1) -0x000009b2: 03 DW_LNS_advance_line (130) -0x000009b4: 05 DW_LNS_set_column (16) -0x000009b6: 06 DW_LNS_negate_stmt -0x000009b7: 01 DW_LNS_copy +0x000009a1: 00 DW_LNE_set_address (0x00000000000005e1) +0x000009a8: 03 DW_LNS_advance_line (130) +0x000009aa: 05 DW_LNS_set_column (16) +0x000009ac: 06 DW_LNS_negate_stmt +0x000009ad: 01 DW_LNS_copy 0x00000000000005e1 130 16 1 0 0 is_stmt -0x000009b8: 00 DW_LNE_set_address (0x00000000000005e9) -0x000009bf: 05 DW_LNS_set_column (14) -0x000009c1: 06 DW_LNS_negate_stmt -0x000009c2: 01 DW_LNS_copy +0x000009ae: 00 DW_LNE_set_address (0x00000000000005e9) +0x000009b5: 05 DW_LNS_set_column (14) +0x000009b7: 06 DW_LNS_negate_stmt +0x000009b8: 01 DW_LNS_copy 0x00000000000005e9 130 14 1 0 0 -0x000009c3: 00 DW_LNE_set_address (0x00000000000005f8) -0x000009ca: 05 DW_LNS_set_column (25) -0x000009cc: 01 DW_LNS_copy +0x000009b9: 00 DW_LNE_set_address (0x00000000000005f8) +0x000009c0: 05 DW_LNS_set_column (25) +0x000009c2: 01 DW_LNS_copy 0x00000000000005f8 130 25 1 0 0 -0x000009cd: 00 DW_LNE_set_address (0x00000000000005ff) -0x000009d4: 03 DW_LNS_advance_line (133) -0x000009d6: 05 DW_LNS_set_column (11) -0x000009d8: 06 DW_LNS_negate_stmt -0x000009d9: 01 DW_LNS_copy +0x000009c3: 00 DW_LNE_set_address (0x00000000000005ff) +0x000009ca: 03 DW_LNS_advance_line (133) +0x000009cc: 05 DW_LNS_set_column (11) +0x000009ce: 06 DW_LNS_negate_stmt +0x000009cf: 01 DW_LNS_copy 0x00000000000005ff 133 11 1 0 0 is_stmt -0x000009da: 00 DW_LNE_set_address (0x0000000000000604) -0x000009e1: 03 DW_LNS_advance_line (122) -0x000009e3: 05 DW_LNS_set_column (16) -0x000009e5: 01 DW_LNS_copy +0x000009d0: 00 DW_LNE_set_address (0x0000000000000604) +0x000009d7: 03 DW_LNS_advance_line (122) +0x000009d9: 05 DW_LNS_set_column (16) +0x000009db: 01 DW_LNS_copy 0x0000000000000604 122 16 1 0 0 is_stmt -0x000009e6: 00 DW_LNE_set_address (0x0000000000000609) -0x000009ed: 05 DW_LNS_set_column (14) -0x000009ef: 06 DW_LNS_negate_stmt -0x000009f0: 01 DW_LNS_copy +0x000009dc: 00 DW_LNE_set_address (0x0000000000000609) +0x000009e3: 05 DW_LNS_set_column (14) +0x000009e5: 06 DW_LNS_negate_stmt +0x000009e6: 01 DW_LNS_copy 0x0000000000000609 122 14 1 0 0 -0x000009f1: 00 DW_LNE_set_address (0x000000000000060e) -0x000009f8: 03 DW_LNS_advance_line (130) -0x000009fa: 06 DW_LNS_negate_stmt -0x000009fb: 01 DW_LNS_copy - 0x000000000000060e 130 14 1 0 0 is_stmt - - -0x000009fc: 00 DW_LNE_set_address (0x000000000000060f) -0x00000a03: 03 DW_LNS_advance_line (110) -0x00000a05: 05 DW_LNS_set_column (11) -0x00000a07: 01 DW_LNS_copy +0x000009e7: 00 DW_LNE_set_address (0x000000000000060f) +0x000009ee: 03 DW_LNS_advance_line (110) +0x000009f0: 05 DW_LNS_set_column (11) +0x000009f2: 06 DW_LNS_negate_stmt +0x000009f3: 01 DW_LNS_copy 0x000000000000060f 110 11 1 0 0 is_stmt -0x00000a08: 00 DW_LNE_set_address (0x0000000000000615) -0x00000a0f: 03 DW_LNS_advance_line (138) -0x00000a11: 05 DW_LNS_set_column (4) -0x00000a13: 01 DW_LNS_copy +0x000009f4: 00 DW_LNE_set_address (0x0000000000000615) +0x000009fb: 03 DW_LNS_advance_line (138) +0x000009fd: 05 DW_LNS_set_column (4) +0x000009ff: 01 DW_LNS_copy 0x0000000000000615 138 4 1 0 0 is_stmt -0x00000a14: 00 DW_LNE_set_address (0x0000000000000619) -0x00000a1b: 03 DW_LNS_advance_line (139) -0x00000a1d: 01 DW_LNS_copy +0x00000a00: 00 DW_LNE_set_address (0x0000000000000619) +0x00000a07: 03 DW_LNS_advance_line (139) +0x00000a09: 01 DW_LNS_copy 0x0000000000000619 139 4 1 0 0 is_stmt -0x00000a1e: 00 DW_LNE_set_address (0x0000000000000629) -0x00000a25: 03 DW_LNS_advance_line (142) -0x00000a27: 05 DW_LNS_set_column (20) -0x00000a29: 01 DW_LNS_copy +0x00000a0a: 00 DW_LNE_set_address (0x0000000000000629) +0x00000a11: 03 DW_LNS_advance_line (142) +0x00000a13: 05 DW_LNS_set_column (20) +0x00000a15: 01 DW_LNS_copy 0x0000000000000629 142 20 1 0 0 is_stmt -0x00000a2a: 00 DW_LNE_set_address (0x0000000000000631) -0x00000a31: 03 DW_LNS_advance_line (146) -0x00000a33: 01 DW_LNS_copy +0x00000a16: 00 DW_LNE_set_address (0x0000000000000631) +0x00000a1d: 03 DW_LNS_advance_line (146) +0x00000a1f: 01 DW_LNS_copy 0x0000000000000631 146 20 1 0 0 is_stmt -0x00000a34: 00 DW_LNE_set_address (0x0000000000000638) -0x00000a3b: 03 DW_LNS_advance_line (147) -0x00000a3d: 05 DW_LNS_set_column (7) -0x00000a3f: 01 DW_LNS_copy +0x00000a20: 00 DW_LNE_set_address (0x0000000000000638) +0x00000a27: 03 DW_LNS_advance_line (147) +0x00000a29: 05 DW_LNS_set_column (7) +0x00000a2b: 01 DW_LNS_copy 0x0000000000000638 147 7 1 0 0 is_stmt -0x00000a40: 00 DW_LNE_set_address (0x000000000000063c) -0x00000a47: 03 DW_LNS_advance_line (143) -0x00000a49: 05 DW_LNS_set_column (11) -0x00000a4b: 01 DW_LNS_copy +0x00000a2c: 00 DW_LNE_set_address (0x000000000000063c) +0x00000a33: 03 DW_LNS_advance_line (143) +0x00000a35: 05 DW_LNS_set_column (11) +0x00000a37: 01 DW_LNS_copy 0x000000000000063c 143 11 1 0 0 is_stmt -0x00000a4c: 00 DW_LNE_set_address (0x0000000000000640) -0x00000a53: 05 DW_LNS_set_column (20) -0x00000a55: 06 DW_LNS_negate_stmt -0x00000a56: 01 DW_LNS_copy +0x00000a38: 00 DW_LNE_set_address (0x0000000000000640) +0x00000a3f: 05 DW_LNS_set_column (20) +0x00000a41: 06 DW_LNS_negate_stmt +0x00000a42: 01 DW_LNS_copy 0x0000000000000640 143 20 1 0 0 -0x00000a57: 00 DW_LNE_set_address (0x0000000000000645) -0x00000a5e: 05 DW_LNS_set_column (11) -0x00000a60: 01 DW_LNS_copy +0x00000a43: 00 DW_LNE_set_address (0x0000000000000645) +0x00000a4a: 05 DW_LNS_set_column (11) +0x00000a4c: 01 DW_LNS_copy 0x0000000000000645 143 11 1 0 0 -0x00000a61: 00 DW_LNE_set_address (0x000000000000064c) -0x00000a68: 03 DW_LNS_advance_line (141) -0x00000a6a: 05 DW_LNS_set_column (4) -0x00000a6c: 06 DW_LNS_negate_stmt -0x00000a6d: 01 DW_LNS_copy +0x00000a4d: 00 DW_LNE_set_address (0x000000000000064c) +0x00000a54: 03 DW_LNS_advance_line (141) +0x00000a56: 05 DW_LNS_set_column (4) +0x00000a58: 06 DW_LNS_negate_stmt +0x00000a59: 01 DW_LNS_copy 0x000000000000064c 141 4 1 0 0 is_stmt -0x00000a6e: 00 DW_LNE_set_address (0x0000000000000652) -0x00000a75: 03 DW_LNS_advance_line (159) -0x00000a77: 01 DW_LNS_copy +0x00000a5a: 00 DW_LNE_set_address (0x0000000000000652) +0x00000a61: 03 DW_LNS_advance_line (159) +0x00000a63: 01 DW_LNS_copy 0x0000000000000652 159 4 1 0 0 is_stmt -0x00000a78: 00 DW_LNE_set_address (0x0000000000000669) -0x00000a7f: 03 DW_LNS_advance_line (161) -0x00000a81: 05 DW_LNS_set_column (1) -0x00000a83: 01 DW_LNS_copy +0x00000a64: 00 DW_LNE_set_address (0x0000000000000669) +0x00000a6b: 03 DW_LNS_advance_line (161) +0x00000a6d: 05 DW_LNS_set_column (1) +0x00000a6f: 01 DW_LNS_copy 0x0000000000000669 161 1 1 0 0 is_stmt -0x00000a84: 00 DW_LNE_set_address (0x0000000000000673) -0x00000a8b: 00 DW_LNE_end_sequence +0x00000a70: 00 DW_LNE_set_address (0x0000000000000673) +0x00000a77: 00 DW_LNE_end_sequence 0x0000000000000673 161 1 1 0 0 is_stmt end_sequence @@ -6861,7 +6849,7 @@ file_names[ 4]: ;; custom section ".debug_loc", size 1073 ;; custom section ".debug_ranges", size 88 ;; custom section ".debug_abbrev", size 333 - ;; custom section ".debug_line", size 2702 + ;; custom section ".debug_line", size 2682 ;; custom section ".debug_str", size 434 ;; custom section "producers", size 135 ) diff --git a/test/passes/fib_nonzero-low-pc_dwarf.bin.txt b/test/passes/fib_nonzero-low-pc_dwarf.bin.txt index b8c4c76a7..03935c482 100644 --- a/test/passes/fib_nonzero-low-pc_dwarf.bin.txt +++ b/test/passes/fib_nonzero-low-pc_dwarf.bin.txt @@ -365,7 +365,7 @@ Abbrev table for offset: 0x00000000 0x00000079: DW_TAG_lexical_block [5] * DW_AT_low_pc [DW_FORM_addr] (0x000000000000001b) - DW_AT_high_pc [DW_FORM_data4] (0x00000000) + DW_AT_high_pc [DW_FORM_data4] (0x00000033) 0x00000082: DW_TAG_variable [4] DW_AT_location [DW_FORM_sec_offset] (0x00000093: |