From 06c4d4dc676dcc0f583bc61170feabfd183a197d Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 28 Jan 2005 06:29:42 +0000 Subject: [PATCH] 2005-01-28 Andrew Cagney * gnu-v2-abi.h (gnuv2_baseclass_offset): Make "valaddr" a const bfd_byte. * cp-abi.h (baseclass_offset): Make "valaddr" a const bfd_byte. (struct cp_abi_ops): Make baseclass_offset's "valaddr" a const bfd_byte. * cp-abi.c (baseclass_offset): Update. * gnu-v2-abi.c (gnuv2_baseclass_offset): Update. --- gdb/ChangeLog | 8 ++++++++ gdb/cp-abi.c | 5 +++-- gdb/cp-abi.h | 12 +++++++----- gdb/gnu-v2-abi.c | 4 ++-- gdb/gnu-v2-abi.h | 3 ++- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 72ec92b108..d9bbadfd94 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2005-01-28 Andrew Cagney + * gnu-v2-abi.h (gnuv2_baseclass_offset): Make "valaddr" a const + bfd_byte. + * cp-abi.h (baseclass_offset): Make "valaddr" a const bfd_byte. + (struct cp_abi_ops): Make baseclass_offset's "valaddr" a const + bfd_byte. + * cp-abi.c (baseclass_offset): Update. + * gnu-v2-abi.c (gnuv2_baseclass_offset): Update. + * gnu-v2-abi.h: New file. * gnu-v2-abi.c: Include "gnu-v2-abi.h". (gnuv2_baseclass_offset): Delete declaration. diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c index a8530209c9..e347d5e83d 100644 --- a/gdb/cp-abi.c +++ b/gdb/cp-abi.c @@ -1,5 +1,6 @@ /* Generic code for supporting multiple C++ ABI's - Copyright 2001, 2002, 2003 Free Software Foundation, Inc. + + Copyright 2001, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of GDB. @@ -69,7 +70,7 @@ is_operator_name (const char *name) } int -baseclass_offset (struct type *type, int index, char *valaddr, +baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, CORE_ADDR address) { if (current_cp_abi.baseclass_offset == NULL) diff --git a/gdb/cp-abi.h b/gdb/cp-abi.h index 0413abafc4..cf21a2f4cd 100644 --- a/gdb/cp-abi.h +++ b/gdb/cp-abi.h @@ -1,7 +1,9 @@ /* Abstraction of various C++ ABI's we support, and the info we need to get from them. + Contributed by Daniel Berlin - Copyright 2001 Free Software Foundation, Inc. + + Copyright 2001, 2005 Free Software Foundation, Inc. This file is part of GDB. @@ -142,8 +144,8 @@ extern struct type *value_rtti_type (struct value *value, -1 is returned on error. */ -extern int baseclass_offset (struct type *type, int index, char *valaddr, - CORE_ADDR address); +extern int baseclass_offset (struct type *type, int index, + const bfd_byte *valaddr, CORE_ADDR address); struct cp_abi_ops { @@ -160,8 +162,8 @@ struct cp_abi_ops int j, struct type * type, int offset); struct type *(*rtti_type) (struct value *v, int *full, int *top, int *using_enc); - int (*baseclass_offset) (struct type *type, int index, char *valaddr, - CORE_ADDR address); + int (*baseclass_offset) (struct type *type, int index, + const bfd_byte *valaddr, CORE_ADDR address); }; diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c index 20b697550f..f545ac180c 100644 --- a/gdb/gnu-v2-abi.c +++ b/gdb/gnu-v2-abi.c @@ -346,8 +346,8 @@ vb_match (struct type *type, int index, struct type *basetype) -1 is returned on error. */ int -gnuv2_baseclass_offset (struct type *type, int index, char *valaddr, - CORE_ADDR address) +gnuv2_baseclass_offset (struct type *type, int index, + const bfd_byte *valaddr, CORE_ADDR address) { struct type *basetype = TYPE_BASECLASS (type, index); diff --git a/gdb/gnu-v2-abi.h b/gdb/gnu-v2-abi.h index baca2bff7c..e8a5f88b05 100644 --- a/gdb/gnu-v2-abi.h +++ b/gdb/gnu-v2-abi.h @@ -25,6 +25,7 @@ #define GNU_V2_ABI_H extern int gnuv2_baseclass_offset (struct type *type, int index, - char *valaddr, CORE_ADDR address); + const bfd_byte *valaddr, + CORE_ADDR address); #endif -- 2.34.1