summaryrefslogtreecommitdiffstats
path: root/dwflpp.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-09-22 17:35:31 -0400
committerFrank Ch. Eigler <fche@elastic.org>2009-09-22 17:37:01 -0400
commit4ad42007734cc4c12b9addd67542f4f76230434e (patch)
treedecc394b55fb52f4e2d3fbd92a6419f8c58030e9 /dwflpp.cxx
parent28c799966162a8a9b74a7b0e4aed092e0e10931a (diff)
downloadsystemtap-steved-4ad42007734cc4c12b9addd67542f4f76230434e.tar.gz
systemtap-steved-4ad42007734cc4c12b9addd67542f4f76230434e.tar.xz
systemtap-steved-4ad42007734cc4c12b9addd67542f4f76230434e.zip
PR10574: remove comdat/duplicate functions with entrypc=0
* dwflpp.c (die_entrypc): Reject entrypc=0 functions.
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r--dwflpp.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 867fcef2..636cd38d 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -1467,10 +1467,21 @@ dwflpp::die_entrypc (Dwarf_Die * die, Dwarf_Addr * addr)
}
}
+ // PR10574: reject subprograms where the entrypc address turns out
+ // to be 0, since they tend to correspond to duplicate-eliminated
+ // COMDAT copies of C++ functions.
+ if (rc == 0 && *addr == 0)
+ {
+ lookup_method += " (skip comdat)";
+ rc = 1;
+ }
+
if (sess.verbose > 2)
- clog << "entry-pc lookup (" << lookup_method << ") = 0x" << hex << *addr << dec
+ clog << "entry-pc lookup (" << lookup_method << " dieoffset: " << lex_cast_hex(dwarf_dieoffset (die))
+ << ") = 0x" << hex << *addr << dec
<< " (rc " << rc << ")"
<< endl;
+
return (rc == 0);
}