* 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.
This commit is contained in:
Daniel Jacobowitz 2007-02-13 15:48:06 +00:00
parent 512b7dfbfd
commit d9cc5895fd
4 changed files with 16 additions and 8 deletions

View File

@ -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.

View File

@ -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

View File

@ -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\"",

View File

@ -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);