mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
DebugInfo: Support debug_loc under fission
Implement debug_loc.dwo, as well as llvm-dwarfdump support for dumping this section. Outlined in the DWARF5 spec and http://gcc.gnu.org/wiki/DebugFission the debug_loc.dwo section has more variation than the standard debug_loc, allowing 3 different forms of entry (plus the end of list entry). GCC seems to, and Clang certainly, only use one form, so I've just implemented dumping support for that for now. It wasn't immediately obvious that there was a good refactoring to share the implementation of dumping support between debug_loc and debug_loc.dwo, so they're separate for now - ideas welcome or I may come back to it at some point. As per a comment in the code, we could choose different forms that may reduce the number of debug_addr entries we emit, but that will require further study. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,6 +55,27 @@ public:
|
||||
/// specified address size to interpret the address ranges.
|
||||
void parse(DataExtractor data, unsigned AddressSize);
|
||||
};
|
||||
|
||||
class DWARFDebugLocDWO {
|
||||
struct Entry {
|
||||
uint64_t Start;
|
||||
uint32_t Length;
|
||||
SmallVector<unsigned char, 4> Loc;
|
||||
};
|
||||
|
||||
struct LocationList {
|
||||
unsigned Offset;
|
||||
SmallVector<Entry, 2> Entries;
|
||||
};
|
||||
|
||||
typedef SmallVector<LocationList, 4> LocationLists;
|
||||
|
||||
LocationLists Locations;
|
||||
|
||||
public:
|
||||
void parse(DataExtractor data);
|
||||
void dump(raw_ostream &OS) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user