struct gdbarch_info info;
gdbarch_info_init (&info);
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
- info.id = (int *) vq;
+ info.target_info.id = (int *) vq;
return gdbarch_find_by_info (info);
}
/* Use the vector length passed via the target info. Otherwise use the vector
length from the existing tdesc. Otherwise assume no SVE. */
- if (info.id != 0)
- vq = (uint64_t) info.id;
+ if (info.target_info.id != 0)
+ vq = (uint64_t) info.target_info.id;
else
vq = aarch64_get_tdesc_vq (tdesc);
/* Hook in the ABI-specific overrides, if they have been registered. */
info.target_desc = tdesc;
- info.tdesc_data = tdesc_data;
+ info.target_info.tdesc_data = tdesc_data;
gdbarch_init_osabi (info, gdbarch);
dwarf2_frame_set_init_reg (gdbarch, aarch64_dwarf2_frame_init_reg);
amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- struct tdesc_arch_data *tdesc_data = info.tdesc_data;
+ struct tdesc_arch_data *tdesc_data = info.target_info.tdesc_data;
const struct tdesc_feature *feature;
int valid_p;
amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- struct tdesc_arch_data *tdesc_data = info.tdesc_data;
+ struct tdesc_arch_data *tdesc_data = info.target_info.tdesc_data;
const struct tdesc_feature *feature;
int valid_p;
const struct tdesc_feature *feature =
tdesc_find_feature (tdesc, "org.gnu.gdb.i386.segments");
struct tdesc_arch_data *tdesc_data_segments =
- (struct tdesc_arch_data *) info.tdep_info;
+ (struct tdesc_arch_data *) info.target_info.tdep_info;
tdesc_numbered_register (feature, tdesc_data_segments,
AMD64_FSBASE_REGNUM, "fs_base");
"gdbarch_find_by_info: info.abfd %s\n",
host_address_to_string (info.abfd));
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_find_by_info: info.tdep_info %s\n",
- host_address_to_string (info.tdep_info));
+ "gdbarch_find_by_info: info.target_info.tdep_info %s\n",
+ host_address_to_string (info.target_info.tdep_info));
}
/* Find the tdep code that knows about this architecture. */
(const char *sect_name, int supply_size, int collect_size,
const struct regset *regset, const char *human_name, void *cb_data);
+/* Different targets need different indentification data for gdbarch_info. */
+union gdbarch_target_info
+{
+ /* Architecture-specific information. The generic form for targets
+ that have extra requirements. */
+ struct gdbarch_tdep_info *tdep_info;
+
+ /* Architecture-specific target description data. Numerous targets
+ need only this, so give them an easy way to hold it. */
+ struct tdesc_arch_data *tdesc_data;
+
+ /* SPU file system ID. This is a single integer, so using the
+ generic form would only complicate code. Other targets may
+ reuse this member if suitable. */
+ int *id;
+};
+
+
/* The following are pre-initialized by GDBARCH. */
bfd *abfd;
/* Use default: NULL (ZERO). */
- union
- {
- /* Architecture-specific information. The generic form for targets
- that have extra requirements. */
- struct gdbarch_tdep_info *tdep_info;
-
- /* Architecture-specific target description data. Numerous targets
- need only this, so give them an easy way to hold it. */
- struct tdesc_arch_data *tdesc_data;
-
- /* SPU file system ID. This is a single integer, so using the
- generic form would only complicate code. Other targets may
- reuse this member if suitable. */
- int *id;
- };
+ union gdbarch_target_info target_info;
/* Use default: GDB_OSABI_UNINITIALIZED (-1). */
enum gdb_osabi osabi;
typedef void (iterate_over_regset_sections_cb)
(const char *sect_name, int supply_size, int collect_size,
const struct regset *regset, const char *human_name, void *cb_data);
+
+/* Different targets need different indentification data for gdbarch_info. */
+union gdbarch_target_info
+{
+ /* Architecture-specific information. The generic form for targets
+ that have extra requirements. */
+ struct gdbarch_tdep_info *tdep_info;
+
+ /* Architecture-specific target description data. Numerous targets
+ need only this, so give them an easy way to hold it. */
+ struct tdesc_arch_data *tdesc_data;
+
+ /* SPU file system ID. This is a single integer, so using the
+ generic form would only complicate code. Other targets may
+ reuse this member if suitable. */
+ int *id;
+};
+
EOF
# function typedef's
bfd *abfd;
/* Use default: NULL (ZERO). */
- union
- {
- /* Architecture-specific information. The generic form for targets
- that have extra requirements. */
- struct gdbarch_tdep_info *tdep_info;
-
- /* Architecture-specific target description data. Numerous targets
- need only this, so give them an easy way to hold it. */
- struct tdesc_arch_data *tdesc_data;
-
- /* SPU file system ID. This is a single integer, so using the
- generic form would only complicate code. Other targets may
- reuse this member if suitable. */
- int *id;
- };
+ union gdbarch_target_info target_info;
/* Use default: GDB_OSABI_UNINITIALIZED (-1). */
enum gdb_osabi osabi;
"gdbarch_find_by_info: info.abfd %s\n",
host_address_to_string (info.abfd));
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_find_by_info: info.tdep_info %s\n",
- host_address_to_string (info.tdep_info));
+ "gdbarch_find_by_info: info.target_info.tdep_info %s\n",
+ host_address_to_string (info.target_info.tdep_info));
}
/* Find the tdep code that knows about this architecture. */
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
const struct target_desc *tdesc = info.target_desc;
- struct tdesc_arch_data *tdesc_data = info.tdesc_data;
+ struct tdesc_arch_data *tdesc_data = info.target_info.tdesc_data;
const struct tdesc_feature *feature;
int valid_p;
/* Hook in ABI-specific overrides, if they have been registered.
Note: If INFO specifies a 64 bit arch, this is where we turn
a 32-bit i386 into a 64-bit amd64. */
- info.tdesc_data = tdesc_data;
+ info.target_info.tdesc_data = tdesc_data;
gdbarch_init_osabi (info, gdbarch);
if (!i386_validate_tdesc_p (tdep, tdesc_data))
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum mips_abi abi = mips_abi (gdbarch);
- struct tdesc_arch_data *tdesc_data = info.tdesc_data;
+ struct tdesc_arch_data *tdesc_data = info.target_info.tdesc_data;
linux_init_abi (info, gdbarch);
mips_register_g_packet_guesses (gdbarch);
/* Hook in OS ABI-specific overrides, if they have been registered. */
- info.tdesc_data = tdesc_data;
+ info.target_info.tdesc_data = tdesc_data;
gdbarch_init_osabi (info, gdbarch);
/* The hook may have adjusted num_regs, fetch the final value and
nds32_add_reggroups (gdbarch);
/* Hook in ABI-specific overrides, if they have been registered. */
- info.tdesc_data = tdesc_data;
+ info.target_info.tdesc_data = tdesc_data;
gdbarch_init_osabi (info, gdbarch);
/* Override tdesc_register callbacks for system registers. */
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
info.byte_order = BFD_ENDIAN_BIG;
info.osabi = GDB_OSABI_LINUX;
- info.id = &data.id;
+ info.target_info.id = &data.id;
data.gdbarch = gdbarch_find_by_info (info);
if (!data.gdbarch)
return 0;
struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- struct tdesc_arch_data *tdesc_data = info.tdesc_data;
+ struct tdesc_arch_data *tdesc_data = info.target_info.tdesc_data;
static const char *const stap_integer_prefixes[] = { "i", NULL };
static const char *const stap_register_indirection_prefixes[] = { "(",
NULL };
/* Hook in ABI-specific overrides, if they have been registered. */
info.target_desc = tdesc;
- info.tdesc_data = tdesc_data;
+ info.target_info.tdesc_data = tdesc_data;
gdbarch_init_osabi (info, gdbarch);
switch (info.osabi)
struct gdbarch_tdep *tdep = s390_gdbarch_tdep_alloc ();
struct gdbarch *gdbarch = gdbarch_alloc (&info, tdep);
struct tdesc_arch_data *tdesc_data = tdesc_data_alloc ();
- info.tdesc_data = tdesc_data;
+ info.target_info.tdesc_data = tdesc_data;
set_gdbarch_believe_pcc_promotion (gdbarch, 0);
set_gdbarch_char_signed (gdbarch, 0);
}
/* Target description may have changed. */
- info.tdesc_data = tdesc_data;
+ info.target_info.tdesc_data = tdesc_data;
tdesc_use_registers (gdbarch, tdesc, tdesc_data);
}
info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu);
info.byte_order = BFD_ENDIAN_BIG;
info.osabi = GDB_OSABI_LINUX;
- info.id = &spufs_fd;
+ info.target_info.id = &spufs_fd;
return gdbarch_find_by_info (info);
}
int id = -1;
/* Which spufs ID was requested as address space? */
- if (info.id)
- id = *info.id;
+ if (info.target_info.id)
+ id = *info.target_info.id;
/* For objfile architectures of SPU solibs, decode the ID from the name.
This assumes the filename convention employed by solib-spu.c. */
else if (info.abfd)