diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-07-11 01:35:54 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-07-11 01:35:54 +0000 |
commit | ae99b39843aa37ee127e04f4d98343c52349d49f (patch) | |
tree | 21a02e9d17c569d99f8f6f5d9c5622ced00e50cd /gdb | |
parent | 82599cce24ca939fa3c3797c6d63891fa8f5c79b (diff) | |
download | gdb-ae99b39843aa37ee127e04f4d98343c52349d49f.zip gdb-ae99b39843aa37ee127e04f4d98343c52349d49f.tar.gz gdb-ae99b39843aa37ee127e04f4d98343c52349d49f.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbarch.c | 6 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 6 |
3 files changed, 14 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9f84f71..af1c34a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 7333952..8567c05 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -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 diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 0688559..75687f6 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -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" |