mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-05 05:58:24 +01:00
Add support to the StackWalker for resolving symbols, using a
caller-implemented SymbolSupplier object to get a symbol file. Add a CrashReportProcessor object which provides a simple API for processing a CrashReport struct, given a SymbolSupplier and a minidump file. r=mmentovai (#17)) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@18 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
39716226cf
commit
d5e66382d1
17 changed files with 14492 additions and 3332 deletions
|
|
@ -30,13 +30,10 @@
|
|||
#define open _open
|
||||
#endif // !_WIN32
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "processor/minidump.h"
|
||||
#include "processor/stackwalker_x86.h"
|
||||
|
||||
|
||||
using std::auto_ptr;
|
||||
using namespace google_airbag;
|
||||
|
||||
|
||||
|
|
@ -95,17 +92,15 @@ int main(int argc, char** argv) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
StackwalkerX86 stackwalker = StackwalkerX86(context, stack_memory, modules);
|
||||
StackwalkerX86 stackwalker = StackwalkerX86(context, stack_memory,
|
||||
modules, NULL, NULL);
|
||||
|
||||
auto_ptr<StackFrames> stack(stackwalker.Walk());
|
||||
if (!stack.get()) {
|
||||
fprintf(stderr, "stackwalker->Walk() failed\n");
|
||||
exit(1);
|
||||
}
|
||||
StackFrames stack;
|
||||
stackwalker.Walk(&stack);
|
||||
|
||||
unsigned int index;
|
||||
for (index = 0 ; index < stack->size() ; index++) {
|
||||
StackFrame frame = stack->at(index);
|
||||
for (index = 0 ; index < stack.size() ; index++) {
|
||||
StackFrame frame = stack.at(index);
|
||||
printf("[%2d] ebp = 0x%08llx eip = 0x%08llx \"%s\" + 0x%08llx\n",
|
||||
index,
|
||||
frame.frame_pointer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue