[Dwarf-Discuss] [PATCH v2] ARC: gas: Generate offset with Default CFA

Vineet Gupta Vineet.Gupta1 at synopsys.com
Mon Jun 27 06:41:07 PDT 2016


This makes the kernel dwarf stack unwinder work again which expects an
offset with default CFA in the initial instructions.

gas	* config//tc-arc.c (tc_arc_frame_initial_instructions): Use
	cfi_add_CFA_def_cfa to generate default CFA with offset

Signed-off-by: Vineet Gupta <vgupta at synopsys.com>
---
 gas/ChangeLog       | 5 +++++
 gas/config/tc-arc.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2a28352f77a6..0033f91865e1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-27  Vineet Gupta <vgupta at synopsys.com>
+
+	* config//tc-arc.c (tc_arc_frame_initial_instructions): Use
+	cfi_add_CFA_def_cfa to generate default CFA with offset
+
 2016-06-27  Trevor Saunders  <tbsaunde+binutils at tbsaunde.org>
 
 	* config/tc-dlx.c: Include bfd/elf32-dlx.h.
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 575582178209..f651600746de 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -4160,7 +4160,7 @@ void
 tc_arc_frame_initial_instructions (void)
 {
   /* Stack pointer is register 28.  */
-  cfi_add_CFA_def_cfa_register (28);
+  cfi_add_CFA_def_cfa(28, 0);
 }
 
 int
-- 
2.5.0



More information about the Dwarf-Discuss mailing list