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

Issue 62002: Breakpad: Support DWARF CFI-driven stack walking on ARM. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by jimb
Modified:
14 years, 1 month ago
Reviewers:
Mark Mentovai
CC:
google-breakpad-dev_googlegroups.com
Visibility:
Public.

Description

This patch allows the Breakpad minidump processor to use data from
STACK CFI records to generate stack traces for the ARM processor.

In the symbol dumper, we need a table mapping DWARF CFI register
numbers to their names: STACK CFI records refer to registers by name.

In the processor, we expand StackwalkerARM::GetCallerFrame to see if
there are STACK CFI records covering the callee, and then use those to
recover the caller's register values.

There's no good reason the ARM walker couldn't use the SimpleCFIWalker
interface declared in cfi_frame_info.h. Unfortunately, that interface
assumes that one can map register names to member pointers of the raw
context type, while MDRawContextARM uses an array to hold the
registers' values: C++ pointer-to-member types can't refer to elements
of member arrays. So we have to write out SimpleCFIWalker::FindCallerRegisters
in StackwalkerARM::GetCallerFrame.

We define enum MDARMRegisterNumbers in minidump_cpu_arm.h, for
convenience in referring to certain ARM registers with dedicated
purposes, like the stack pointer and the PC.

We define validity flags in StackFrameARM for all the registers, since
CFI could theoretically recover any of them. In the same vein, we
expand minidump_stackwalk.cc to print the values of all valid
callee-saves registers in the context --- and use the proper names for
special-purpose registers.

We provide unit tests that give full code and branch coverage (with
minor exceptions). We add a testing interface to StackwalkerARM that
allows us to create context frames that lack some register values.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M Makefile.am View 2 chunks +15 lines, -0 lines 0 comments Download
M Makefile.in View 11 chunks +127 lines, -1 line 0 comments Download
M src/common/linux/dump_symbols.cc View 1 chunk +11 lines, -8 lines 0 comments Download
M src/google_breakpad/common/minidump_cpu_arm.h View 1 chunk +10 lines, -0 lines 0 comments Download
M src/google_breakpad/processor/stack_frame_cpu.h View 1 chunk +38 lines, -13 lines 0 comments Download
M src/processor/minidump_stackwalk.cc View 1 chunk +25 lines, -6 lines 0 comments Download
M src/processor/stackwalker_arm.cc View 1 chunk +106 lines, -8 lines 0 comments Download
M src/processor/stackwalker_arm.h View 2 chunks +13 lines, -1 line 0 comments Download
A src/processor/stackwalker_arm_unittest.cc View 1 chunk +439 lines, -0 lines 0 comments Download

Messages

Total messages: 3
jimb
Hi, Mark. I'm not sure who should review this; please feel free to reassign it ...
14 years, 2 months ago #1
Mark Mentovai
I don't know very much about ARM, but this seems right.
14 years, 2 months ago #2
jimb
14 years, 1 month ago #3
Committed, r553.
Sign in to reply to this message.

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