This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug debug/36728] [stack]: gdb doesn't work with stack alignment



------- Comment #9 from hjl dot tools at gmail dot com  2008-07-04 16:04 -------
We can start with

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 137474)
+++ config/i386/i386.c  (working copy)
@@ -6628,7 +6628,7 @@ ix86_get_drap_rtx (void)
       unsigned int regno = find_drap_reg ();
       rtx drap_vreg;
       rtx arg_ptr;
-      rtx seq;
+      rtx seq, insn;

       arg_ptr = gen_rtx_REG (Pmode, regno);
       crtl->drap_reg = arg_ptr;
@@ -6638,7 +6638,9 @@ ix86_get_drap_rtx (void)
       seq = get_insns ();
       end_sequence ();

-      emit_insn_before (seq, NEXT_INSN (entry_of_function ()));
+      insn = emit_insn_before (seq, NEXT_INSN (entry_of_function ()));
+      RTX_FRAME_RELATED_P (insn) = 1;
+
       return drap_vreg;
     }
   else


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36728


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