Skip to content

Commit

Permalink
Add symtabAPI/src/Object.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 9518eb9 commit a070812
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
1 change: 1 addition & 0 deletions docs/symtabAPI/developer/API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ SymtabAPI
StringTable.h
Symbol.h
Symtab.h
symtab_impl.hpp
SymtabReader.h
Type.h
Type-mem.h
Expand Down
26 changes: 26 additions & 0 deletions docs/symtabAPI/developer/symtab_impl.hpp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _`sec-dev:symtab_impl.hpp`:

symtab_impl.hpp
###############

.. cpp:namespace:: Dyninst::SymtabAPI::dev

.. cpp:struct:: symtab_impl final

.. cpp:member:: indexed_symbols everyDefinedSymbol
.. cpp:member:: indexed_symbols undefDynSyms
.. cpp:member:: indexed_modules modules
.. cpp:member:: std::once_flag funcRangesAreParsed
.. cpp:member:: std::once_flag types_parsed
.. cpp:member:: dyn_c_hash_map<Offset, Function *> funcsByOffset

Since Functions are unique by address, we require this structure to efficiently track them.

.. cpp:type:: VarsByOffsetMap = dyn_c_hash_map<Offset, std::vector<Variable *>>
.. cpp:member:: VarsByOffsetMap varsByOffset
.. cpp:type:: ModRangeLookup = IBSTree<ModRange>
.. cpp:member:: ModRangeLookup mod_lookup_
.. cpp:type:: FuncRangeLookup = IBSTree<FuncRange>
.. cpp:member:: FuncRangeLookup func_lookup
.. cpp:member:: Module* default_module
.. cpp:function:: Module* getContainingModule(Offset offset) const
10 changes: 0 additions & 10 deletions symtabAPI/src/Object.C
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ ostream &operator<<(ostream &os, relocationEntry &q) {
}
#endif

/**************************************************
*
* Stream based debuggering output - for regreesion testing.
* Dump info on state of object *this....
*
**************************************************/

SYMTAB_EXPORT unsigned AObject::nsymbols () const
{
Expand Down Expand Up @@ -285,7 +279,6 @@ SYMTAB_EXPORT AObject::~AObject()
}
}

// explicitly protected
SYMTAB_EXPORT AObject::AObject(MappedFile *mf_, void (*err_func)(const char *), Symtab* st)
: mf(mf_),
code_ptr_(0), code_off_(0), code_len_(0),
Expand Down Expand Up @@ -347,9 +340,6 @@ const string & SymbolIter::currkey() const
return symbolIterator->first;
}

/* If it's important that this be const, we could try to initialize
currentVector to '& symbolIterator.currval()' in the constructor. */

Symbol *SymbolIter::currval()
{
if (currentPositionInVector >= symbolIterator->second.size())
Expand Down

0 comments on commit a070812

Please sign in to comment.