aboutsummaryrefslogtreecommitdiff
path: root/gdb/xtensa-tdep.h
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2015-05-30 13:00:32 +0300
committerMax Filippov <jcmvbkbc@gmail.com>2015-08-31 11:59:02 +0300
commit90b81c5f158b2b0565ce5c45270103cc0cfb5b1b (patch)
tree39821b049229fd49f0eb8a5590eab0abcf432035 /gdb/xtensa-tdep.h
parentd3435ae8ddeb3245b1358504f5382879f7fc04a7 (diff)
downloadgdb-90b81c5f158b2b0565ce5c45270103cc0cfb5b1b.zip
gdb-90b81c5f158b2b0565ce5c45270103cc0cfb5b1b.tar.gz
gdb-90b81c5f158b2b0565ce5c45270103cc0cfb5b1b.tar.bz2
xtensa: initialize call_abi in xtensa_tdep
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. 2015-08-31 Max Filippov <jcmvbkbc@gmail.com> gdb/ * xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Initialize call_abi using XSHAL_ABI macro.
Diffstat (limited to 'gdb/xtensa-tdep.h')
-rw-r--r--gdb/xtensa-tdep.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
index 5b28cab..fbf0e1d 100644
--- a/gdb/xtensa-tdep.h
+++ b/gdb/xtensa-tdep.h
@@ -226,7 +226,9 @@ struct gdbarch_tdep
.spill_location = -1, \
.spill_size = (spillsz), \
.unused = 0, \
- .call_abi = CallAbiDefault, \
+ .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, \