aboutsummaryrefslogtreecommitdiff
path: root/src/processor/stackwalker.h
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-10-23 19:24:58 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-10-23 19:24:58 +0000
commitd119a921ea611dc38cfcb7411759ddf2c688603f (patch)
tree392d79dada82458d74b010a4974ca09cb204211c /src/processor/stackwalker.h
parentUpdate comments to reflect HTTPS support, r=mark. (diff)
downloadbreakpad-d119a921ea611dc38cfcb7411759ddf2c688603f.tar.xz
Make stack_frame_info vector hold linked_ptrs instead of objects;
make Stackwalker::Walk create and return a CallStack instead of filling a caller-supplied one (#54). r=bryner Interface change: Stackwalker::Walk and MinidumpProcessor::Process now return a new CallStack*. http://groups.google.com/group/airbag-dev/browse_thread/thread/d2bad5d7c115c3fe git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@45 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/stackwalker.h')
-rw-r--r--src/processor/stackwalker.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/processor/stackwalker.h b/src/processor/stackwalker.h
index d4eb0745..82421bb5 100644
--- a/src/processor/stackwalker.h
+++ b/src/processor/stackwalker.h
@@ -43,25 +43,28 @@
#include <vector>
-#include "processor/stack_frame_info.h"
-
namespace google_airbag {
class CallStack;
+template<typename T> class linked_ptr;
class MemoryRegion;
class MinidumpContext;
class MinidumpModuleList;
struct StackFrame;
+struct StackFrameInfo;
class SymbolSupplier;
+using std::vector;
+
class Stackwalker {
public:
virtual ~Stackwalker() {}
- // Fills the given CallStack by calling GetContextFrame and GetCallerFrame,
- // and populating the returned frames with all available data.
- void Walk(CallStack* stack);
+ // Creates a new CallStack and populates it by calling GetContextFrame and
+ // GetCallerFrame. The frames are further processed to fill all available
+ // data. The caller takes ownership of the CallStack returned by Walk.
+ CallStack* Walk();
// Returns a new concrete subclass suitable for the CPU that a stack was
// generated on, according to the CPU type indicated by the context
@@ -86,11 +89,6 @@ class Stackwalker {
// get information from the stack.
MemoryRegion *memory_;
- // Additional debugging information for each stack frame. This vector
- // parallels the CallStack. Subclasses may use this information to help
- // walk the stack.
- std::vector<StackFrameInfo> stack_frame_info_;
-
private:
// Obtains the context frame, the innermost called procedure in a stack
// trace. Returns NULL on failure. GetContextFrame allocates a new
@@ -106,7 +104,9 @@ class Stackwalker {
// the end of the stack has been reached). GetCallerFrame allocates a new
// StackFrame (or StackFrame subclass), ownership of which is taken by
// the caller.
- virtual StackFrame* GetCallerFrame(const CallStack *stack) = 0;
+ virtual StackFrame* GetCallerFrame(
+ const CallStack *stack,
+ const vector< linked_ptr<StackFrameInfo> > &stack_frame_info) = 0;
// A list of modules, for populating each StackFrame's module information.
// This field is optional and may be NULL.