|
|
|
@ -9,6 +9,10 @@ |
|
|
|
|
@license LGPL, see file <a href="license.html">COPYING</a> |
|
|
|
|
|
|
|
|
|
$Log$ |
|
|
|
|
Revision 1.6 2004/10/07 16:59:12 marc |
|
|
|
|
new method createSymtable that takes a list of arguments |
|
|
|
|
-> untested! |
|
|
|
|
|
|
|
|
|
Revision 1.5 2004/10/07 09:32:45 marc |
|
|
|
|
correction in parameter (const&) |
|
|
|
|
|
|
|
|
@ -30,6 +34,7 @@ |
|
|
|
|
#define __MRW_STACKTRACE_HPP__ |
|
|
|
|
#include <mrw/auto.hpp> |
|
|
|
|
#include <vector> |
|
|
|
|
#include <list> |
|
|
|
|
#include <map> |
|
|
|
|
#include <string> |
|
|
|
|
#include <memory> |
|
|
|
@ -173,7 +178,8 @@ namespace mrw { |
|
|
|
|
/// evaluate the stack trace and print it to a stream
|
|
|
|
|
const StackTrace& print(std::ostream& os) const throw(std::bad_exception); |
|
|
|
|
/// evaluates and returns all information from a raw address
|
|
|
|
|
static CodePos translate(void* addr) throw(std::bad_exception); |
|
|
|
|
static CodePos translate(void* addr) |
|
|
|
|
throw(std::bad_exception); |
|
|
|
|
|
|
|
|
|
/** @brief read the symbol table from the executable file
|
|
|
|
|
|
|
|
|
@ -191,11 +197,40 @@ namespace mrw { |
|
|
|
|
(that means for the creation of a mrw::StackTrace object) a |
|
|
|
|
call to this method is not yet needed. |
|
|
|
|
|
|
|
|
|
@note Call only one of both createSymtable methods! |
|
|
|
|
|
|
|
|
|
@note If this method is called more than once, the symbols |
|
|
|
|
are created only the first time, so you don't loose too much |
|
|
|
|
time. |
|
|
|
|
*/ |
|
|
|
|
static bool createSymtable(const std::string& fname="") |
|
|
|
|
throw(std::bad_exception); |
|
|
|
|
|
|
|
|
|
/** @brief read the symbol table from a list of an executable file and
|
|
|
|
|
shared libraries |
|
|
|
|
|
|
|
|
|
@param fnames The list of file names that must contain the |
|
|
|
|
executable plus all shared libraries that should be included |
|
|
|
|
in stack traces. |
|
|
|
|
|
|
|
|
|
@return @c true in case of success. If @c false is returned, |
|
|
|
|
the symbol table was not completely read and the evaluation |
|
|
|
|
cannot be done. Printing then only prints the raw addresses, |
|
|
|
|
without file, line nmber information and method names. |
|
|
|
|
|
|
|
|
|
@note This method must be executed once before a stack trace |
|
|
|
|
is printed the very first time. For storing a stack trace |
|
|
|
|
(that means for the creation of a mrw::StackTrace object) a |
|
|
|
|
call to this method is not yet needed. |
|
|
|
|
|
|
|
|
|
@note Call only one of both createSymtable methods! |
|
|
|
|
|
|
|
|
|
@note If this method is called more than once, the symbols |
|
|
|
|
are created only the first time, so you don't loose too much |
|
|
|
|
time. |
|
|
|
|
*/ |
|
|
|
|
static bool createSymtable(const std::string& fname="") throw(std::bad_exception); |
|
|
|
|
static bool createSymtable(const std::list<std::string>& fnames) throw(std::bad_exception); |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
//............................................................... typedefs
|
|
|
|
|
typedef std::map<bfd_vma, std::pair<bfd_vma, asection*> > |
|
|
|
|