2012-03-16 02:53:43 +08:00
|
|
|
<?xml version="1.0"?>
|
2018-01-01 12:43:02 +08:00
|
|
|
<!-- Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
2012-03-16 02:53:43 +08:00
|
|
|
|
|
|
|
Copying and distribution of this file, with or without modification,
|
|
|
|
are permitted in any medium without royalty provided the copyright
|
|
|
|
notice and this notice are preserved. -->
|
|
|
|
|
|
|
|
<!-- A target description for an M-profile device, for stubs that
|
|
|
|
transfer registers using the historical fpa layout. -->
|
|
|
|
|
|
|
|
<!DOCTYPE target SYSTEM "gdb-target.dtd">
|
|
|
|
<target>
|
Set architecture to arm in arm-*.xml files
This patch is to add the following line to various arm target description
xml files,
<architecture>arm</architecture>
in order to fix problems I've seen on aarch64 multi-arch debugging,
detach^M
Detaching from program: build-gdb/gdb/testsuite/gdb.base/attach, process 17145^M
(gdb) PASS: gdb.base/attach.exp: attach1 detach file^M
No executable file now.^M
Architecture of file not recognized.^M
(gdb) FAIL: gdb.base/attach.exp: attach1, purging symbols after detach
Without this patch, struct target_desc *tdesc_* are not initialised
properly, that is, fields arch and osabi in 'struct target_desc' are
not set properly. This doesn't cause any problems on single arch
debugging, because arch-utils.c:gdbarch_info_fill will guess correctly.
However, in multi-arch debugging, gdbarch_info_fill gets the aarch64
arch, but the target description is for arm (because the current
inferior is 32-bit arm).
It is a surprise to me we didn't set architecture to "arm" before in *.xml
files, and I didn't find out why didn't do so. AFAICS,
gdb/features/arm-with-iwmmxt.xml was added firstly (in patch
https://sourceware.org/ml/gdb-patches/2007-01/msg00593.html)
which had <architecture>iwmmxt</architecture>, however, afterwards,
architecture isn't set anymore in features/arm-*.xml files (in patches
https://sourceware.org/ml/gdb-patches/2009-07/msg00689.html and
https://sourceware.org/ml/gdb-patches/2010-08/msg00225.html).
gdb:
2015-07-07 Yao Qi <yao.qi@linaro.org>
* features/arm-with-m-fpa-layout.xml: Set architecture to arm.
* features/arm-with-m-fpa-layout.c: Regenerated.
* features/arm-with-m-vfp-d16.xml: Likewise.
* features/arm-with-m-vfp-d16.c: Regenerated.
* features/arm-with-m.xml: Likewise.
* features/arm-with-m.c: Regenerated.
* features/arm-with-neon.xml: Likewise.
* features/arm-with-neon.c: Regenerated.
* features/arm-with-vfpv2.xml: Likewise.
* features/arm-with-vfpv2.c: Regenerated.
* features/arm-with-vfpv3.xml: Likewise.
* features/arm-with-vfpv3.c: Regenerated.
2015-07-07 23:58:19 +08:00
|
|
|
<architecture>arm</architecture>
|
2012-03-16 02:53:43 +08:00
|
|
|
<feature name="org.gnu.gdb.arm.m-profile">
|
|
|
|
<reg name="r0" bitsize="32"/>
|
|
|
|
<reg name="r1" bitsize="32"/>
|
|
|
|
<reg name="r2" bitsize="32"/>
|
|
|
|
<reg name="r3" bitsize="32"/>
|
|
|
|
<reg name="r4" bitsize="32"/>
|
|
|
|
<reg name="r5" bitsize="32"/>
|
|
|
|
<reg name="r6" bitsize="32"/>
|
|
|
|
<reg name="r7" bitsize="32"/>
|
|
|
|
<reg name="r8" bitsize="32"/>
|
|
|
|
<reg name="r9" bitsize="32"/>
|
|
|
|
<reg name="r10" bitsize="32"/>
|
|
|
|
<reg name="r11" bitsize="32"/>
|
|
|
|
<reg name="r12" bitsize="32"/>
|
|
|
|
<reg name="sp" bitsize="32" type="data_ptr"/>
|
|
|
|
<reg name="lr" bitsize="32"/>
|
|
|
|
<reg name="pc" bitsize="32" type="code_ptr"/>
|
|
|
|
|
|
|
|
<!-- Slack for unused FPA registers (f0-f7 + fps).
|
|
|
|
See arm-fpa.xml. -->
|
|
|
|
<reg name="" bitsize="96" type="arm_fpa_ext" regnum="16"/>
|
|
|
|
<reg name="" bitsize="96" type="arm_fpa_ext"/>
|
|
|
|
<reg name="" bitsize="96" type="arm_fpa_ext"/>
|
|
|
|
<reg name="" bitsize="96" type="arm_fpa_ext"/>
|
|
|
|
<reg name="" bitsize="96" type="arm_fpa_ext"/>
|
|
|
|
<reg name="" bitsize="96" type="arm_fpa_ext"/>
|
|
|
|
<reg name="" bitsize="96" type="arm_fpa_ext"/>
|
|
|
|
<reg name="" bitsize="96" type="arm_fpa_ext"/>
|
|
|
|
<reg name="" bitsize="32"/>
|
|
|
|
|
|
|
|
<reg name="xpsr" bitsize="32" regnum="25"/>
|
|
|
|
</feature>
|
|
|
|
</target>
|