<div dir="ltr">Ah, thanks! Sorry for the noise!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 1, 2019 at 2:27 AM Diana Picus <<a href="mailto:diana.picus@linaro.org">diana.picus@linaro.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi David,<br>
<br>
I moved this test to the X86 directory since it's using an x86 triple<br>
and therefore breaking non-x86 buildbots. Just FYI :)<br>
<br>
Cheers,<br>
Diana<br>
<br>
On Tue, 1 Oct 2019 at 02:27, David Blaikie via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: dblaikie<br>
> Date: Mon Sep 30 17:29:13 2019<br>
> New Revision: 373278<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=373278&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=373278&view=rev</a><br>
> Log:<br>
> DebugInfo: Add parsing support for debug_loc base address specifiers<br>
><br>
> Added:<br>
> llvm/trunk/test/tools/llvm-dwarfdump/debug_loc_base_address.s<br>
> Modified:<br>
> llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h<br>
> llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp<br>
><br>
> Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h?rev=373278&r1=373277&r2=373278&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h?rev=373278&r1=373277&r2=373278&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h (original)<br>
> +++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h Mon Sep 30 17:29:13 2019<br>
> @@ -68,7 +68,7 @@ public:<br>
> /// Return the location list at the given offset or nullptr.<br>
> LocationList const *getLocationListAtOffset(uint64_t Offset) const;<br>
><br>
> - static Expected<LocationList><br>
> + Expected<LocationList><br>
> parseOneLocationList(const DWARFDataExtractor &Data, uint64_t *Offset);<br>
> };<br>
><br>
><br>
> Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp?rev=373278&r1=373277&r2=373278&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp?rev=373278&r1=373277&r2=373278&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp (original)<br>
> +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp Mon Sep 30 17:29:13 2019<br>
> @@ -101,6 +101,7 @@ DWARFDebugLoc::parseOneLocationList(cons<br>
><br>
> if (Error Err = C.takeError())<br>
> return std::move(Err);<br>
> +<br>
> // The end of any given location list is marked by an end of list entry,<br>
> // which consists of a 0 for the beginning address offset and a 0 for the<br>
> // ending address offset.<br>
> @@ -109,9 +110,12 @@ DWARFDebugLoc::parseOneLocationList(cons<br>
> return LL;<br>
> }<br>
><br>
> - unsigned Bytes = Data.getU16(C);<br>
> - // A single location description describing the location of the object...<br>
> - Data.getU8(C, E.Loc, Bytes);<br>
> + if (E.Begin != (AddressSize == 4 ? -1U : -1ULL)) {<br>
> + unsigned Bytes = Data.getU16(C);<br>
> + // A single location description describing the location of the object...<br>
> + Data.getU8(C, E.Loc, Bytes);<br>
> + }<br>
> +<br>
> LL.Entries.push_back(std::move(E));<br>
> }<br>
> }<br>
><br>
> Added: llvm/trunk/test/tools/llvm-dwarfdump/debug_loc_base_address.s<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-dwarfdump/debug_loc_base_address.s?rev=373278&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-dwarfdump/debug_loc_base_address.s?rev=373278&view=auto</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/tools/llvm-dwarfdump/debug_loc_base_address.s (added)<br>
> +++ llvm/trunk/test/tools/llvm-dwarfdump/debug_loc_base_address.s Mon Sep 30 17:29:13 2019<br>
> @@ -0,0 +1,34 @@<br>
> +# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o<br>
> +# RUN: llvm-dwarfdump --debug-loc %t.o | FileCheck %s<br>
> +<br>
> +# CHECK: .debug_loc contents:<br>
> +# CHECK-NEXT: 0x00000000:<br>
> +# CHECK-NEXT: [0xffffffffffffffff, 0x000000000000002a):<br>
> +# CHECK-NEXT: [0x0000000000000003, 0x0000000000000007): DW_OP_consts +3, DW_OP_stack_value<br>
> +<br>
> + .section .debug_loc,"",@progbits<br>
> + .quad 0xffffffffffffffff<br>
> + .quad 42<br>
> + .quad 3<br>
> + .quad 7<br>
> + .short 3 # Loc expr size<br>
> + .byte 17 # DW_OP_consts<br>
> + .byte 3 # 3<br>
> + .byte 159 # DW_OP_stack_value<br>
> + .quad 0<br>
> + .quad 0<br>
> + .section .debug_abbrev,"",@progbits<br>
> + .byte 1 # Abbreviation Code<br>
> + .byte 17 # DW_TAG_compile_unit<br>
> + .byte 0 # DW_CHILDREN_no<br>
> + .byte 0 # EOM(1)<br>
> + .byte 0 # EOM(2)<br>
> + .byte 0 # EOM(3)<br>
> + .section .debug_info,"",@progbits<br>
> + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit<br>
> +.Ldebug_info_start0:<br>
> + .short 4 # DWARF version number<br>
> + .long .debug_abbrev # Offset Into Abbrev. Section<br>
> + .byte 8 # Address Size (in bytes)<br>
> + .byte 1 # Abbrev [1] DW_TAG_compile_unit<br>
> +.Ldebug_info_end0:<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>