This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
How to create one type per arch in target descrption
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GDB <gdb-patches at sourceware dot org>
- Date: Thu, 4 Feb 2010 14:24:35 -0800
- Subject: How to create one type per arch in target descrption
x86 has i387_ext. I added
case TDESC_TYPE_I387_EXT:
return arch_float_type (gdbarch, -1, "builtin_type_i387_ext",
floatformats_i387_ext);
to tdesc_gdb_type. I would up 8 i387_ext types at different addresses
with the same bits. x86 does
if (i386_fp_regnum_p (gdbarch, regnum))
{
/* Floating point registers must be converted unless we are
accessing them in their hardware type. */
if (type == i387_ext_type (gdbarch))
return 0;
else
return 1;
}
It expects 2 i387_ext types should have the same address. Ha
can I cache the i387_ext type for single gdbarch?
Thanks.
--
H.J.