mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-30 03:04:54 +01:00
Add support for parsing the DW_AT_ranges attributes
This enables the DWARF reader to properly parse DW_AT_ranges attributes in compilation units and functions. Code covered by a function is now represented by a vector of ranges instead of a single contiguous range and DW_AT_ranges entries are used to populate it. All the code and tests that assumed functions to be contiguous entities has been updated to reflect the change. DW_AT_ranges attributes found in compilation units are parsed but no data is generated for them as it is not currently needed. BUG=754 Change-Id: I310391b525aaba0dd329f1e3187486f2e0c6d442 Reviewed-on: https://chromium-review.googlesource.com/1124721 Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
This commit is contained in:
parent
7b98edabb6
commit
16e08520e6
20 changed files with 653 additions and 122 deletions
|
|
@ -85,10 +85,19 @@ class Module {
|
|||
int source_id;
|
||||
};
|
||||
|
||||
// An address range.
|
||||
struct Range {
|
||||
Range(const Address address_input, const Address size_input) :
|
||||
address(address_input), size(size_input) { }
|
||||
|
||||
Address address;
|
||||
Address size;
|
||||
};
|
||||
|
||||
// A function.
|
||||
struct Function {
|
||||
Function(const string &name_input, const Address &address_input) :
|
||||
name(name_input), address(address_input), size(0), parameter_size(0) {}
|
||||
name(name_input), address(address_input), parameter_size(0) {}
|
||||
|
||||
// For sorting by address. (Not style-guide compliant, but it's
|
||||
// stupid not to put this in the struct.)
|
||||
|
|
@ -99,9 +108,9 @@ class Module {
|
|||
// The function's name.
|
||||
const string name;
|
||||
|
||||
// The start address and length of the function's code.
|
||||
// The start address and the address ranges covered by the function.
|
||||
const Address address;
|
||||
Address size;
|
||||
vector<Range> ranges;
|
||||
|
||||
// The function's parameter size.
|
||||
Address parameter_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue