aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-02-13 15:48:06 +0000
committerDaniel Jacobowitz <drow@false.org>2007-02-13 15:48:06 +0000
commitd9cc5895fd5107150e2dbdab3ea1bb58c190ef24 (patch)
tree6522ffc29897ed8e4746dbeba2b4e8ce0eac266b /gdb
parent512b7dfbfd34ee453533b133fdf04fe3a461ec87 (diff)
downloadgdb-d9cc5895fd5107150e2dbdab3ea1bb58c190ef24.zip
gdb-d9cc5895fd5107150e2dbdab3ea1bb58c190ef24.tar.gz
gdb-d9cc5895fd5107150e2dbdab3ea1bb58c190ef24.tar.bz2
* target-descriptions.c (tdesc_named_type): Move code_ptr and data_ptr
handling from here... (tdesc_register_type): ...to here. * xml-tdesc.c (tdesc_start_reg): Allow code_ptr and data_ptr. * features/arm-core.xml: Use code_ptr and data_ptr.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/features/arm-core.xml4
-rw-r--r--gdb/target-descriptions.c10
-rw-r--r--gdb/xml-tdesc.c2
4 files changed, 16 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3e47477..2e4ed22 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2007-02-13 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * target-descriptions.c (tdesc_named_type): Move code_ptr and data_ptr
+ handling from here...
+ (tdesc_register_type): ...to here.
+ * xml-tdesc.c (tdesc_start_reg): Allow code_ptr and data_ptr.
+ * features/arm-core.xml: Use code_ptr and data_ptr.
+
2007-02-13 Denis Pilat <denis.pilat@st.com>
* varobj.h (enum varobj_update_error): New enum.
diff --git a/gdb/features/arm-core.xml b/gdb/features/arm-core.xml
index c2718f5..6693ad1 100644
--- a/gdb/features/arm-core.xml
+++ b/gdb/features/arm-core.xml
@@ -20,9 +20,9 @@
<reg name="r10" bitsize="32"/>
<reg name="r11" bitsize="32"/>
<reg name="r12" bitsize="32"/>
- <reg name="sp" bitsize="32"/>
+ <reg name="sp" bitsize="32" type="data_ptr"/>
<reg name="lr" bitsize="32"/>
- <reg name="pc" bitsize="32"/>
+ <reg name="pc" bitsize="32" type="code_ptr"/>
<!-- The CPSR is register 25, rather than register 16, because
the FPA registers historically were placed between the PC
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c
index 1f8cf7e..e89acec 100644
--- a/gdb/target-descriptions.c
+++ b/gdb/target-descriptions.c
@@ -382,12 +382,6 @@ tdesc_named_type (const struct tdesc_feature *feature, const char *id)
if (strcmp (id, "uint64") == 0)
return builtin_type_uint64;
- if (strcmp (id, "code_ptr") == 0)
- return builtin_type_void_func_ptr;
-
- if (strcmp (id, "data_ptr") == 0)
- return builtin_type_void_data_ptr;
-
if (strcmp (id, "arm_fpa_ext") == 0)
return builtin_type_arm_ext;
@@ -555,6 +549,10 @@ tdesc_register_type (struct gdbarch *gdbarch, int regno)
/* A bit desperate by this point... */
return builtin_type_void_data_ptr;
}
+ else if (strcmp (reg->type, "code_ptr") == 0)
+ return builtin_type_void_func_ptr;
+ else if (strcmp (reg->type, "data_ptr") == 0)
+ return builtin_type_void_data_ptr;
else
internal_error (__FILE__, __LINE__,
"Register \"%s\" has an unknown type \"%s\"",
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index b45bb7e..a4e1fe9 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -163,6 +163,8 @@ tdesc_start_reg (struct gdb_xml_parser *parser,
if (strcmp (type, "int") != 0
&& strcmp (type, "float") != 0
+ && strcmp (type, "code_ptr") != 0
+ && strcmp (type, "data_ptr") != 0
&& tdesc_named_type (data->current_feature, type) == NULL)
gdb_xml_error (parser, _("Register \"%s\" has unknown type \"%s\""),
name, type);