mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Added support for generate DWARF .debug_aranges sections automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191052 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -300,6 +300,12 @@ public:
|
||||
unsigned getCUOffset(DIE *Die);
|
||||
};
|
||||
|
||||
/// \brief Helper used to pair up a symbol and it's DWARF compile unit.
|
||||
struct SymbolCU {
|
||||
const MCSymbol *Sym;
|
||||
CompileUnit *CU;
|
||||
};
|
||||
|
||||
/// \brief Collects and handles dwarf debug information.
|
||||
class DwarfDebug {
|
||||
// Target of Dwarf emission.
|
||||
@@ -332,8 +338,12 @@ class DwarfDebug {
|
||||
// separated by a zero byte, mapped to a unique id.
|
||||
StringMap<unsigned, BumpPtrAllocator&> SourceIdMap;
|
||||
|
||||
// List of all labels used in the output.
|
||||
std::vector<SymbolCU> Labels;
|
||||
|
||||
// Provides a unique id per text section.
|
||||
SetVector<const MCSection*> SectionMap;
|
||||
typedef DenseMap<const MCSection *, SmallVector<SymbolCU, 8> > SectionMapType;
|
||||
SectionMapType SectionMap;
|
||||
|
||||
// List of arguments for current function.
|
||||
SmallVector<DbgVariable *, 8> CurrentFnArguments;
|
||||
@@ -669,6 +679,9 @@ public:
|
||||
/// type units.
|
||||
void addTypeUnitType(DIE *Die) { TypeUnits.push_back(Die); }
|
||||
|
||||
/// \brief Add a label so that arange data can be generated for it.
|
||||
void addLabel(SymbolCU SCU) { Labels.push_back(SCU); }
|
||||
|
||||
/// \brief Look up the source id with the given directory and source file
|
||||
/// names. If none currently exists, create a new id and insert it in the
|
||||
/// SourceIds map.
|
||||
|
Reference in New Issue
Block a user