aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/dwarf_cu_to_module.cc
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-02-20 00:51:22 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-02-20 00:51:22 +0000
commitd6fb5a7c510917af7455e28ac28423d0ee280207 (patch)
tree1393cf9660fbd446d70f006535071354048fdcda /src/common/linux/dwarf_cu_to_module.cc
parentBreakpad Linux dumper: Compare section names correctly. (diff)
downloadbreakpad-d6fb5a7c510917af7455e28ac28423d0ee280207.tar.xz
Breakpad Linux dumper: Record AbstractOrigin entries for all DIEs that need them.
Any DIE with an DW_AT_inline attribute can be cited by DW_AT_abstract_origin attributes --- even if the value of the DW_AT_inline attribute is DW_INL_not_inlined. Thus, we need to set the inline_ flag on all such DIEs, regardless of the attribute's value. This allows us to find names in situations like this: <1><30cf>: Abbrev Number: 57 (DW_TAG_subprogram) <30d0> DW_AT_specification: <0x3013> <30d4> DW_AT_decl_file : 1 <30d5> DW_AT_decl_line : 92 <30d6> DW_AT_inline : 0 (not inlined) <30d7> DW_AT_sibling : <0x30f0> ... <1><30f5>: Abbrev Number: 59 (DW_TAG_subprogram) <30f6> DW_AT_abstract_origin: <0x30cf> <30fa> DW_AT_low_pc : 0x13bc <30fe> DW_AT_high_pc : 0x13ec <3102> DW_AT_frame_base : 0x2c (location list) <3106> DW_AT_sibling : <0x3113> a=jimblandy, r=nealsid,dmuir git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@526 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/dwarf_cu_to_module.cc')
-rw-r--r--src/common/linux/dwarf_cu_to_module.cc30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/common/linux/dwarf_cu_to_module.cc b/src/common/linux/dwarf_cu_to_module.cc
index 88cea940..19efafd0 100644
--- a/src/common/linux/dwarf_cu_to_module.cc
+++ b/src/common/linux/dwarf_cu_to_module.cc
@@ -327,16 +327,11 @@ void DwarfCUToModule::FuncHandler::ProcessAttributeUnsigned(
enum DwarfForm form,
uint64 data) {
switch (attr) {
- case dwarf2reader::DW_AT_inline:
- switch(data) {
- case dwarf2reader::DW_INL_inlined:
- case dwarf2reader::DW_INL_declared_not_inlined:
- case dwarf2reader::DW_INL_declared_inlined:
- inline_ = true; break;
- default:
- break;
- }
- break;
+ // If this attribute is present at all --- even if its value is
+ // DW_INL_not_inlined --- then GCC may cite it as someone else's
+ // DW_AT_abstract_origin attribute.
+ case dwarf2reader::DW_AT_inline: inline_ = true; break;
+
case dwarf2reader::DW_AT_low_pc: low_pc_ = data; break;
case dwarf2reader::DW_AT_high_pc: high_pc_ = data; break;
default:
@@ -350,16 +345,11 @@ void DwarfCUToModule::FuncHandler::ProcessAttributeSigned(
enum DwarfForm form,
int64 data) {
switch (attr) {
- case dwarf2reader::DW_AT_inline:
- switch(data) {
- case dwarf2reader::DW_INL_inlined:
- case dwarf2reader::DW_INL_declared_not_inlined:
- case dwarf2reader::DW_INL_declared_inlined:
- inline_ = true; break;
- default:
- break;
- }
- break;
+ // If this attribute is present at all --- even if its value is
+ // DW_INL_not_inlined --- then GCC may cite it as someone else's
+ // DW_AT_abstract_origin attribute.
+ case dwarf2reader::DW_AT_inline: inline_ = true; break;
+
default:
break;
}