openocd/src/target
Antonio Borneo 5481401514 armv8: check the core state to pass the correct arch to gdb
Commit 3799eded67 ("target/aarch64: add support for
multi-architecture gdb") passes the constant string "aarch64" as
architecture to gdb. This is not working if the core is running
in 32 bits mode; gdb reports:
	Truncated register 8 in remote 'g' packet
then closes the connection with OpenOCD.

Make the architecture string dependant from the current state of
the core.

Change-Id: I16e1614ea02ba29bf87f450b3dfe25c83c9a3612
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5234
Tested-by: jenkins
Reviewed-by: Muhammad Omair Javaid <omair.javaid@linaro.org>
2020-02-15 15:38:39 +00:00
..
openrisc helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
riscv helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
aarch64.c target/aarch64: remove dependency from jtag queue 2019-06-14 12:10:40 +01:00
aarch64.h aarch64: add 'maskisr' command 2018-01-16 09:05:41 +00:00
adi_v5_dapdirect.c adi_v5_dapdirect: add support for adapter drivers that provide DAP API 2020-01-14 11:40:25 +00:00
adi_v5_jtag.c arm_adi_v5: add API send_sequence() and use it 2020-01-02 21:24:54 +00:00
adi_v5_swd.c adapter: switch from struct jtag_interface to adapter_driver 2020-01-14 11:39:37 +00:00
algorithm.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
algorithm.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm_adi_v5.c arm_adi_v5: add API send_sequence() and use it 2020-01-02 21:24:54 +00:00
arm_adi_v5.h stlink: add DAP direct driver 2020-01-14 11:40:36 +00:00
arm_cti.c target/arm_cti: fix regression from Tcl_return_values series 2020-01-27 09:19:17 +00:00
arm_cti.h armv8: valgrind memleak fixes 2018-04-10 09:13:02 +01:00
arm_dap.c adi_v5_dapdirect: add support for adapter drivers that provide DAP API 2020-01-14 11:40:25 +00:00
arm_disassembler.c target/arm: Add PLD command to ARM disassembler. 2018-06-22 07:42:27 +01:00
arm_disassembler.h target: arm: disassembler: decode v6T2 ARM ISB instruction 2018-01-13 08:36:29 +00:00
arm_dpm.c target/arm_dpm: add missing error returns 2020-01-16 09:45:30 +00:00
arm_dpm.h target/cortex_a: remove duplicate code to read target registers 2018-11-06 12:42:24 +00:00
arm_jtag.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm_jtag.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_opcodes.h arm_opcode: fix encoding of ARMv5 breakpoint instruction 2019-01-23 15:26:39 +00:00
arm_semihosting.c target/arm_semihosting: Use 'bool' data type 2019-03-06 16:16:29 +00:00
arm_semihosting.h Rework/update ARM semihosting 2018-06-04 09:16:08 +01:00
arm_simulator.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm_simulator.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm.h target/aarch64: add support for multi-architecture gdb 2019-01-08 10:00:09 +00:00
arm7_9_common.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
arm7_9_common.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm7tdmi.c target/arm: add support for multi-architecture gdb 2019-01-08 09:59:42 +00:00
arm7tdmi.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm9tdmi.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
arm9tdmi.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm11_dbgtap.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
arm11_dbgtap.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm11.c target/arm11: Use 'bool' data type 2019-03-06 16:10:33 +00:00
arm11.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm720t.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
arm720t.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm920t.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
arm920t.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm926ejs.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
arm926ejs.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm946e.c target/arm946e: add missing error detection 2020-01-16 09:45:19 +00:00
arm946e.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm966e.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
arm966e.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv4_5_cache.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
armv4_5_cache.h target/armv4_5_cache: change prototype of armv4_5_handle_cache_info_command() 2019-05-14 19:35:41 +01:00
armv4_5_mmu.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv4_5_mmu.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
armv4_5.c target/armv4_5: use c99 array designator to init arm_core_regs[] 2019-12-19 20:42:41 +00:00
armv4_5.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv7a_cache_l2x.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
armv7a_cache_l2x.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
armv7a_cache.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
armv7a_cache.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv7a_mmu.c armv7a_mmu: Add support for decoding Super Sections 2019-06-12 15:14:50 +01:00
armv7a_mmu.h armv7a_mmu: Do not restrict virtual addresses to uint32_t 2019-06-12 15:14:44 +01:00
armv7a.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
armv7a.h target/armv7a: change prototype of armv7a_handle_cache_info_command() 2019-05-14 19:35:47 +01:00
armv7m_trace.c target/armv7m_trace: Improve SWO frequency auto-detection 2019-12-21 19:25:32 +00:00
armv7m_trace.h target/armv7m_trace: Use prefix for enums 2018-07-19 10:49:24 +01:00
armv7m.c target/armv7m: fix register number in armv7m_get_core_reg() 2019-06-10 20:35:39 +01:00
armv7m.h target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
armv8_cache.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
armv8_cache.h aarch64: add cache handling functions 2017-02-10 14:01:39 +01:00
armv8_dpm.c armv8: allow halt on exception 2019-03-04 11:53:00 +00:00
armv8_dpm.h aarch64: fix debug entry from EL0 2018-03-16 08:58:06 +00:00
armv8_opcodes.c target aarch64: rework memory read/write to use 8/16/32 bit operations 2018-01-04 09:09:46 +00:00
armv8_opcodes.h Support AArch64 SIMD/FP registers read/write 2018-03-10 13:23:48 +00:00
armv8.c armv8: check the core state to pass the correct arch to gdb 2020-02-15 15:38:39 +00:00
armv8.h target/armv8: change prototype of display_cache_info() 2019-05-14 19:35:25 +01:00
avr32_ap7k.c target/avr32_ap7k: Use 'bool' data type 2019-03-06 16:14:36 +00:00
avr32_ap7k.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_jtag.c target/avr32_jtag: fix error returns 2020-01-16 09:45:37 +00:00
avr32_jtag.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_mem.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_mem.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_regs.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_regs.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avrt.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
avrt.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
breakpoints.c target/breakpoints: make internal functions static 2019-03-12 06:43:49 +00:00
breakpoints.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
cortex_a.c target/cortex_a: Extract code to read/write from/to register to/from DCC 2019-10-18 09:22:58 +01:00
cortex_a.h target/cortex_a: remove unused code controlled by "fast_reg_read" 2018-11-06 12:17:48 +00:00
cortex_m.c coding style: remove unnecessary parentheses 2020-02-15 15:37:20 +00:00
cortex_m.h target/armv7m_trace: Improve SWO frequency auto-detection 2019-12-21 19:25:32 +00:00
dsp563xx_once.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
dsp563xx_once.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
dsp563xx.c target/dsp563xx: dsp563xx restore reg support 2019-09-08 11:52:06 +01:00
dsp563xx.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
dsp5680xx.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
dsp5680xx.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
embeddedice.c target/embeddedice: Use 'bool' data type 2019-03-06 16:15:56 +00:00
embeddedice.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
esirisc_jtag.c esirisc: support eSi-Trace 2018-12-12 08:47:44 +00:00
esirisc_jtag.h esirisc: support eSi-Trace 2018-12-12 08:47:44 +00:00
esirisc_regs.h esirisc: support eSi-RISC targets 2018-10-16 11:58:24 +01:00
esirisc_trace.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
esirisc_trace.h esirisc: support eSi-Trace 2018-12-12 08:47:44 +00:00
esirisc.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
esirisc.h esirisc: support eSi-Trace 2018-12-12 08:47:44 +00:00
etb.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
etb.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
etm_dummy.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
etm_dummy.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
etm.c target/etm: add check for calloc error 2020-01-16 09:46:27 +00:00
etm.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
fa526.c target/arm: add support for multi-architecture gdb 2019-01-08 09:59:42 +00:00
feroceon.c target/feroceon: Use 'bool' data type 2019-03-06 16:17:24 +00:00
hla_target.c hla: use the new system_reset API 2020-01-14 11:37:34 +00:00
image.c target/image: Add support for S6 record in Motorola SREC files 2018-11-18 08:21:25 +00:00
image.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
lakemont.c target/lakemont: Use 'bool' data type 2019-03-06 16:19:28 +00:00
lakemont.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
ls1_sap.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
Makefile.am adi_v5_dapdirect: add support for adapter drivers that provide DAP API 2020-01-14 11:40:25 +00:00
mem_ap.c mem_ap: fix format of logged addresses 2019-06-12 15:15:29 +01:00
mips_ejtag.c mips_ejtag: there is no DCR.MIPS64 bit 2020-01-20 06:28:49 +00:00
mips_ejtag.h mips_ejtag: there is no DCR.MIPS64 bit 2020-01-20 06:28:49 +00:00
mips_m4k.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
mips_m4k.h mips32: add micromips isa handling 2017-05-08 18:04:56 +01:00
mips_mips64.c mips64: Add generic mips64 target support 2019-11-28 19:49:10 +00:00
mips_mips64.h mips64: Add generic mips64 target support 2019-11-28 19:49:10 +00:00
mips32_dmaacc.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
mips32_dmaacc.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
mips32_pracc.c mips32, add support for micromips in debug mode 2017-05-08 18:03:28 +01:00
mips32_pracc.h mips32: pracc: Fix indent 2019-03-23 17:43:30 +00:00
mips32.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
mips32.h target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
mips64_pracc.c mips: Add MIPS64 support 2019-11-28 16:59:15 +00:00
mips64_pracc.h mips: Add MIPS64 support 2019-11-28 16:59:15 +00:00
mips64.c mips: Add MIPS64 support 2019-11-28 16:59:15 +00:00
mips64.h mips: Add MIPS64 support 2019-11-28 16:59:15 +00:00
nds32_aice.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_aice.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_cmd.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
nds32_cmd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_disassembler.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_disassembler.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_edm.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_insn.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_reg.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_reg.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_tlb.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_tlb.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v2.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v2.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_v3_common.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v3_common.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v3.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v3.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_v3m.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v3m.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32.c gdb_server: fix string length with semihosting_fileio 2019-12-19 20:40:55 +00:00
nds32.h target/nds32: fix type of magic number 2020-02-15 15:36:56 +00:00
oocd_trace.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
oocd_trace.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
quark_d20xx.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
quark_x10xx.c target: quark_x10xx: miscellaneous cleanups 2018-01-13 09:25:12 +00:00
register.c gdb_server, rtos: Fine-grained RTOS register access 2019-08-28 08:07:37 +01:00
register.h gdb_server, rtos: Fine-grained RTOS register access 2019-08-28 08:07:37 +01:00
semihosting_common.c target/semihosting_common: fix minor memory leak 2020-01-16 09:46:12 +00:00
semihosting_common.h Rework/update ARM semihosting 2018-06-04 09:16:08 +01:00
smp.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
smp.h smp: replace commands smp_on/smp_off with "smp [on|off]" 2019-03-27 08:55:03 +00:00
startup.tcl move ftdi_location deprecation helper to proper place 2020-01-29 05:35:36 +00:00
stm8.c coding style: remove unnecessary parentheses 2020-02-15 15:37:20 +00:00
stm8.h STM8 Target relicensing to GPLv2 and later 2019-11-07 08:21:40 +00:00
target_request.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
target_request.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
target_type.h gdb_server, rtos: Fine-grained RTOS register access 2019-08-28 08:07:37 +01:00
target.c target/target: fix clang static analyzer warnings 2020-01-16 09:45:58 +00:00
target.h gdb_server, rtos: Fine-grained RTOS register access 2019-08-28 08:07:37 +01:00
testee.c command_registration: add empty usage field to chained commands 2019-04-07 08:17:36 +01:00
trace.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
trace.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
x86_32_common.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
x86_32_common.h target: lakemon: implement assert_reset and deassert_reset 2018-01-13 09:25:34 +00:00
xscale.c target/xscale: remove duplicated command 2020-01-16 09:46:38 +00:00
xscale.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00