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*.

d2bad5d7c1


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@45 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mmentovai 2006-10-23 19:24:58 +00:00
parent 7772046297
commit d119a921ea
15 changed files with 192 additions and 142 deletions

View file

@ -44,43 +44,41 @@ MinidumpProcessor::MinidumpProcessor(SymbolSupplier *supplier)
MinidumpProcessor::~MinidumpProcessor() {
}
bool MinidumpProcessor::Process(const string &minidump_file,
CallStack *stack) {
CallStack* MinidumpProcessor::Process(const string &minidump_file) {
Minidump dump(minidump_file);
if (!dump.Read()) {
return false;
return NULL;
}
MinidumpException *exception = dump.GetException();
if (!exception) {
return false;
return NULL;
}
MinidumpThreadList *threads = dump.GetThreadList();
if (!threads) {
return false;
return NULL;
}
// TODO(bryner): get all the threads
MinidumpThread *thread = threads->GetThreadByID(exception->GetThreadID());
if (!thread) {
return false;
return NULL;
}
MinidumpMemoryRegion *thread_memory = thread->GetMemory();
if (!thread_memory) {
return false;
return NULL;
}
auto_ptr<Stackwalker> walker(
Stackwalker::StackwalkerForCPU(exception->GetContext(), thread_memory,
dump.GetModuleList(), supplier_));
if (!walker.get()) {
return false;
return NULL;
}
walker->Walk(stack);
return true;
return walker->Walk();
}
} // namespace google_airbag