dwarf2out.c (gen_subprogram_die): Require dwarf unwinding to use DW_OP_call_frame_cfa.
authorTristan Gingold <gingold@adacore.com>
Thu, 15 Mar 2012 08:44:42 +0000 (08:44 +0000)
committerTristan Gingold <gingold@gcc.gnu.org>
Thu, 15 Mar 2012 08:44:42 +0000 (08:44 +0000)
2012-03-15  Tristan Gingold  <gingold@adacore.com>

        * dwarf2out.c (gen_subprogram_die): Require dwarf unwinding to
        use DW_OP_call_frame_cfa.

From-SVN: r185411

gcc/ChangeLog
gcc/dwarf2out.c

index 5999104d6cc0bd6a942a73ed4a3599c4029d16a9..3d5ecf7e38d9bf49bdc62459497cb60acdbee35f 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-15  Tristan Gingold  <gingold@adacore.com>
+
+       * dwarf2out.c (gen_subprogram_die): Require dwarf unwinding to
+       use DW_OP_call_frame_cfa.
+
 2012-03-14  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/50797
index b3dcf9c2f02495f0fd14250f255dc1a0b79dd0a0..264edd7ceac49324a9fb2d4f985344e4909656fe 100644 (file)
@@ -17443,7 +17443,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
         (3) We can at least reuse the code inspection and interpretation
         code that determines the CFA position at various points in the
         function.  */
-      if (dwarf_version >= 3)
+      if (dwarf_version >= 3 && targetm.debug_unwind_info () == UI_DWARF2)
        {
          dw_loc_descr_ref op = new_loc_descr (DW_OP_call_frame_cfa, 0, 0);
          add_AT_loc (subr_die, DW_AT_frame_base, op);