aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-05-12 01:02:58 +0000
committerAndrew Cagney <cagney@redhat.com>2002-05-12 01:02:58 +0000
commit451fbdda72c96478a54f21d5c8a3f14286a4084d (patch)
tree54de4bf9822298dc4e682cc501bb8e01a608edd5
parentb91d9153be074e41ebbbf179e27ddabf0cf6ae34 (diff)
downloadgdb-451fbdda72c96478a54f21d5c8a3f14286a4084d.zip
gdb-451fbdda72c96478a54f21d5c8a3f14286a4084d.tar.gz
gdb-451fbdda72c96478a54f21d5c8a3f14286a4084d.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/gdbarch.c6
-rw-r--r--gdb/gdbarch.h2
-rwxr-xr-xgdb/gdbarch.sh8
-rw-r--r--gdb/gnu-v3-abi.c15
-rw-r--r--gdb/remote.c2
-rw-r--r--gdb/solib-svr4.c4
7 files changed, 33 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index affa3b5..364d143 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+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.
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index b04ebd5..b8d680e 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -4803,10 +4803,10 @@ set_gdbarch_data (struct gdbarch *gdbarch,
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];
}
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 0e334cf..77f0945 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2575,7 +2575,7 @@ extern void set_gdbarch_data (struct gdbarch *gdbarch,
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.
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index b2d7de2..366bda1 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1108,7 +1108,7 @@ extern void set_gdbarch_data (struct gdbarch *gdbarch,
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.
@@ -1853,10 +1853,10 @@ set_gdbarch_data (struct gdbarch *gdbarch,
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];
}
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index 720364b..e86af89 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -1,6 +1,7 @@
/* 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.
@@ -174,7 +175,8 @@ build_gdb_vtable_type (struct gdbarch *arch)
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);
@@ -185,7 +187,8 @@ static struct type *
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;
@@ -293,7 +296,8 @@ gnuv3_virtual_fn_field (struct value **value_p,
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;
@@ -368,7 +372,8 @@ int
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;
diff --git a/gdb/remote.c b/gdb/remote.c
index a773680..d447f38 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -256,7 +256,7 @@ static struct gdbarch_data *remote_gdbarch_data_handle;
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 *
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 1a7ffbf..2d71097 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1293,7 +1293,7 @@ static struct link_map_offsets *
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)
{
@@ -1330,7 +1330,7 @@ static void *
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;