Skip to content

Commit 2922fed

Browse files
committed
DO NOT SUBMIT: lldb DWARF-Clang AST parsing tracing
1 parent d4ff961 commit 2922fed

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include <cstdlib>
10+
#include <iostream>
1011

1112
#include "DWARFASTParser.h"
1213
#include "DWARFASTParserClang.h"
@@ -1621,6 +1622,15 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE &die) {
16211622
const char *name = die.GetName();
16221623
if (!name)
16231624
return "";
1625+
static int indent = 0;
1626+
std::cerr << std::string(indent, ' ') << "starting qualified name for: " << name << '\n';
1627+
auto &FS = die.GetCU()->GetSymbolFileDWARF().GetObjectFile()->GetFileSpec();
1628+
std::string Directory = FS.GetDirectory().AsCString("");
1629+
std::cerr << std::string(indent, ' ')
1630+
<< Directory.substr(std::min(59ul, Directory.size())) << '/'
1631+
<< FS.GetFilename().AsCString("") << ':' << std::hex
1632+
<< die.GetDIE()->GetOffset() << '\n';
1633+
++indent;
16241634
std::string qualified_name;
16251635
DWARFDIE parent_decl_ctx_die = die.GetParentDeclContextDIE();
16261636
// TODO: change this to get the correct decl context parent....
@@ -1666,6 +1676,9 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE &die) {
16661676
qualified_name.append(name);
16671677
qualified_name.append(GetDIEClassTemplateParams(die).AsCString(""));
16681678

1679+
--indent;
1680+
std::cerr << std::string(indent, ' ') << "computed qualified name: " << qualified_name << '\n';
1681+
16691682
return qualified_name;
16701683
}
16711684

0 commit comments

Comments
 (0)