mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Use new DWARFDataExtractor::getInitialLength in DWARFUnit
This commit is contained in:
parent
bd8f009db3
commit
0777f5891c
@ -262,12 +262,8 @@ bool DWARFUnitHeader::extract(DWARFContext &Context,
|
|||||||
IndexEntry = Entry;
|
IndexEntry = Entry;
|
||||||
if (!IndexEntry && Index)
|
if (!IndexEntry && Index)
|
||||||
IndexEntry = Index->getFromOffset(*offset_ptr);
|
IndexEntry = Index->getFromOffset(*offset_ptr);
|
||||||
Length = debug_info.getRelocatedValue(4, offset_ptr, nullptr, &Err);
|
std::tie(Length, FormParams.Format) =
|
||||||
FormParams.Format = DWARF32;
|
debug_info.getInitialLength(offset_ptr, &Err);
|
||||||
if (Length == dwarf::DW_LENGTH_DWARF64) {
|
|
||||||
Length = debug_info.getU64(offset_ptr, &Err);
|
|
||||||
FormParams.Format = DWARF64;
|
|
||||||
}
|
|
||||||
FormParams.Version = debug_info.getU16(offset_ptr, &Err);
|
FormParams.Version = debug_info.getU16(offset_ptr, &Err);
|
||||||
if (FormParams.Version >= 5) {
|
if (FormParams.Version >= 5) {
|
||||||
UnitType = debug_info.getU8(offset_ptr, &Err);
|
UnitType = debug_info.getU8(offset_ptr, &Err);
|
||||||
|
Loading…
Reference in New Issue
Block a user