[PATCH] D71834: [DWARF] Fix DWARFDebugAranges to support 64-bit CU offsets.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 02:52:47 PST 2020
ikudrin updated this revision to Diff 237903.
ikudrin added a comment.
Another `1U` is changed to `1ULL`. Thanks, @aprantl!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71834/new/
https://reviews.llvm.org/D71834
Files:
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h
llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
Index: llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
@@ -113,10 +113,10 @@
Endpoints.shrink_to_fit();
}
-uint32_t DWARFDebugAranges::findAddress(uint64_t Address) const {
+uint64_t DWARFDebugAranges::findAddress(uint64_t Address) const {
RangeCollIterator It =
partition_point(Aranges, [=](Range R) { return R.HighPC() <= Address; });
if (It != Aranges.end() && It->LowPC <= Address)
return It->CUOffset;
- return -1U;
+ return -1ULL;
}
Index: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h
===================================================================
--- llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h
+++ llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h
@@ -21,7 +21,7 @@
class DWARFDebugAranges {
public:
void generate(DWARFContext *CTX);
- uint32_t findAddress(uint64_t Address) const;
+ uint64_t findAddress(uint64_t Address) const;
private:
void clear();
@@ -33,7 +33,7 @@
struct Range {
explicit Range(uint64_t LowPC = -1ULL, uint64_t HighPC = -1ULL,
- uint32_t CUOffset = -1U)
+ uint64_t CUOffset = -1ULL)
: LowPC(LowPC), Length(HighPC - LowPC), CUOffset(CUOffset) {}
void setHighPC(uint64_t HighPC) {
@@ -54,8 +54,8 @@
}
uint64_t LowPC; /// Start of address range.
- uint32_t Length; /// End of address range (not including this address).
- uint32_t CUOffset; /// Offset of the compile unit or die.
+ uint64_t Length; /// End of address range (not including this address).
+ uint64_t CUOffset; /// Offset of the compile unit or die.
};
struct RangeEndpoint {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71834.237903.patch
Type: text/x-patch
Size: 1797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200114/ca0d4522/attachment.bin>
More information about the llvm-commits
mailing list