mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 08:24:12 +00:00
DWARF: Print the number for unknown abbrev fields.
Thanks Nick! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139778 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
42180e8336
commit
7b97442b49
@ -9,6 +9,7 @@
|
||||
|
||||
#include "DWARFAbbreviationDeclaration.h"
|
||||
#include "llvm/Support/Dwarf.h"
|
||||
#include "llvm/Support/Format.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
using namespace dwarf;
|
||||
@ -48,14 +49,26 @@ DWARFAbbreviationDeclaration::extract(DataExtractor data, uint32_t* offset_ptr,
|
||||
|
||||
void DWARFAbbreviationDeclaration::dump(raw_ostream &OS) const {
|
||||
const char *tagString = TagString(getTag());
|
||||
OS << '[' << getCode() << "] " << (tagString ? tagString : "DW_TAG_Unknown")
|
||||
<< "\tDW_CHILDREN_"
|
||||
<< (hasChildren() ? "yes" : "no") << '\n';
|
||||
OS << '[' << getCode() << "] ";
|
||||
if (tagString)
|
||||
OS << tagString;
|
||||
else
|
||||
OS << format("DW_TAG_Unknown_%x", getTag());
|
||||
OS << "\tDW_CHILDREN_" << (hasChildren() ? "yes" : "no") << '\n';
|
||||
for (unsigned i = 0, e = Attributes.size(); i != e; ++i) {
|
||||
OS << '\t';
|
||||
const char *attrString = AttributeString(Attributes[i].getAttribute());
|
||||
if (attrString)
|
||||
OS << attrString;
|
||||
else
|
||||
OS << format("DW_AT_Unknown_%x", Attributes[i].getAttribute());
|
||||
OS << '\t';
|
||||
const char *formString = FormEncodingString(Attributes[i].getForm());
|
||||
OS << '\t' << (attrString ? attrString : "DW_AT_Unknown")
|
||||
<< '\t' << (formString ? formString : "DW_FORM_Unknown") << '\n';
|
||||
if (formString)
|
||||
OS << formString;
|
||||
else
|
||||
OS << format("DW_FORM_Unknown_%x", Attributes[i].getForm());
|
||||
OS << '\n';
|
||||
}
|
||||
OS << '\n';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user