From 815e4cf7441d83ffca6d4d797a1a313f7c6464ab Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 15 Dec 2014 10:58:01 +0000 Subject: Hand-apply 155b4b9f615f42b5cc26e2953860aba34b17bbc0; allow build of Windows debug version using gdb. --- src/lib/stack.hpp | 58 ------------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/lib/stack.hpp (limited to 'src/lib/stack.hpp') diff --git a/src/lib/stack.hpp b/src/lib/stack.hpp deleted file mode 100644 index 73a13bf85..000000000 --- a/src/lib/stack.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2007 Edd Dawson. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef STACK_HPP_0022_01092007 -#define STACK_HPP_0022_01092007 - -#include -#include -#include - -namespace dbg -{ - //! stack_frame objects are collected by a stack object. They contain information about the instruction pointer, - //! the name of the corresponding function and the "module" (executable or library) in which the function resides. - struct stack_frame - { - stack_frame(const void *instruction, const std::string &function, unsigned int line, const std::string &module); - - const void *instruction; - std::string function; - unsigned int line; - std::string module; - }; - - //! Allows you to write a stack_frame object to an std::ostream - std::ostream &operator<< (std::ostream &out, const stack_frame &frame); - - //! Instantiate a dbg::stack object to collect information about the current call stack. Once created, a stack object - //! may be freely copied about and will continue to contain the information about the scope in which collection occurred. - class stack - { - public: - typedef std::list::size_type depth_type; - typedef std::list::const_iterator const_iterator; - - //! Collect information about the current call stack. Information on the most recent frames will be collected - //! up to the specified limit. 0 means unlimited. - //! An std::runtime_error may be thrown on failure. - stack(depth_type limit = 0); - - //! Returns an iterator referring to the "top" stack frame - const_iterator begin() const; - - //! Returns an iterator referring to one past the "bottom" stack frame - const_iterator end() const; - - //! Returns the number of frames collected - depth_type depth() const; - - private: - std::list frames_; - }; - -} // close namespace dbg - -#endif // STACK_HPP_0022_01092007 -- cgit v1.2.3