* gdbarch.h, gdbarch.c: Regenerate.
* gnu-v3-abi.c: Update copyright.
(vtable_address_point_offset): Update.
(gnuv3_rtti_type): Update.
(gnuv3_baseclass_offset): Update.
* solib-svr4.c (svr4_fetch_link_map_offsets): Update.
(init_fetch_link_map_offsets): Update.
* remote.c (get_remote_state): Update.
+2002-05-11 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (gdbarch_data): Add gdbarch parameter.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * gnu-v3-abi.c: Update copyright.
+ (vtable_address_point_offset): Update.
+ (gnuv3_rtti_type): Update.
+ (gnuv3_baseclass_offset): Update.
+ * solib-svr4.c (svr4_fetch_link_map_offsets): Update.
+ (init_fetch_link_map_offsets): Update.
+ * remote.c (get_remote_state): Update.
+
2002-05-11 Daniel Jacobowitz <drow@mvista.com>
* TODO: Remove value_headof/value_from_vtable_info comment.
data-pointer. */
void *
-gdbarch_data (struct gdbarch_data *data)
+gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
{
- gdb_assert (data->index < current_gdbarch->nr_data);
- return current_gdbarch->data[data->index];
+ gdb_assert (data->index < gdbarch->nr_data);
+ return gdbarch->data[data->index];
}
struct gdbarch_data *data,
void *pointer);
-extern void *gdbarch_data (struct gdbarch_data*);
+extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
/* Register per-architecture memory region.
struct gdbarch_data *data,
void *pointer);
-extern void *gdbarch_data (struct gdbarch_data*);
+extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
/* Register per-architecture memory region.
data-pointer. */
void *
-gdbarch_data (struct gdbarch_data *data)
+gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
{
- gdb_assert (data->index < current_gdbarch->nr_data);
- return current_gdbarch->data[data->index];
+ gdb_assert (data->index < gdbarch->nr_data);
+ return gdbarch->data[data->index];
}
/* Abstraction of GNU v3 abi.
Contributed by Jim Blandy <jimb@redhat.com>
- Copyright 2001 Free Software Foundation, Inc.
+
+ Copyright 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
static int
vtable_address_point_offset ()
{
- struct type *vtable_type = gdbarch_data (vtable_type_gdbarch_data);
+ struct type *vtable_type = gdbarch_data (current_gdbarch,
+ vtable_type_gdbarch_data);
return (TYPE_FIELD_BITPOS (vtable_type, vtable_field_virtual_functions)
/ TARGET_CHAR_BIT);
gnuv3_rtti_type (struct value *value,
int *full_p, int *top_p, int *using_enc_p)
{
- struct type *vtable_type = gdbarch_data (vtable_type_gdbarch_data);
+ struct type *vtable_type = gdbarch_data (current_gdbarch,
+ vtable_type_gdbarch_data);
struct type *value_type = check_typedef (VALUE_TYPE (value));
CORE_ADDR vtable_address;
struct value *vtable;
struct fn_field *f, int j,
struct type *type, int offset)
{
- struct type *vtable_type = gdbarch_data (vtable_type_gdbarch_data);
+ struct type *vtable_type = gdbarch_data (current_gdbarch,
+ vtable_type_gdbarch_data);
struct value *value = *value_p;
struct type *value_type = check_typedef (VALUE_TYPE (value));
struct type *vfn_base;
gnuv3_baseclass_offset (struct type *type, int index, char *valaddr,
CORE_ADDR address)
{
- struct type *vtable_type = gdbarch_data (vtable_type_gdbarch_data);
+ struct type *vtable_type = gdbarch_data (current_gdbarch,
+ vtable_type_gdbarch_data);
struct type *basetype = TYPE_BASECLASS (type, index);
struct value *full_object, *vbase_object, *orig_object;
struct value *vtable, *orig_typeinfo, *orig_base_info;
static struct remote_state *
get_remote_state ()
{
- return gdbarch_data (remote_gdbarch_data_handle);
+ return gdbarch_data (current_gdbarch, remote_gdbarch_data_handle);
}
static void *
svr4_fetch_link_map_offsets (void)
{
struct link_map_offsets *(*flmo)(void) =
- gdbarch_data (fetch_link_map_offsets_gdbarch_data);
+ gdbarch_data (current_gdbarch, fetch_link_map_offsets_gdbarch_data);
if (flmo == NULL)
{
init_fetch_link_map_offsets (struct gdbarch *gdbarch)
{
struct link_map_offsets *(*flmo) =
- gdbarch_data (fetch_link_map_offsets_gdbarch_data);
+ gdbarch_data (gdbarch, fetch_link_map_offsets_gdbarch_data);
if (flmo == NULL)
return legacy_fetch_link_map_offsets;