/* Support for printing C++ values for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
+ Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "defs.h"
#include "gdb_obstack.h"
struct ui_file *, int, int,
enum val_prettyprint);
-static void cp_print_value (struct type *, struct type *, const bfd_byte *,
+static void cp_print_value (struct type *, struct type *, const gdb_byte *,
int, CORE_ADDR, struct ui_file *, int, int,
enum val_prettyprint, struct type **);
void
-cp_print_class_method (const bfd_byte *valaddr,
+cp_print_class_method (const gdb_byte *valaddr,
struct type *type,
struct ui_file *stream)
{
void
cp_print_value_fields (struct type *type, struct type *real_type,
- const bfd_byte *valaddr, int offset, CORE_ADDR address,
+ const gdb_byte *valaddr, int offset, CORE_ADDR address,
struct ui_file *stream, int format, int recurse,
enum val_prettyprint pretty,
struct type **dont_print_vb,int dont_print_statmem)
(TYPE_FIELD_TYPE (type, i),
unpack_field_as_long (type, valaddr + offset, i));
- val_print (TYPE_FIELD_TYPE (type, i), value_contents (v),
- 0, 0, stream, format, 0, recurse + 1, pretty);
+ common_val_print (v, stream, format, 0, recurse + 1, pretty);
}
}
else
v = value_from_pointer (lookup_pointer_type (builtin_type_unsigned_long),
*(unsigned long *) (valaddr + offset));
- val_print (value_type (v), value_contents (v), 0, 0,
- stream, format, 0, recurse + 1, pretty);
+ common_val_print (v, stream, format, 0, recurse + 1, pretty);
fields_seen = 1;
if (vtblprint)
static void
cp_print_value (struct type *type, struct type *real_type,
- const bfd_byte *valaddr, int offset, CORE_ADDR address,
+ const gdb_byte *valaddr, int offset, CORE_ADDR address,
struct ui_file *stream, int format, int recurse,
enum val_prettyprint pretty, struct type **dont_print_vb)
{
int skip;
struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
char *basename = TYPE_NAME (baseclass);
- const bfd_byte *base_valaddr;
+ const gdb_byte *base_valaddr;
if (BASETYPE_VIA_VIRTUAL (type, i))
{
|| (boffset + offset) >= TYPE_LENGTH (type)))
{
/* FIXME (alloca): unsafe if baseclass is really really large. */
- bfd_byte *buf = alloca (TYPE_LENGTH (baseclass));
+ gdb_byte *buf = alloca (TYPE_LENGTH (baseclass));
base_valaddr = buf;
if (target_read_memory (address + boffset, buf,
TYPE_LENGTH (baseclass)) != 0)
}
void
-cp_print_class_member (const bfd_byte *valaddr, struct type *domain,
+cp_print_class_member (const gdb_byte *valaddr, struct type *domain,
struct ui_file *stream, char *prefix)
{
deprecated_set_value_type (vf, value_type (v));
/* print out the entry */
- val_print (value_type (vf), value_contents (vf), 0, 0,
- stream, format, 0, recurse + 1, pretty);
+ common_val_print (vf, stream, format, 0, recurse + 1, pretty);
field_physname
= TYPE_FN_FIELD_PHYSNAME (TYPE_FN_FIELDLIST1 (type, fn), oi);
/* pai: (temp) FIXME Maybe this should be DMGL_ANSI */