-/* $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 <list>
#include <ostream>
#include <string>
+#include <vector>
+#include <msp/core/mspcore_api.h>
namespace Msp {
namespace Debug {
-class Backtrace
+class MSPCORE_API Backtrace
{
public:
struct StackFrame
{
- void *address;
+ void *address = nullptr;
std::string file;
std::string symbol;
};
private:
- std::list<StackFrame> frames;
+ std::vector<StackFrame> frames;
public:
- const std::list<StackFrame> &get_frames() const { return frames; }
+ const std::vector<StackFrame> &get_frames() const { return frames; }
static Backtrace create();
};
-std::ostream &operator<<(std::ostream &, const Backtrace &);
-std::ostream &operator<<(std::ostream &, const Backtrace::StackFrame &);
+MSPCORE_API std::ostream &operator<<(std::ostream &, const Backtrace &);
+MSPCORE_API std::ostream &operator<<(std::ostream &, const Backtrace::StackFrame &);
} // namespace Debug
} // namespace Msp