[PATCH] D137933: [llvm-debuginfo-analyzer] 10 - Smart Pointers
Carlos Alberto Enciso via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 04:30:11 PST 2022
CarlosAlbertoEnciso added a comment.
The main logical unit is the LVReader, which is the main access point from the user point of view. Its functions are:
- Load the binary file
- Parse the debug information
- Create the `logical view` which is a tree composed of `logical elements` (`LVScopes`, `LVSymbols`, `LVTypes` and `LVLines`, etc.). Depending on the command line options, additional information is added to the those logical elements.
- Print the `logical view`.
- Select `logical elements` using user criterias.
- Compare two `logical views'.
This is a very broad relationship between the reader and the logical elements.
class LVReader {
...
LVScopeRoot *Root = nullptr;
...
createScopes() {
Root = createObject<LVScopeRoot>();
}
...
doPrint()
...
}
class LVELFReader <- LVReader {
...
}
class LVCodeViewReader <- LVReader {
...
}
`Root` represents the loaded binary file.
The different `Readers` are created by the `Reader Handler` based on the binary files format. It records each created reader.
class LVReaderHandler {
LVReaders TheReaders;
...
createReaders();
printReaders();
compareReaders();
...
}
class LVScope <- LVObject {
std::unique_ptr<LVTypes> Types;
std::unique_ptr<LVSymbols> Symbols;
std::unique_ptr<LVScopes> Scopes;
std::unique_ptr<LVLines> Lines;
}
class LVScopeRoot <- LVScope {
...
}
A `LVScope` can represent a `compile unit`, `function`, `lexical block`, etc.
The other logical elements:
class LVLine <- LVObject {
...
}
class LVSymbol <- LVObject {
...
}
class LVType <- LVObject {
...
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137933/new/
https://reviews.llvm.org/D137933
More information about the llvm-commits
mailing list