From 85c9a9d507fb41d3a1160eae93849c6d3a46beb9 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sun, 9 Apr 2000 13:02:10 +0000 Subject: [PATCH] Compare VALUE_ADDRESS() return value with ZERO not NULL. --- gdb/ChangeLog | 5 +++++ gdb/valops.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 320506dfc57..5a05271d147 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Sun Apr 9 22:54:29 2000 Andrew Cagney + + * valops.c (value_rtti_type): Compare VALUE_ADDRESS with ``0'' not + NULL. Macro returns a CORE_ADDR. + 2000-04-08 Jim Blandy * dwarf2read.c: Revert Andrew Cagney's change of Dec 15, 1997. diff --git a/gdb/valops.c b/gdb/valops.c index bfbffa982f4..a99ad1c8f8d 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3358,7 +3358,7 @@ value_rtti_type (v, full, top, using_enc) 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) + if (VALUE_ADDRESS (value_field (v, TYPE_VPTR_FIELDNO (known_type))) == 0) return NULL; /* -- 2.30.2