diff options
author | Jonathan Larmour <jifl@eCosCentric.com> | 2012-03-15 18:53:43 +0000 |
---|---|---|
committer | Jonathan Larmour <jifl@eCosCentric.com> | 2012-03-15 18:53:43 +0000 |
commit | 25f8c692704d6713c7a13d11069bc70b6d758ceb (patch) | |
tree | 7d86822db458478ad31685591f87fe46fe96f2d0 /gdb/features | |
parent | 35c63cd8ce5100859789b65ae76c6e5fe6ba47a4 (diff) | |
download | gdb-25f8c692704d6713c7a13d11069bc70b6d758ceb.zip gdb-25f8c692704d6713c7a13d11069bc70b6d758ceb.tar.gz gdb-25f8c692704d6713c7a13d11069bc70b6d758ceb.tar.bz2 |
* arm-tdep.c: Include "remote.h" and "features/arm-with-m-fpa-layout.c".
(arm_register_g_packet_guesses): New function.
(arm_gdbarch_init): Don't force a target description with
registers when the executable is detected as M-profile. Instead
set gdbarch->tdep->is_m. Register `g' packet guesses.
(_initialize_arm_tdep): Initialize the new target description.
* features/arm-with-m-fpa-layout.xml: New description.
* features/arm-with-m-fpa-layout.c: New, generated.
Diffstat (limited to 'gdb/features')
-rw-r--r-- | gdb/features/arm-with-m-fpa-layout.c | 44 | ||||
-rw-r--r-- | gdb/features/arm-with-m-fpa-layout.xml | 45 |
2 files changed, 89 insertions, 0 deletions
diff --git a/gdb/features/arm-with-m-fpa-layout.c b/gdb/features/arm-with-m-fpa-layout.c new file mode 100644 index 0000000..ad9b75d --- /dev/null +++ b/gdb/features/arm-with-m-fpa-layout.c @@ -0,0 +1,44 @@ +/* THIS FILE IS GENERATED. Original: arm-with-m-fpa-layout.xml */ + +#include "defs.h" +#include "osabi.h" +#include "target-descriptions.h" + +struct target_desc *tdesc_arm_with_m_fpa_layout; +static void +initialize_tdesc_arm_with_m_fpa_layout (void) +{ + struct target_desc *result = allocate_target_description (); + struct tdesc_feature *feature; + struct tdesc_type *field_type, *type; + + feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile"); + tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "sp", 13, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "lr", 14, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "pc", 15, 1, NULL, 32, "code_ptr"); + tdesc_create_reg (feature, "", 16, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", 17, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", 18, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", 19, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", 20, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", 21, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", 22, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", 23, 1, NULL, 96, "arm_fpa_ext"); + tdesc_create_reg (feature, "", 24, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "xpsr", 25, 1, NULL, 32, "int"); + + tdesc_arm_with_m_fpa_layout = result; +} diff --git a/gdb/features/arm-with-m-fpa-layout.xml b/gdb/features/arm-with-m-fpa-layout.xml new file mode 100644 index 0000000..e3a1149 --- /dev/null +++ b/gdb/features/arm-with-m-fpa-layout.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2007, 2008, 2009, 2010, 2011 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. --> + +<!-- 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> +<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> |