diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 11:41:25 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 11:41:25 +0000 | 
| commit | d9484dd61cc151c4f34c31e07f693fefa66316b5 (patch) | |
| tree | ab0560b3da293f1fafd3269c59692e929418f5c2 /contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp | |
| parent | 79e0962d4c3cf1f0acf359a9d69cb3ac68c414c4 (diff) | |
| parent | d8e91e46262bc44006913e6796843909f1ac7bcd (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp')
| -rw-r--r-- | contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp b/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp index de8b6e543fab..abd1ad59a9c1 100644 --- a/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp +++ b/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp @@ -8,6 +8,7 @@  //===----------------------------------------------------------------------===//  #include "llvm/DebugInfo/DWARF/DWARFDebugPubTable.h" +#include "llvm/DebugInfo/DWARF/DWARFDataExtractor.h"  #include "llvm/ADT/StringRef.h"  #include "llvm/BinaryFormat/Dwarf.h"  #include "llvm/Support/DataExtractor.h" @@ -18,10 +19,11 @@  using namespace llvm;  using namespace dwarf; -DWARFDebugPubTable::DWARFDebugPubTable(StringRef Data, bool LittleEndian, -                                       bool GnuStyle) +DWARFDebugPubTable::DWARFDebugPubTable(const DWARFObject &Obj, +                                       const DWARFSection &Sec, +                                       bool LittleEndian, bool GnuStyle)      : GnuStyle(GnuStyle) { -  DataExtractor PubNames(Data, LittleEndian, 0); +  DWARFDataExtractor PubNames(Obj, Sec, LittleEndian, 0);    uint32_t Offset = 0;    while (PubNames.isValidOffset(Offset)) {      Sets.push_back({}); @@ -29,10 +31,10 @@ DWARFDebugPubTable::DWARFDebugPubTable(StringRef Data, bool LittleEndian,      SetData.Length = PubNames.getU32(&Offset);      SetData.Version = PubNames.getU16(&Offset); -    SetData.Offset = PubNames.getU32(&Offset); +    SetData.Offset = PubNames.getRelocatedValue(4, &Offset);      SetData.Size = PubNames.getU32(&Offset); -    while (Offset < Data.size()) { +    while (Offset < Sec.Data.size()) {        uint32_t DieRef = PubNames.getU32(&Offset);        if (DieRef == 0)          break;  | 
