Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(766)

Issue 459002: Refactor the logic of resolving source line info into helper class (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by SiyangXie
Modified:
12 years, 1 month ago
CC:
google-breakpad-dev_googlegroups.com
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/src/
Visibility:
Public.

Description

The logic of how symbol supplier interacts with source line resolver to fill
source line info and get WindowsFrameInfo & CFIFrameInfo, is currently embedded
in StackWalker::Walk().

Therefore it is difficult to inject custom logic into the process of
resolving(symbolizing) stack frame, without the refactoring.

In this CL, I moved the logic & code from StackWalker into a separate helper
class named SourceLineResolverHelper.  This enables us to extend or override the
logic by subclassing the helper class, for example, adding a cache layer, or
symbolizing remotely via network, etc.

This CL shouldn't affect any existing user of breakpad processor.

Patch Set 1 #

Total comments: 15

Patch Set 2 : Update minidump processor and stack_frame to address code view comment. #

Patch Set 3 : Include Makefile.[am|in] in this changelist. #

Total comments: 35

Patch Set 4 : Rename helper class plus some other changes. #

Patch Set 5 : Update header guard in new header file. #

Total comments: 28

Patch Set 6 : Addressed some minor nits. #

Patch Set 7 : Cleanup #

Patch Set 8 : Lint. #

Patch Set 9 : Patch to another svn client with write permission. #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M Makefile.am View 1 2 3 4 5 6 chunks +6 lines, -0 lines 0 comments Download
M Makefile.in View 1 2 3 4 5 65 chunks +94 lines, -130 lines 0 comments Download
M aclocal.m4 View 1 2 3 4 5 18 chunks +27 lines, -49 lines 0 comments Download
M configure View 1 2 3 4 5 190 chunks +349 lines, -401 lines 0 comments Download
M src/google_breakpad/processor/minidump_processor.h View 1 2 3 4 5 6 7 4 chunks +22 lines, -13 lines 0 comments Download
M src/google_breakpad/processor/stack_frame_cpu.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M src/google_breakpad/processor/stackwalker.h View 1 2 3 4 5 6 7 8 chunks +28 lines, -41 lines 0 comments Download
M src/processor/minidump_processor.cc View 1 2 3 4 5 6 7 6 chunks +22 lines, -6 lines 0 comments Download
M src/processor/stackwalker.cc View 1 2 3 4 5 6 chunks +39 lines, -86 lines 0 comments Download
M src/processor/stackwalker_amd64.cc View 1 2 3 4 5 6 chunks +19 lines, -20 lines 0 comments Download
M src/processor/stackwalker_amd64.h View 1 2 3 4 5 6 7 3 chunks +12 lines, -12 lines 0 comments Download
M src/processor/stackwalker_amd64_unittest.cc View 1 2 3 4 5 6 7 10 chunks +17 lines, -10 lines 0 comments Download
M src/processor/stackwalker_arm.cc View 1 2 3 4 5 6 7 11 chunks +28 lines, -27 lines 0 comments Download
M src/processor/stackwalker_arm.h View 1 2 3 4 5 2 chunks +11 lines, -12 lines 0 comments Download
M src/processor/stackwalker_arm_unittest.cc View 1 2 3 4 5 6 7 11 chunks +20 lines, -10 lines 0 comments Download
M src/processor/stackwalker_ppc.cc View 1 2 3 4 5 5 chunks +10 lines, -11 lines 0 comments Download
M src/processor/stackwalker_ppc.h View 1 2 3 4 5 1 chunk +7 lines, -8 lines 0 comments Download
M src/processor/stackwalker_sparc.cc View 1 2 3 4 5 6 7 6 chunks +14 lines, -15 lines 0 comments Download
M src/processor/stackwalker_sparc.h View 1 2 3 4 5 1 chunk +7 lines, -8 lines 0 comments Download
M src/processor/stackwalker_x86.cc View 1 2 3 4 5 6 7 13 chunks +35 lines, -36 lines 0 comments Download
M src/processor/stackwalker_x86.h View 1 2 3 4 5 6 7 4 chunks +15 lines, -15 lines 0 comments Download
M src/processor/stackwalker_x86_unittest.cc View 1 2 3 4 5 15 chunks +29 lines, -14 lines 0 comments Download

Messages

Total messages: 11
Ivan Penkov
. http://breakpad.appspot.com/459002/diff/1/google_breakpad/processor/minidump_processor.h File google_breakpad/processor/minidump_processor.h (right): http://breakpad.appspot.com/459002/diff/1/google_breakpad/processor/minidump_processor.h#newcode165 google_breakpad/processor/minidump_processor.h:165: SymbolSupplier *supplier_; Do we still need supplier_ and ...
12 years, 1 month ago #1
SiyangXie
http://breakpad.appspot.com/459002/diff/1/google_breakpad/processor/minidump_processor.h File google_breakpad/processor/minidump_processor.h (right): http://breakpad.appspot.com/459002/diff/1/google_breakpad/processor/minidump_processor.h#newcode165 google_breakpad/processor/minidump_processor.h:165: SymbolSupplier *supplier_; I've removed them. I added a boolean ...
12 years, 1 month ago #2
Ivan Penkov
On 2012/09/28 22:14:13, SiyangXie wrote: > http://breakpad.appspot.com/459002/diff/1/google_breakpad/processor/minidump_processor.h > File google_breakpad/processor/minidump_processor.h (right): > > http://breakpad.appspot.com/459002/diff/1/google_breakpad/processor/minidump_processor.h#newcode165 > ...
12 years, 1 month ago #3
Ted Mielczarek
I didn't finish reviewing this, but I figured I'd get my comments up so you ...
12 years, 1 month ago #4
Ted Mielczarek
Here's a more thorough review. Please take a look at my previous partial review as ...
12 years, 1 month ago #5
SiyangXie
http://breakpad.appspot.com/459002/diff/1/google_breakpad/processor/source_line_resolver_helper.h File google_breakpad/processor/source_line_resolver_helper.h (right): http://breakpad.appspot.com/459002/diff/1/google_breakpad/processor/source_line_resolver_helper.h#newcode52 google_breakpad/processor/source_line_resolver_helper.h:52: class SourceLineResolverHelper { On 2012/09/30 17:11:16, Ted Mielczarek wrote: ...
12 years, 1 month ago #6
Ted Mielczarek
http://breakpad.appspot.com/459002/diff/11002/src/processor/stackwalker.cc File src/processor/stackwalker.cc (right): http://breakpad.appspot.com/459002/diff/11002/src/processor/stackwalker.cc#newcode181 src/processor/stackwalker.cc:181: if (!resolver_helper_->resolver() || !resolver_helper_->supplier()) { On 2012/10/02 22:29:13, SiyangXie ...
12 years, 1 month ago #7
SiyangXie
On 2012/10/03 00:31:34, Ted Mielczarek wrote: > http://breakpad.appspot.com/459002/diff/11002/src/processor/stackwalker.cc > File src/processor/stackwalker.cc (right): > > http://breakpad.appspot.com/459002/diff/11002/src/processor/stackwalker.cc#newcode181 ...
12 years, 1 month ago #8
Ted Mielczarek
On Mon, Oct 8, 2012 at 1:47 PM, <SiyangXie@gmail.com> wrote: > Hi Ted, have you ...
12 years, 1 month ago #9
Ted Mielczarek
This LGTM with some minor nits addressed. http://breakpad.appspot.com/459002/diff/9005/src/google_breakpad/processor/minidump_processor.h File src/google_breakpad/processor/minidump_processor.h (right): http://breakpad.appspot.com/459002/diff/9005/src/google_breakpad/processor/minidump_processor.h#newcode110 src/google_breakpad/processor/minidump_processor.h:110: MinidumpProcessor(StackFrameSymbolizer *stack_frame_symbolizer, ...
12 years, 1 month ago #10
SiyangXie
12 years, 1 month ago #11
Thanks for review!

I've cleaned up and passed all tests in make check.
Submitting it now...

http://breakpad.appspot.com/459002/diff/9005/src/google_breakpad/processor/mi...
File src/google_breakpad/processor/minidump_processor.h (right):

http://breakpad.appspot.com/459002/diff/9005/src/google_breakpad/processor/mi...
src/google_breakpad/processor/minidump_processor.h:110:
MinidumpProcessor(StackFrameSymbolizer *stack_frame_symbolizer,
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> The * should be next to the type name, here and elsewhere:
> "StackFrameSymbolizer* stack_frame_symbolizer"

Done.

http://breakpad.appspot.com/459002/diff/9005/src/google_breakpad/processor/st...
File src/google_breakpad/processor/stackwalker.h (right):

http://breakpad.appspot.com/459002/diff/9005/src/google_breakpad/processor/st...
src/google_breakpad/processor/stackwalker.h:89: // associated with. 
frame_symbolizer, is a StackFrameSymbolizer object that
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> unnecessary comma.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/google_breakpad/processor/st...
src/google_breakpad/processor/stackwalker.h:97: StackFrameSymbolizer
*frame_symbolizer);
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name, here and below. (you could fix the formatting of the rest
> of the arguments to this constructor while you're here.)

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker.cc
File src/processor/stackwalker.cc (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker.cc#new...
src/processor/stackwalker.cc:63: StackFrameSymbolizer *frame_symbolizer)
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name, here and below.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_amd64.cc
File src/processor/stackwalker_amd64.cc (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_amd64....
src/processor/stackwalker_amd64.cc:96: StackFrameSymbolizer *resolver_helper)
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_amd64.h
File src/processor/stackwalker_amd64.h (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_amd64....
src/processor/stackwalker_amd64.h:62: StackFrameSymbolizer *frame_symbolizer);
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_arm.cc
File src/processor/stackwalker_arm.cc (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_arm.cc...
src/processor/stackwalker_arm.cc:53: StackFrameSymbolizer *resolver_helper)
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_arm.h
File src/processor/stackwalker_arm.h (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_arm.h#...
src/processor/stackwalker_arm.h:62: StackFrameSymbolizer *frame_symbolizer);
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_ppc.cc
File src/processor/stackwalker_ppc.cc (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_ppc.cc...
src/processor/stackwalker_ppc.cc:50: StackFrameSymbolizer *resolver_helper)
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_ppc.h
File src/processor/stackwalker_ppc.h (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_ppc.h#...
src/processor/stackwalker_ppc.h:60: StackFrameSymbolizer *frame_symbolizer);
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_sparc.cc
File src/processor/stackwalker_sparc.cc (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_sparc....
src/processor/stackwalker_sparc.cc:50: StackFrameSymbolizer *resolver_helper)
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_sparc.h
File src/processor/stackwalker_sparc.h (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_sparc....
src/processor/stackwalker_sparc.h:60: StackFrameSymbolizer *frame_symbolizer);
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_x86.cc
File src/processor/stackwalker_x86.cc (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_x86.cc...
src/processor/stackwalker_x86.cc:84: StackFrameSymbolizer *resolver_helper)
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_x86.h
File src/processor/stackwalker_x86.h (right):

http://breakpad.appspot.com/459002/diff/9005/src/processor/stackwalker_x86.h#...
src/processor/stackwalker_x86.h:65: StackFrameSymbolizer *frame_symbolizer);
On 2012/10/09 12:30:54, Ted Mielczarek wrote:
> * next to type name.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted