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:
bryner 2006-12-11 23:22:54 +00:00
parent 65dbfcc15f
commit fd38d48e6d
18 changed files with 252 additions and 157 deletions

View file

@ -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());