[PATCH] D153334: [DWARFLinker][DWARFv5] change emitSLEB128IntValue with emitULEB128IntValue for ranges.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 06:15:58 PDT 2023
avl created this revision.
avl added reviewers: JDevlieghere, aprantl, rastogishubham, fdeazeve.
Herald added subscribers: hiraditya, emaste.
Herald added a project: All.
avl requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
This patch changes emitSLEB128IntValue with emitULEB128IntValue
for length part of address range of DW_RLE_start_length kind. DWARFv5
standard:
DW_RLE_start_length
This is a form of bounded range entry that has one target address operand
value and an unsigned LEB128 integer length operand value.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153334
Files:
llvm/lib/DWARFLinker/DWARFStreamer.cpp
llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-rnglists.test
Index: llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-rnglists.test
===================================================================
--- llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-rnglists.test
+++ llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-rnglists.test
@@ -57,7 +57,7 @@
#DWARF-CHECK: [0x0000000000001130, 0x0000000000001170)
#DWARF-CHECK-NOT: .debug_addr contents:
#DWARF-CHECK: .debug_rnglists contents:
-#DWARF-CHECK: 0x00000000: range list header: length = 0x00000040, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
+#DWARF-CHECK: 0x00000000: range list header: length = 0x0000003f, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000
#DWARF-CHECK: ranges:
#DWARF-CHECK: 0x[[F1RANGE_OFF]]: [DW_RLE_start_length]: 0x0000000000001130, 0x0000000000000010 => [0x0000000000001130, 0x0000000000001140)
#DWARF-CHECK: {{.*}} [DW_RLE_end_of_list ]
Index: llvm/lib/DWARFLinker/DWARFStreamer.cpp
===================================================================
--- llvm/lib/DWARFLinker/DWARFStreamer.cpp
+++ llvm/lib/DWARFLinker/DWARFStreamer.cpp
@@ -496,7 +496,7 @@
RngListsSectionSize += AddressSize;
// Emit length of the range.
- RngListsSectionSize += MS->emitSLEB128IntValue(Range.end() - Range.start());
+ RngListsSectionSize += MS->emitULEB128IntValue(Range.end() - Range.start());
}
// Emit the terminator entry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153334.532884.patch
Type: text/x-patch
Size: 1468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230620/8d4d38a4/attachment.bin>
More information about the llvm-commits
mailing list