mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
DebugInfo: Introduce the notion of "form classes"
Summary: Use DWARF4 table of form classes to fetch attributes from DIE in a more consistent way. This shouldn't change the functionality and serves as a refactoring for upcoming change: DW_AT_high_pc has different semantics depending on its form class. Reviewers: dblaikie, echristo Reviewed By: echristo CC: echristo, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1961 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193553 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -102,8 +102,8 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpType DumpType) {
|
||||
DWARFCompileUnit *cu = getCompileUnitAtIndex(i);
|
||||
savedAddressByteSize = cu->getAddressByteSize();
|
||||
unsigned stmtOffset =
|
||||
cu->getCompileUnitDIE()->getAttributeValueAsUnsigned(cu, DW_AT_stmt_list,
|
||||
-1U);
|
||||
cu->getCompileUnitDIE()->getAttributeValueAsSectionOffset(
|
||||
cu, DW_AT_stmt_list, -1U);
|
||||
if (stmtOffset != -1U) {
|
||||
DataExtractor lineData(getLineSection().Data, isLittleEndian(),
|
||||
savedAddressByteSize);
|
||||
@@ -262,8 +262,8 @@ DWARFContext::getLineTableForCompileUnit(DWARFCompileUnit *cu) {
|
||||
Line.reset(new DWARFDebugLine(&getLineSection().Relocs));
|
||||
|
||||
unsigned stmtOffset =
|
||||
cu->getCompileUnitDIE()->getAttributeValueAsUnsigned(cu, DW_AT_stmt_list,
|
||||
-1U);
|
||||
cu->getCompileUnitDIE()->getAttributeValueAsSectionOffset(
|
||||
cu, DW_AT_stmt_list, -1U);
|
||||
if (stmtOffset == -1U)
|
||||
return 0; // No line table for this compile unit.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user