X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdebug%2Fbacktrace.h;h=66e36f35cfa3637c8b52b497a9d84a4b47dce87d;hb=b56eb5ec1da675da0c66abc53c1e4f6c4e4cccbd;hp=c570ce5d0746f0dd31106132f052ae8d2c715426;hpb=521cf1db00f8ce2d9f9494dca503d6c17d89ac2f;p=libs%2Fcore.git diff --git a/source/debug/backtrace.h b/source/debug/backtrace.h index c570ce5..66e36f3 100644 --- a/source/debug/backtrace.h +++ b/source/debug/backtrace.h @@ -4,6 +4,7 @@ This file is part of libmspcore Copyright © 2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ + #ifndef MSP_DEBUG_BACKTRACE_H_ #define MSP_DEBUG_BACKTRACE_H_ @@ -20,20 +21,21 @@ public: struct StackFrame { void *address; + std::string file; std::string symbol; - - StackFrame(void *a, const std::string &s): address(a), symbol(s) { } }; - typedef std::list FrameSeq; - const FrameSeq &get_frames() const { return frames; } +private: + std::list frames; + +public: + const std::list &get_frames() const { return frames; } static Backtrace create(); -private: - FrameSeq frames; }; std::ostream &operator<<(std::ostream &, const Backtrace &); +std::ostream &operator<<(std::ostream &, const Backtrace::StackFrame &); } // namespace Debug } // namespace Msp