Skip to content

Commit

Permalink
Added debug option '-d entries' to dump the tree of Entries.
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Aug 22, 2023
1 parent 6e9402f commit 2e353ba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/debug.cpp
Expand Up @@ -45,6 +45,7 @@ static std::map< std::string, Debug::DebugMask > s_labels =
{ "qhp", Debug::Qhp },
{ "tag", Debug::Tag },
{ "alias", Debug::Alias },
{ "entries", Debug::Entries },
{ "lex", Debug::Lex },
{ "lex:code", Debug::Lex_code },
{ "lex:commentcnv", Debug::Lex_commentcnv },
Expand Down
1 change: 1 addition & 0 deletions src/debug.h
Expand Up @@ -42,6 +42,7 @@ class Debug
Qhp = 0x00'4000ULL,
Tag = 0x00'8000ULL,
Alias = 0x01'0000ULL,
Entries = 0x02'0000ULL,
Lex = 0x0000'FFFF'FF00'0000ULL, // all scanners combined
Lex_code = 0x0000'0000'0100'0000ULL,
Lex_commentcnv = 0x0000'0000'0200'0000ULL,
Expand Down
22 changes: 14 additions & 8 deletions src/doxygen.cpp
Expand Up @@ -9409,15 +9409,20 @@ static void buildExampleList(Entry *root)

void printNavTree(Entry *root,int indent)
{
QCString indentStr;
indentStr.fill(' ',indent);
msg("%s%s (sec=0x%x)\n",
indentStr.isEmpty()?"":qPrint(indentStr),
root->name.isEmpty()?"<empty>":qPrint(root->name),
root->section);
for (const auto &e : root->children())
if (Debug::isFlagSet(Debug::Entries))
{
printNavTree(e.get(),indent+2);
QCString indentStr;
indentStr.fill(' ',indent);
Debug::print(Debug::Entries,0,"%s%s at %s:%d (sec=0x%x, spec=%" PRIx64 ")\n",
indentStr.isEmpty()?"":qPrint(indentStr),
root->name.isEmpty()?"<empty>":qPrint(root->name),
qPrint(root->fileName),root->startLine,
root->section,
root->spec);
for (const auto &e : root->children())
{
printNavTree(e.get(),indent+2);
}
}
}

Expand Down Expand Up @@ -12352,6 +12357,7 @@ void parseInput()
}
}

printNavTree(root.get(),0);
}

void generateOutput()
Expand Down

0 comments on commit 2e353ba

Please sign in to comment.