Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] xtensa: initialize call_abi in xtensa_tdep
@ 2015-06-06 22:06 Max Filippov
  2015-08-20  7:38 ` Max Filippov
  2015-08-20 12:09 ` Joel Brobecker
  0 siblings, 2 replies; 6+ messages in thread
From: Max Filippov @ 2015-06-06 22:06 UTC (permalink / raw)
  To: gdb-patches; +Cc: Maxim Grigoriev, Woody LaRue, Marc Gauthier, Max Filippov

Use XSHAL_ABI value provided by xtensa-config.h to correctly initialize
xtensa_tdep.call_abi
This fixes calls to functions from GDB that otherwise fail with the
following assertion in call0 configuration:

  gdb/regcache.c:602: internal-error: regcache_raw_read: Assertion
  `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed.

gdb/
	* xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Initialize
	call_abi using XSHAL_ABI macro.
---
 gdb/xtensa-tdep.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
index adacaf8..3b6ea66 100644
--- a/gdb/xtensa-tdep.h
+++ b/gdb/xtensa-tdep.h
@@ -246,7 +246,8 @@ struct gdbarch_tdep
 	  .spill_location = -1,					\
 	  .spill_size = (spillsz),				\
 	  .unused = 0,						\
-	  .call_abi = 0,					\
+	  .call_abi = (XSHAL_ABI == XTHAL_ABI_CALL0) ?		\
+		CallAbiCall0Only : CallAbiDefault,		\
 	  .debug_interrupt_level = XCHAL_DEBUGLEVEL,		\
 	  .icache_line_bytes = XCHAL_ICACHE_LINESIZE,		\
 	  .dcache_line_bytes = XCHAL_DCACHE_LINESIZE,		\
-- 
1.8.1.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-20 13:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-06 22:06 [PATCH] xtensa: initialize call_abi in xtensa_tdep Max Filippov
2015-08-20  7:38 ` Max Filippov
2015-08-20 12:09 ` Joel Brobecker
2015-08-20 12:47   ` Max Filippov
2015-08-20 12:53     ` Joel Brobecker
2015-08-20 13:00       ` Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox