libcsdbg  1.28
C++ exception (and generic) stack trace debug library
csdbg::symtab Class Reference

This class represents a program/library symbol table (symtab section) More...

#include <symtab.hpp>

+ Inheritance diagram for csdbg::symtab:
+ Collaboration diagram for csdbg::symtab:

Public Member Functions

 symtab (const i8 *, mem_addr_t=0)
 Object constructor. More...
 
 symtab (const symtab &)
 Object copy constructor. More...
 
virtual ~symtab ()
 Object destructor. More...
 
virtual symtabclone () const
 Object virtual copy constructor. More...
 
virtual const i8path () const
 Get the objective code file path. More...
 
virtual mem_addr_t base () const
 Get the load base address. More...
 
virtual symtaboperator= (const symtab &)
 Assignment operator. More...
 
virtual u32 size () const
 Get the number of symbols. More...
 
virtual const i8lookup (mem_addr_t) const
 Lookup an address to resolve a symbol. More...
 
virtual bool exists (mem_addr_t) const
 Probe if a symbol exists. More...
 
virtual symtabforeach (void(*)(u32, symbol *)) const
 Traverse the symbol table with a callback for each symbol. More...
 
- Public Member Functions inherited from csdbg::object
virtual ~object ()=0
 To be implemented. More...
 
virtual const i8class_name () const
 Query the class name of an object descending from csdbg::object. More...
 

Protected Attributes

i8m_path
 Objective code file path. More...
 
mem_addr_t m_base
 Load base address. More...
 
chain< symbol > * m_table
 Function symbol table. More...
 

Detailed Description

This class represents a program/library symbol table (symtab section)

A symtab object can load code from executables or dynamic shared objects, with absolute addressing or position independent and of any binary format supported by the libbfd backends on the host (target) machine (elf, coff, ecoff e.t.c). To optimize lookups the symbol table (as structured in libbfd) is parsed, the non-function symbols are discarded and function symbols are demangled once and stored in simpler data structures. A symtab can be traversed using callbacks and method symtab::foreach. The access to a symtab is not thread safe, callers must implement thread synchronization

Definition at line 27 of file symtab.hpp.


The documentation for this class was generated from the following files: