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

Issue 59002: Breakpad Linux dumper: Parse the .eh_frame section. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 6 months ago by jimb
Modified:
16 years, 5 months ago
Reviewers:
mochalatte
CC:
google-breakpad-dev_googlegroups.com
Visibility:
Public.

Description

Extend google_breakpad::CFISection with the ability to produce
.eh_frame data. Entry headers have a different format, and pointers
can be encoded in new and fascinating ways.

Extend dwarf2reader::CallFrameInfo to be able to parse either DWARF
CFI or .eh_frame data, as determined by an argument to the
constructor. Cope with variations in header formats, encoded pointers,
and additional data in 'z' augmentation data blocks. Extend the unit
tests appropriately.

Extend dump_syms to look for a .eh_frame section, and if it is
present, find the necessary base addresess and parse its contents.

There's no need for DwarfCFIToModule to check the version numbers; if
CallFrameInfo can parse it, DwarfCFIToModule should be able to handle
it. Adjust tests accordingly.

Patch Set 1 #

Total comments: 15
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/common/dwarf/cfi_assembler.cc View 2 chunks +100 lines, -7 lines 0 comments Download
M src/common/dwarf/cfi_assembler.h View 3 chunks +111 lines, -4 lines 0 comments Download
M src/common/dwarf/dwarf2reader.cc View 8 chunks +314 lines, -53 lines 10 comments Download
M src/common/dwarf/dwarf2reader.h View 6 chunks +206 lines, -36 lines 2 comments Download
M src/common/dwarf/dwarf2reader_cfi_unittest.cc View 20 chunks +525 lines, -4 lines 1 comment Download
M src/common/linux/dump_symbols.cc View 4 chunks +33 lines, -3 lines 2 comments Download
M src/common/linux/dwarf_cfi_to_module.cc View 1 chunk +4 lines, -6 lines 0 comments Download
M src/common/linux/dwarf_cfi_to_module_unittest.cc View 1 chunk +0 lines, -14 lines 0 comments Download

Messages

Total messages: 5
jimb
Here's the main patch for .eh_frame support. With this, CFI on x86 Linux should pretty ...
16 years, 6 months ago #1
mochalatte
http://breakpad.appspot.com/59002/diff/1/4 File src/common/dwarf/dwarf2reader.cc (right): http://breakpad.appspot.com/59002/diff/1/4#newcode1873 Line 1873: // was never a version 2 fo CFI ...
16 years, 5 months ago #2
mochalatte
LGTM
16 years, 5 months ago #3
jimb
Committed, r552.
16 years, 5 months ago #4
jimb
16 years, 5 months ago #5
I'm sorry, Neal --- I forgot that there were comments here to be addressed; I
just saw the "LGTM" and went ahead.  Here are replies to the comments; I'll post
a fresh patch to address the comments shortly.

http://breakpad.appspot.com/59002/diff/1/4
File src/common/dwarf/dwarf2reader.cc (right):

http://breakpad.appspot.com/59002/diff/1/4#newcode1873
Line 1873: // was never a version 2 fo CFI data). For .eh_frame, we handle only
On 2010/03/03 22:35:01, mochalatte wrote:
> s/fo/of/

Fixed --- thanks!

http://breakpad.appspot.com/59002/diff/1/4#newcode1881
Line 1881: if (cie->version < 1 || 3 < cie->version) {
On 2010/03/03 22:35:01, mochalatte wrote:
> can you change this to be consistent in terms of "variable op constant"?

I was trying to be consistent with the use of '<', so it looks like a number
line.  But I'll make this change.

http://breakpad.appspot.com/59002/diff/1/4#newcode1897
Line 1897: if (cie->augmentation.empty()) {
Done.  I had a reason for doing it that way, but it doesn't seem so compelling
now.

http://breakpad.appspot.com/59002/diff/1/4#newcode1953
Line 1953: // the pointer itself.
On 2010/03/03 22:35:01, mochalatte wrote:
> thanks for the detailed comments
> can we make the character literals constants?

Okay.

http://breakpad.appspot.com/59002/diff/1/4#newcode2298
Line 2298: " 'z' augmentation specifies a pointer encoding for which we have no
base address: 0x%02x\n",
On 2010/03/03 22:35:01, mochalatte wrote:
> 80 chars

D'oh.

http://breakpad.appspot.com/59002/diff/1/5
File src/common/dwarf/dwarf2reader.h (right):

http://breakpad.appspot.com/59002/diff/1/5#newcode638
Line 638: 
On 2010/03/03 22:35:01, mochalatte wrote:
> keep these one per line according to style guide.
>
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Constructor_In...

I'm happy to do this, but that's not how I read that. It says that if they don't
all fit on the first line, then they should be indented by four spaces, but it
doesn't say that they must be one per line. Doing so would be inconsistent with
the general admonition to conserve vertical space.

http://breakpad.appspot.com/59002/diff/1/7
File src/common/linux/dump_symbols.cc (right):

http://breakpad.appspot.com/59002/diff/1/7#newcode419
Line 419: }
I think we should dump it.  For example, suppose some frames in the stack trace
are in code that was compiled with exceptions enabled, but without debugging
information. As written, this code will generate STACK CFI records, but nothing
else, and I believe the backtrace will list addresses, but we may be able to
walk the stack back into code that does have debug information.
Sign in to reply to this message.

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