This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[PATCH] Compare VALUE_ADDRESS with ZERO not NULL
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [PATCH] Compare VALUE_ADDRESS with ZERO not NULL
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sun, 09 Apr 2000 23:01:57 +1000
- Organization: Cygnus Solutions
FYI,
I've committed the attatched. VALUE_ADDRESS() returns a target
CORE_ADDR not a host pointer.
enjoy,
Andrew
Sun Apr 9 22:54:29 2000 Andrew Cagney <cagney@b1.cygnus.com>
* valops.c (value_rtti_type): Compare VALUE_ADDRESS with ``0'' not
NULL. Macro returns a CORE_ADDR.
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.7
diff -p -r1.7 valops.c
*** valops.c 2000/04/04 04:53:50 1.7
--- valops.c 2000/04/09 13:00:23
*************** value_rtti_type (v, full, top, using_enc
*** 3358,3364 ****
we'd waste a bunch of time figuring out we already know the type.
Besides, we don't care about the type, just the actual pointer
*/
! if (VALUE_ADDRESS(value_field(v,TYPE_VPTR_FIELDNO(known_type))) == NULL)
return NULL;
/*
--- 3358,3364 ----
we'd waste a bunch of time figuring out we already know the type.
Besides, we don't care about the type, just the actual pointer
*/
! if (VALUE_ADDRESS (value_field (v, TYPE_VPTR_FIELDNO (known_type))) == 0)
return NULL;
/*