diff options
author | Christophe Lyon <christophe.lyon@arm.com> | 2022-04-01 10:22:08 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@arm.com> | 2022-04-27 15:18:18 +0100 |
commit | 9074667a8583b33ff1b9590232c15e67f2d1d607 (patch) | |
tree | 7fac426a2f4f1087545b74b547aeb4261c8dd6a0 /gdb/features | |
parent | fcaa1071d7921c4f7c7592a10ed7b84830ec8c49 (diff) | |
download | gdb-9074667a8583b33ff1b9590232c15e67f2d1d607.zip gdb-9074667a8583b33ff1b9590232c15e67f2d1d607.tar.gz gdb-9074667a8583b33ff1b9590232c15e67f2d1d607.tar.bz2 |
gdb/arm: Define MSP and PSP registers for M-Profile
This patch removes the hardcoded access to PSP in
arm_m_exception_cache() and relies on the definition with the XML
descriptions.
Signed-off-by: Christophe Lyon <christophe.lyon@foss.st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@arm.com>
Diffstat (limited to 'gdb/features')
-rw-r--r-- | gdb/features/Makefile | 1 | ||||
-rw-r--r-- | gdb/features/arm/arm-m-system.c | 15 | ||||
-rw-r--r-- | gdb/features/arm/arm-m-system.xml | 12 |
3 files changed, 28 insertions, 0 deletions
diff --git a/gdb/features/Makefile b/gdb/features/Makefile index a2bb2a5..737d9cb 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -206,6 +206,7 @@ FEATURE_XMLFILES = aarch64-core.xml \ arm/arm-fpa.xml \ arm/arm-m-profile.xml \ arm/arm-m-profile-mve.xml \ + arm/arm-m-system.xml \ arm/arm-m-profile-with-fpa.xml \ arm/arm-vfpv2.xml \ arm/arm-vfpv3.xml \ diff --git a/gdb/features/arm/arm-m-system.c b/gdb/features/arm/arm-m-system.c new file mode 100644 index 0000000..3fb20a5 --- /dev/null +++ b/gdb/features/arm/arm-m-system.c @@ -0,0 +1,15 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: arm-m-system.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_arm_arm_m_system (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-system"); + tdesc_create_reg (feature, "msp", regnum++, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "psp", regnum++, 1, NULL, 32, "data_ptr"); + return regnum; +} diff --git a/gdb/features/arm/arm-m-system.xml b/gdb/features/arm/arm-m-system.xml new file mode 100644 index 0000000..eb167ad --- /dev/null +++ b/gdb/features/arm/arm-m-system.xml @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2022 Free Software Foundation, Inc. + + 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. --> + +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.arm.m-system"> + <reg name="msp" bitsize="32" type="data_ptr"/> + <reg name="psp" bitsize="32" type="data_ptr"/> +</feature> |