This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[dwarflint] low-level call_site and entry_value support


Hi,

This patch adds support to the low-level dwarflint checks for the new
GNU extensions for call_site and entry_value support. Also on
mjw/call_site branch.

OK to merge to dwarf branch and push?

Thanks,

Mark
commit 49c206bdc316e3722012751d66300015e45a1a20
Author: Mark Wielaard <mjw@redhat.com>
Date:   Wed Mar 23 13:31:06 2011 +0100

    Add support for low-level dwarflint checks for call_site and entry_value.

diff --git a/dwarflint/dwarf_gnu.cc b/dwarflint/dwarf_gnu.cc
index 6335abb..b70a6d2 100644
--- a/dwarflint/dwarf_gnu.cc
+++ b/dwarflint/dwarf_gnu.cc
@@ -69,6 +69,17 @@ namespace
       add (const_attribute (DW_AT_GNU_odr_signature));
 
       add (string_attribute (DW_AT_GNU_template_name)); // xxx ???
+
+      // GNU extensions for representation of call sites
+      // http://www.dwarfstd.org/ShowIssue.php?issue=100909.2
+      add (attribute (DW_AT_GNU_call_site_value, cl_exprloc));
+      add (attribute (DW_AT_GNU_call_site_data_value, cl_exprloc));
+      add (attribute (DW_AT_GNU_call_site_target, cl_exprloc));
+      add (attribute (DW_AT_GNU_call_site_target_clobbered, cl_exprloc));
+      add (flag_attribute (DW_AT_GNU_tail_call));
+      add (flag_attribute (DW_AT_GNU_all_tail_call_sites));
+      add (flag_attribute (DW_AT_GNU_all_call_sites));
+      add (flag_attribute (DW_AT_GNU_all_source_call_sites));
     }
   };
 
diff --git a/src/dwarf-opcodes.h b/src/dwarf-opcodes.h
index f80deff..3631bef 100644
--- a/src/dwarf-opcodes.h
+++ b/src/dwarf-opcodes.h
@@ -206,4 +206,7 @@
   DW_OP_0 (DW_OP_stack_value)					\
   DW_OP_1 (DW_OP_implicit_value, DW_FORM_block)			\
   /* GNU extensions */						\
-  DW_OP_2 (DW_OP_GNU_implicit_pointer, DW_FORM_ref_addr, DW_FORM_sdata)
+  DW_OP_2 (DW_OP_GNU_implicit_pointer, DW_FORM_ref_addr, DW_FORM_sdata) \
+  /* GNU variant for tracking of values passed as arguments to functions.  */ \
+  /* http://www.dwarfstd.org/ShowIssue.php?issue=100909.1 */	\
+  DW_OP_1 (DW_OP_GNU_entry_value, DW_FORM_block)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]