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

Issue 9774002: Add stack contents output functionality to minidump_stackwalk (Closed)

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

Description

Add stack contents output functionality to minidump_stackwalk

This feature is enabled only when "-s" is provided as a commandline option.

minidump_stackwalk.cc:
 - Add a new commandline option "-s" to output stack contents.
 - Instantiate Minidump object in PrintMinidumpProcess() to keep it alive longer
so that accessing process_state.thread_memory_regions() in stackwalk_common.cc
doesn't result in use-after-free.

stackwalk_common.cc:
 - Add a new function PrintStackContents() to output stack contents.

R=mark@chromium.org

Committed: https://code.google.com/p/google-breakpad/source/detail?r=1429

Patch Set 1 : #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/processor/microdump_stackwalk.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/processor/minidump_stackwalk.cc View 9 chunks +27 lines, -8 lines 0 comments Download
M src/processor/stackwalk_common.cc View 1 7 chunks +153 lines, -4 lines 0 comments Download
M src/processor/stackwalk_common.h View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 8
hashimoto
Hi Mark, I find it very convenient to have functionality to glance the state of ...
9 years, 2 months ago #1
Mark Mentovai
This is fine. LGTM https://breakpad.appspot.com/9774002/diff/6/src/processor/stackwalk_common.cc File src/processor/stackwalk_common.cc (right): https://breakpad.appspot.com/9774002/diff/6/src/processor/stackwalk_common.cc#newcode611 src/processor/stackwalk_common.cc:611: printf("\n Found by: %s\n", frame->trust_description().c_str()); ...
9 years, 2 months ago #2
Ted Mielczarek
FYI I have a similar tool that I've used quite a bit in situations where ...
9 years, 2 months ago #3
hashimoto
On 2015/02/26 17:11:20, Ted Mielczarek wrote: > FYI I have a similar tool that I've ...
9 years, 2 months ago #4
hashimoto
https://breakpad.appspot.com/9774002/diff/6/src/processor/stackwalk_common.cc File src/processor/stackwalk_common.cc (right): https://breakpad.appspot.com/9774002/diff/6/src/processor/stackwalk_common.cc#newcode611 src/processor/stackwalk_common.cc:611: printf("\n Found by: %s\n", frame->trust_description().c_str()); On 2015/02/26 13:48:44, Mark ...
9 years, 2 months ago #5
hashimoto
Committed patchset #2 (id:30003) manually as r1429 (presubmit successful).
9 years, 2 months ago #6
Ted Mielczarek
FYI I tried this out locally and wound up pushing a little followup patch to ...
9 years, 2 months ago #7
hashimoto
9 years, 2 months ago #8
Message was sent while issue was closed.
On 2015/02/27 13:43:22, Ted Mielczarek wrote:
> FYI I tried this out locally and wound up pushing a little followup patch to
fix
> the formatting:
> https://code.google.com/p/google-breakpad/source/detail?r=1430
> 
> It was missing a newline at the end of the "Possible instruction pointers"
list,
> so the next frame would print at the end of the line like this:
> """
>     Possible instruction pointers:
>      *(0xbffaa93c) = 0xb778dc3e <mozalloc_abort>
> [mozalloc_abort.cpp:ea144003b87f : 20 + 0x0]
>      *(0xbffaa940) = 0xb778dc45 <mozalloc_abort>
> [mozalloc_abort.cpp:ea144003b87f : 20 + 0x7]
>      *(0xbffaa94c) = 0xb5a4eba6 <NS_DebugBreak_P>
[nsDebugImpl.cpp:c4fe2b219941
> : 386 + 0x0] 1  libxul
> .so!NS_DebugBreak_P [nsDebugImpl.cpp:c4fe2b219941 : 423 + 0x5]
> """
> 
> With the change I pushed it prints like this:
> """
>     Possible instruction pointers:
>      *(0xbffaa93c) = 0xb778dc3e <mozalloc_abort>
> [mozalloc_abort.cpp:ea144003b87f : 20 + 0x0]
>      *(0xbffaa940) = 0xb778dc45 <mozalloc_abort>
> [mozalloc_abort.cpp:ea144003b87f : 20 + 0x7]
>      *(0xbffaa94c) = 0xb5a4eba6 <NS_DebugBreak_P>
[nsDebugImpl.cpp:c4fe2b219941
> : 386 + 0x0]
> 
>  1  libxul.so!NS_DebugBreak_P [nsDebugImpl.cpp:c4fe2b219941 : 423 + 0x5]
> """

Oops, I was too careless when changing the position of the "Found by" line.
Thank you for fixing it.
Sign in to reply to this message.

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