forked from OSchip/llvm-project
API update for change to LLVM's lib/DebugInfo/DWARF
llvm-svn: 368190
This commit is contained in:
parent
90146cd8b9
commit
fa2f4395e9
|
@ -33,11 +33,11 @@ template <class ELFT> LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *obj) {
|
||||||
if (LLDDWARFSection *m =
|
if (LLDDWARFSection *m =
|
||||||
StringSwitch<LLDDWARFSection *>(sec->name)
|
StringSwitch<LLDDWARFSection *>(sec->name)
|
||||||
.Case(".debug_addr", &addrSection)
|
.Case(".debug_addr", &addrSection)
|
||||||
.Case(".debug_gnu_pubnames", &gnuPubNamesSection)
|
.Case(".debug_gnu_pubnames", &gnuPubnamesSection)
|
||||||
.Case(".debug_gnu_pubtypes", &gnuPubTypesSection)
|
.Case(".debug_gnu_pubtypes", &gnuPubtypesSection)
|
||||||
.Case(".debug_info", &infoSection)
|
.Case(".debug_info", &infoSection)
|
||||||
.Case(".debug_ranges", &rangeSection)
|
.Case(".debug_ranges", &rangesSection)
|
||||||
.Case(".debug_rnglists", &rngListsSection)
|
.Case(".debug_rnglists", &rnglistsSection)
|
||||||
.Case(".debug_line", &lineSection)
|
.Case(".debug_line", &lineSection)
|
||||||
.Default(nullptr)) {
|
.Default(nullptr)) {
|
||||||
m->Data = toStringRef(sec->data());
|
m->Data = toStringRef(sec->data());
|
||||||
|
@ -50,7 +50,7 @@ template <class ELFT> LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *obj) {
|
||||||
else if (sec->name == ".debug_str")
|
else if (sec->name == ".debug_str")
|
||||||
strSection = toStringRef(sec->data());
|
strSection = toStringRef(sec->data());
|
||||||
else if (sec->name == ".debug_line_str")
|
else if (sec->name == ".debug_line_str")
|
||||||
lineStringSection = toStringRef(sec->data());
|
lineStrSection = toStringRef(sec->data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,12 +32,12 @@ public:
|
||||||
f(infoSection);
|
f(infoSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
const llvm::DWARFSection &getRangeSection() const override {
|
const llvm::DWARFSection &getRangesSection() const override {
|
||||||
return rangeSection;
|
return rangesSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
const llvm::DWARFSection &getRnglistsSection() const override {
|
const llvm::DWARFSection &getRnglistsSection() const override {
|
||||||
return rngListsSection;
|
return rnglistsSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
const llvm::DWARFSection &getLineSection() const override {
|
const llvm::DWARFSection &getLineSection() const override {
|
||||||
|
@ -48,18 +48,18 @@ public:
|
||||||
return addrSection;
|
return addrSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
const llvm::DWARFSection &getGnuPubNamesSection() const override {
|
const llvm::DWARFSection &getGnuPubnamesSection() const override {
|
||||||
return gnuPubNamesSection;
|
return gnuPubnamesSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
const llvm::DWARFSection &getGnuPubTypesSection() const override {
|
const llvm::DWARFSection &getGnuPubtypesSection() const override {
|
||||||
return gnuPubTypesSection;
|
return gnuPubtypesSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringRef getFileName() const override { return ""; }
|
StringRef getFileName() const override { return ""; }
|
||||||
StringRef getAbbrevSection() const override { return abbrevSection; }
|
StringRef getAbbrevSection() const override { return abbrevSection; }
|
||||||
StringRef getStringSection() const override { return strSection; }
|
StringRef getStrSection() const override { return strSection; }
|
||||||
StringRef getLineStringSection() const override { return lineStringSection; }
|
StringRef getLineStrSection() const override { return lineStrSection; }
|
||||||
|
|
||||||
bool isLittleEndian() const override {
|
bool isLittleEndian() const override {
|
||||||
return ELFT::TargetEndianness == llvm::support::little;
|
return ELFT::TargetEndianness == llvm::support::little;
|
||||||
|
@ -74,16 +74,16 @@ private:
|
||||||
uint64_t pos,
|
uint64_t pos,
|
||||||
ArrayRef<RelTy> rels) const;
|
ArrayRef<RelTy> rels) const;
|
||||||
|
|
||||||
LLDDWARFSection gnuPubNamesSection;
|
LLDDWARFSection gnuPubnamesSection;
|
||||||
LLDDWARFSection gnuPubTypesSection;
|
LLDDWARFSection gnuPubtypesSection;
|
||||||
LLDDWARFSection infoSection;
|
LLDDWARFSection infoSection;
|
||||||
LLDDWARFSection rangeSection;
|
LLDDWARFSection rangesSection;
|
||||||
LLDDWARFSection rngListsSection;
|
LLDDWARFSection rnglistsSection;
|
||||||
LLDDWARFSection lineSection;
|
LLDDWARFSection lineSection;
|
||||||
LLDDWARFSection addrSection;
|
LLDDWARFSection addrSection;
|
||||||
StringRef abbrevSection;
|
StringRef abbrevSection;
|
||||||
StringRef strSection;
|
StringRef strSection;
|
||||||
StringRef lineStringSection;
|
StringRef lineStrSection;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace elf
|
} // namespace elf
|
||||||
|
|
|
@ -2505,8 +2505,8 @@ template <class ELFT>
|
||||||
static std::vector<GdbIndexSection::NameAttrEntry>
|
static std::vector<GdbIndexSection::NameAttrEntry>
|
||||||
readPubNamesAndTypes(const LLDDwarfObj<ELFT> &obj,
|
readPubNamesAndTypes(const LLDDwarfObj<ELFT> &obj,
|
||||||
const std::vector<GdbIndexSection::CuEntry> &cUs) {
|
const std::vector<GdbIndexSection::CuEntry> &cUs) {
|
||||||
const DWARFSection &pubNames = obj.getGnuPubNamesSection();
|
const DWARFSection &pubNames = obj.getGnuPubnamesSection();
|
||||||
const DWARFSection &pubTypes = obj.getGnuPubTypesSection();
|
const DWARFSection &pubTypes = obj.getGnuPubtypesSection();
|
||||||
|
|
||||||
std::vector<GdbIndexSection::NameAttrEntry> ret;
|
std::vector<GdbIndexSection::NameAttrEntry> ret;
|
||||||
for (const DWARFSection *pub : {&pubNames, &pubTypes}) {
|
for (const DWARFSection *pub : {&pubNames, &pubTypes}) {
|
||||||
|
|
Loading…
Reference in New Issue