Skip to content

Commit 8633433

Browse files
committed
DO NOT SUBMIT: lldb DWARF-Clang AST parsing tracing
1 parent 396cdab commit 8633433

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"
@@ -1556,6 +1557,15 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE &die) {
15561557
const char *name = die.GetName();
15571558
if (!name)
15581559
return "";
1560+
static int indent = 0;
1561+
std::cerr << std::string(indent, ' ') << "starting qualified name for: " << name << '\n';
1562+
auto &FS = die.GetCU()->GetSymbolFileDWARF().GetObjectFile()->GetFileSpec();
1563+
std::string Directory = FS.GetDirectory().AsCString("");
1564+
std::cerr << std::string(indent, ' ')
1565+
<< Directory.substr(std::min(59ul, Directory.size())) << '/'
1566+
<< FS.GetFilename().AsCString("") << ':' << std::hex
1567+
<< die.GetDIE()->GetOffset() << '\n';
1568+
++indent;
15591569
std::string qualified_name;
15601570
DWARFDIE parent_decl_ctx_die = die.GetParentDeclContextDIE();
15611571
// TODO: change this to get the correct decl context parent....
@@ -1601,6 +1611,9 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE &die) {
16011611
qualified_name.append(name);
16021612
qualified_name.append(GetDIEClassTemplateParams(die).AsCString(""));
16031613

1614+
--indent;
1615+
std::cerr << std::string(indent, ' ') << "computed qualified name: " << qualified_name << '\n';
1616+
16041617
return qualified_name;
16051618
}
16061619

0 commit comments

Comments
 (0)