mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-02-26 10:29:39 +00:00
Add an abstract interface to SourceLineResolver, and allow any implementation
to be used with MinidumpProcessor. The basic SourceLineResolver is now a public interface (#89) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@83 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -217,6 +217,7 @@ static u_int32_t GetPC() {
|
||||
static unsigned int CountCallerFrames() __attribute__((noinline));
|
||||
static unsigned int CountCallerFrames() {
|
||||
SelfMemoryRegion memory;
|
||||
BasicSourceLineResolver resolver;
|
||||
|
||||
#if defined(__i386__)
|
||||
MDRawContextX86 context = MDRawContextX86();
|
||||
@@ -224,13 +225,15 @@ static unsigned int CountCallerFrames() {
|
||||
context.ebp = GetEBP();
|
||||
context.esp = GetESP();
|
||||
|
||||
StackwalkerX86 stackwalker = StackwalkerX86(&context, &memory, NULL, NULL);
|
||||
StackwalkerX86 stackwalker = StackwalkerX86(&context, &memory, NULL, NULL,
|
||||
&resolver);
|
||||
#elif defined(__ppc__)
|
||||
MDRawContextPPC context = MDRawContextPPC();
|
||||
context.srr0 = GetPC();
|
||||
context.gpr[1] = GetSP();
|
||||
|
||||
StackwalkerPPC stackwalker = StackwalkerPPC(&context, &memory, NULL, NULL);
|
||||
StackwalkerPPC stackwalker = StackwalkerPPC(&context, &memory, NULL, NULL,
|
||||
&resolver);
|
||||
#endif // __i386__ || __ppc__
|
||||
|
||||
scoped_ptr<CallStack> stack(stackwalker.Walk());
|
||||
|
||||
Reference in New Issue
Block a user