X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fdebug%2Fbacktrace.h;h=98aa4d8cdd9736291253cecf403b10d75bf43b2a;hp=c570ce5d0746f0dd31106132f052ae8d2c715426;hb=41363aed34382386f915f17c1a961750b4fdcb14;hpb=521cf1db00f8ce2d9f9494dca503d6c17d89ac2f diff --git a/source/debug/backtrace.h b/source/debug/backtrace.h index c570ce5..98aa4d8 100644 --- a/source/debug/backtrace.h +++ b/source/debug/backtrace.h @@ -1,15 +1,9 @@ -/* $Id$ - -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_ -#include #include #include +#include namespace Msp { namespace Debug { @@ -19,21 +13,22 @@ class Backtrace public: struct StackFrame { - void *address; + void *address = nullptr; + 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::vector frames; + +public: + const std::vector &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