diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-04-06 19:25:04 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-04-06 19:25:04 +0000 |
commit | 5e488a7bab5bfa610d51621bff24a033e0dbd9a7 (patch) | |
tree | ce84771920219a1fd39cba54342681ea3fca9c85 /gdb/objc-lang.c | |
parent | 8cf716522f96f604dd42b607c8113a3d24f8b6fc (diff) | |
download | gdb-5e488a7bab5bfa610d51621bff24a033e0dbd9a7.zip gdb-5e488a7bab5bfa610d51621bff24a033e0dbd9a7.tar.gz gdb-5e488a7bab5bfa610d51621bff24a033e0dbd9a7.tar.bz2 |
2003-04-06 Andrew Cagney <cagney@redhat.com>
* valprint.h (inspect_it): Add extern declaration.
* objc-lang.c (value_nsstring): Avoid assignment inside of "if".
(selectors_info, classes_info): Ditto.
(find_objc_msgcall): Fix indentation.
(objc_printstr): Delete extern declarations.
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r-- | gdb/objc-lang.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index fe65bd8..bc937ca 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -199,8 +199,10 @@ value_nsstring (char *ptr, int len) if (!target_has_execution) return 0; /* Can't call into inferior to create NSString. */ - if (!(sym = lookup_struct_typedef("NSString", 0, 1)) && - !(sym = lookup_struct_typedef("NXString", 0, 1))) + sym = lookup_struct_typedef("NSString", 0, 1); + if (sym == NULL) + sym = lookup_struct_typedef("NXString", 0, 1); + if (sym == NULL) type = lookup_pointer_type(builtin_type_void); else type = lookup_pointer_type(SYMBOL_TYPE (sym)); @@ -369,8 +371,6 @@ objc_printstr (struct ui_file *stream, char *string, int in_quotes = 0; int need_comma = 0; extern int inspect_it; - extern int repeat_count_threshold; - extern int print_max; /* If the string was not truncated due to `set print elements', and the last byte of it is a null, we don't print that, in @@ -890,8 +890,11 @@ selectors_info (char *regexp, int from_tty) } if (regexp != NULL) - if (0 != (val = re_comp (myregexp))) - error ("Invalid regexp (%s): %s", val, regexp); + { + val = re_comp (myregexp); + if (val != 0) + error ("Invalid regexp (%s): %s", val, regexp); + } /* First time thru is JUST to get max length and count. */ ALL_MSYMBOLS (objfile, msymbol) @@ -1027,8 +1030,11 @@ classes_info (char *regexp, int from_tty) } if (regexp != NULL) - if (0 != (val = re_comp (myregexp))) - error ("Invalid regexp (%s): %s", val, regexp); + { + val = re_comp (myregexp); + if (val != 0) + error ("Invalid regexp (%s): %s", val, regexp); + } /* First time thru is JUST to get max length and count. */ ALL_MSYMBOLS (objfile, msymbol) @@ -1714,7 +1720,10 @@ find_objc_msgcall (CORE_ADDR pc, CORE_ADDR *new_pc) unsigned int i; find_objc_msgsend (); - if (new_pc != NULL) { *new_pc = 0; } + if (new_pc != NULL) + { + *new_pc = 0; + } for (i = 0; i < nmethcalls; i++) if ((pc >= methcalls[i].begin) && (pc < methcalls[i].end)) |