2003-07-10 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Fri, 11 Jul 2003 01:35:54 +0000 (01:35 +0000)
committerAndrew Cagney <cagney@redhat.com>
Fri, 11 Jul 2003 01:35:54 +0000 (01:35 +0000)
* gdbarch.sh: When a variable, but not a function, compare against
0.  Fix problem in previous patch.
* gdbarch.c: Re-generate.

gdb/ChangeLog
gdb/gdbarch.c
gdb/gdbarch.sh

index 9f84f71..af1c34a 100644 (file)
@@ -1,5 +1,11 @@
 2003-07-10  Andrew Cagney  <cagney@redhat.com>
 
+       * gdbarch.sh: When a variable, but not a function, compare against
+       0.  Fix problem in previous patch.
+       * gdbarch.c: Re-generate.
+       
+2003-07-10  Andrew Cagney  <cagney@redhat.com>
+
        * gdbarch.sh: Use gdb_assert instead of internal_error.  Compare
        functions against NULL, not 0.
        * gdbarch.c: Re-generate.
index 7333952..8567c05 100644 (file)
@@ -3422,7 +3422,7 @@ int
 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_max_register_raw_size != NULL;
+  return gdbarch->deprecated_max_register_raw_size != 0;
 }
 
 int
@@ -3445,7 +3445,7 @@ int
 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_max_register_virtual_size != NULL;
+  return gdbarch->deprecated_max_register_virtual_size != 0;
 }
 
 int
@@ -3802,7 +3802,7 @@ int
 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_call_dummy_stack_adjust != NULL;
+  return gdbarch->deprecated_call_dummy_stack_adjust != 0;
 }
 
 int
index 0688559..75687f6 100755 (executable)
@@ -1732,7 +1732,11 @@ do
        if [ -n "${predicate}" ]
        then
            printf "  return ${predicate};\n"
-       else
+       elif class_is_variable_p
+       then
+           printf "  return gdbarch->${function} != 0;\n"
+       elif class_is_function_p
+       then
            printf "  return gdbarch->${function} != NULL;\n"
        fi
        printf "}\n"