diff options
-rw-r--r-- | gdb/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/ada-exp.y | 4 | ||||
-rw-r--r-- | gdb/ada-lang.c | 98 | ||||
-rw-r--r-- | gdb/ada-lex.l | 2 | ||||
-rw-r--r-- | gdb/coffread.c | 14 | ||||
-rw-r--r-- | gdb/config/mips/tm-irix5.h | 2 | ||||
-rw-r--r-- | gdb/config/mips/tm-irix6.h | 2 | ||||
-rw-r--r-- | gdb/config/mips/tm-mipsv4.h | 2 | ||||
-rw-r--r-- | gdb/config/sparc/tm-sun4sol2.h | 2 | ||||
-rw-r--r-- | gdb/dbxread.c | 12 | ||||
-rw-r--r-- | gdb/defs.h | 10 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 4 | ||||
-rw-r--r-- | gdb/dwarfread.c | 6 | ||||
-rw-r--r-- | gdb/environ.c | 2 | ||||
-rw-r--r-- | gdb/eval.c | 4 | ||||
-rw-r--r-- | gdb/exec.c | 4 | ||||
-rw-r--r-- | gdb/f-lang.c | 3 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 2 | ||||
-rw-r--r-- | gdb/hpread.c | 4 | ||||
-rw-r--r-- | gdb/jv-exp.y | 20 | ||||
-rw-r--r-- | gdb/language.c | 8 | ||||
-rw-r--r-- | gdb/m2-exp.y | 8 | ||||
-rw-r--r-- | gdb/mcore-rom.c | 6 | ||||
-rw-r--r-- | gdb/mdebugread.c | 14 | ||||
-rw-r--r-- | gdb/mipsread.c | 8 | ||||
-rw-r--r-- | gdb/objc-exp.y | 30 | ||||
-rw-r--r-- | gdb/objfiles.c | 2 | ||||
-rw-r--r-- | gdb/p-exp.y | 14 | ||||
-rw-r--r-- | gdb/p-typeprint.c | 10 | ||||
-rw-r--r-- | gdb/p-valprint.c | 2 | ||||
-rw-r--r-- | gdb/rs6000-nat.c | 12 | ||||
-rw-r--r-- | gdb/source.c | 4 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 2 | ||||
-rw-r--r-- | gdb/stack.c | 2 | ||||
-rw-r--r-- | gdb/target.c | 2 | ||||
-rw-r--r-- | gdb/xcoffread.c | 16 |
36 files changed, 184 insertions, 166 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b82d20a01a4..df1e85a900c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,7 +1,18 @@ 2003-11-23 Andrew Cagney <cagney@redhat.com> - * symfile.c (symbol_file_command): Replace STREQ with strcmp. + * defs.h (DEPRECATED_STREQN): Rename STREQN. + (DEPRECATED_STREQ): Rename STREQ. + * ada-exp.y, ada-lang.c, ada-lex.l, coffread.c: Update. + * config/mips/tm-irix5.h, config/mips/tm-irix6.h: Update. + * config/mips/tm-mipsv4.h, config/sparc/tm-sun4sol2.h: Update. + * dbxread.c, dwarf2read.c, dwarfread.c, environ.c: Update. + * eval.c, exec.c, f-lang.c, hppa-tdep.c, hpread.c: Update. + * jv-exp.y, language.c, m2-exp.y, mcore-rom.c: Update. + * mdebugread.c, mipsread.c, objc-exp.y, objfiles.c: Update. + * p-exp.y, p-typeprint.c, p-valprint.c, rs6000-nat.c: Update. + * source.c, sparc-tdep.c, stack.c, target.c: Update. + * symfile.c (symbol_file_command): Replace STREQ with strcmp. * elfread.c (elf_symtab_read): Delete STREQ from comment. 2003-11-22 Andrew Cagney <cagney@redhat.com> diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index 8d9bc045b8c..f4cbb37316a 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -823,7 +823,7 @@ write_object_renaming (orig_left_context, renaming) simple_tail += 1; break; } - else if (STREQN (simple_tail, "__", 2)) + else if (DEPRECATED_STREQN (simple_tail, "__", 2)) { simple_tail += 2; break; @@ -962,7 +962,7 @@ convert_char_literal (struct type* type, LONGEST val) sprintf (name, "QU%02x", (int) val); for (f = 0; f < TYPE_NFIELDS (type); f += 1) { - if (STREQ (name, TYPE_FIELD_NAME (type, f))) + if (DEPRECATED_STREQ (name, TYPE_FIELD_NAME (type, f))) return TYPE_FIELD_BITPOS (type, f); } return val; diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index dabad571db7..f05585f83c7 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -253,10 +253,10 @@ field_name_match (const char *field_name, const char *target) { int len = strlen (target); return - STREQN (field_name, target, len) + DEPRECATED_STREQN (field_name, target, len) && (field_name[len] == '\0' - || (STREQN (field_name + len, "___", 3) - && !STREQ (field_name + strlen (field_name) - 6, "___XVN"))); + || (DEPRECATED_STREQN (field_name + len, "___", 3) + && !DEPRECATED_STREQ (field_name + strlen (field_name) - 6, "___XVN"))); } @@ -286,7 +286,7 @@ is_suffix (const char *str, const char *suffix) return 0; len1 = strlen (str); len2 = strlen (suffix); - return (len1 >= len2 && STREQ (str + len1 - len2, suffix)); + return (len1 >= len2 && DEPRECATED_STREQ (str + len1 - len2, suffix)); } /* Create a value of type TYPE whose contents come from VALADDR, if it @@ -437,7 +437,7 @@ const struct ada_opname_map ada_opname_table[] = { static int is_suppressed_name (const char *str) { - if (STREQN (str, "_ada_", 5)) + if (DEPRECATED_STREQN (str, "_ada_", 5)) str += 5; if (str[0] == '_' || str[0] == '\000') return 1; @@ -458,7 +458,7 @@ is_suppressed_name (const char *str) if (*p != 'O') return 1; for (i = 0; ada_opname_table[i].mangled != NULL; i += 1) - if (STREQN (ada_opname_table[i].mangled, p, + if (DEPRECATED_STREQN (ada_opname_table[i].mangled, p, strlen (ada_opname_table[i].mangled))) goto OK; return 1; @@ -498,7 +498,7 @@ ada_mangle (const char *demangled) for (mapping = ada_opname_table; mapping->mangled != NULL && - !STREQN (mapping->demangled, p, strlen (mapping->demangled)); + !DEPRECATED_STREQN (mapping->demangled, p, strlen (mapping->demangled)); p += 1) ; if (mapping->mangled == NULL) @@ -569,7 +569,7 @@ ada_demangle (const char *mangled) static char *demangling_buffer = NULL; static size_t demangling_buffer_size = 0; - if (STREQN (mangled, "_ada_", 5)) + if (DEPRECATED_STREQN (mangled, "_ada_", 5)) mangled += 5; if (mangled[0] == '_' || mangled[0] == '<') @@ -585,9 +585,9 @@ ada_demangle (const char *mangled) else goto Suppress; } - if (len0 > 3 && STREQ (mangled + len0 - 3, "TKB")) + if (len0 > 3 && DEPRECATED_STREQ (mangled + len0 - 3, "TKB")) len0 -= 3; - if (len0 > 1 && STREQ (mangled + len0 - 1, "B")) + if (len0 > 1 && DEPRECATED_STREQ (mangled + len0 - 1, "B")) len0 -= 1; /* Make demangled big enough for possible expansion by operator name. */ @@ -616,7 +616,7 @@ ada_demangle (const char *mangled) for (k = 0; ada_opname_table[k].mangled != NULL; k += 1) { int op_len = strlen (ada_opname_table[k].mangled); - if (STREQN + if (DEPRECATED_STREQN (ada_opname_table[k].mangled + 1, mangled + i + 1, op_len - 1) && !isalnum (mangled[i + op_len])) { @@ -632,7 +632,7 @@ ada_demangle (const char *mangled) } at_start_name = 0; - if (i < len0 - 4 && STREQN (mangled + i, "TK__", 4)) + if (i < len0 - 4 && DEPRECATED_STREQN (mangled + i, "TK__", 4)) i += 2; if (mangled[i] == 'X' && i != 0 && isalnum (mangled[i - 1])) { @@ -692,10 +692,10 @@ ada_match_name (const char *sym_name, const char *name, int wild) else { int len_name = strlen (name); - return (STREQN (sym_name, name, len_name) + return (DEPRECATED_STREQN (sym_name, name, len_name) && is_name_suffix (sym_name + len_name)) - || (STREQN (sym_name, "_ada_", 5) - && STREQN (sym_name + 5, name, len_name) + || (DEPRECATED_STREQN (sym_name, "_ada_", 5) + && DEPRECATED_STREQN (sym_name + 5, name, len_name) && is_name_suffix (sym_name + len_name + 5)); } } @@ -1236,7 +1236,7 @@ decode_packed_array_type (struct type *type) VAR_DOMAIN, &syms, &blocks); for (i = 0; i < n; i += 1) if (syms[i] != NULL && SYMBOL_CLASS (syms[i]) == LOC_TYPEDEF - && STREQ (name, ada_type_name (SYMBOL_TYPE (syms[i])))) + && DEPRECATED_STREQ (name, ada_type_name (SYMBOL_TYPE (syms[i])))) break; if (i >= n) { @@ -2545,7 +2545,7 @@ mangled_ordered_before (char *N0, char *N1) n1 = k1; while (N1[n1] == '_' && n1 > 0 && N1[n1 - 1] == '_') n1 -= 1; - if (n0 == n1 && STREQN (N0, N1, n0)) + if (n0 == n1 && DEPRECATED_STREQN (N0, N1, n0)) return (atoi (N0 + k0 + 1) < atoi (N1 + k1 + 1)); } return (strcmp (N0, N1) < 0); @@ -3217,7 +3217,7 @@ equiv_types (struct type *type0, struct type *type1) if ((TYPE_CODE (type0) == TYPE_CODE_STRUCT || TYPE_CODE (type0) == TYPE_CODE_ENUM) && ada_type_name (type0) != NULL && ada_type_name (type1) != NULL - && STREQ (ada_type_name (type0), ada_type_name (type1))) + && DEPRECATED_STREQ (ada_type_name (type0), ada_type_name (type1))) return 1; return 0; @@ -3249,8 +3249,8 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1) return TYPE_CODE (type0) == TYPE_CODE (type1) && (equiv_types (type0, type1) - || (len0 < strlen (name1) && STREQN (name0, name1, len0) - && STREQN (name1 + len0, "___XV", 5))); + || (len0 < strlen (name1) && DEPRECATED_STREQN (name0, name1, len0) + && DEPRECATED_STREQN (name1 + len0, "___XV", 5))); } case LOC_CONST: return SYMBOL_VALUE (sym0) == SYMBOL_VALUE (sym1) @@ -3583,7 +3583,7 @@ static int is_nondebugging_type (struct type *type) { char *name = ada_type_name (type); - return (name != NULL && STREQ (name, "<variable, no debug info>")); + return (name != NULL && DEPRECATED_STREQ (name, "<variable, no debug info>")); } /* Remove any non-debugging symbols in SYMS[0 .. NSYMS-1] that definitely @@ -3610,7 +3610,7 @@ remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms) { if (i != j && DEPRECATED_SYMBOL_NAME (syms[j]) != NULL - && STREQ (DEPRECATED_SYMBOL_NAME (syms[i]), DEPRECATED_SYMBOL_NAME (syms[j])) + && DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (syms[i]), DEPRECATED_SYMBOL_NAME (syms[j])) && SYMBOL_CLASS (syms[i]) == SYMBOL_CLASS (syms[j]) && SYMBOL_VALUE_ADDRESS (syms[i]) == SYMBOL_VALUE_ADDRESS (syms[j])) @@ -3863,7 +3863,7 @@ is_name_suffix (const char *str) return 0; if (str[2] == '_') { - if (STREQ (str + 3, "LJM")) + if (DEPRECATED_STREQ (str + 3, "LJM")) return 1; if (str[3] != 'X') return 0; @@ -3900,14 +3900,14 @@ wild_match (const char *patn, int patn_len, const char *name) int s, e; name_len = strlen (name); - if (name_len >= patn_len + 5 && STREQN (name, "_ada_", 5) - && STREQN (patn, name + 5, patn_len) + if (name_len >= patn_len + 5 && DEPRECATED_STREQN (name, "_ada_", 5) + && DEPRECATED_STREQN (patn, name + 5, patn_len) && is_name_suffix (name + patn_len + 5)) return 1; while (name_len >= patn_len) { - if (STREQN (patn, name, patn_len) && is_name_suffix (name + patn_len)) + if (DEPRECATED_STREQN (patn, name, patn_len) && is_name_suffix (name + patn_len)) return 1; do { @@ -4454,7 +4454,7 @@ find_sal_from_funcs_and_line (const char *filename, int line_num, QUIT; - if (!STREQ (filename, s->filename)) + if (!DEPRECATED_STREQ (filename, s->filename)) continue; l = LINETABLE (s); ind = find_line_in_linetable (l, line_num, symbols, nsyms, &exact); @@ -4752,7 +4752,7 @@ read_all_symtabs (const char *filename) { QUIT; - if (STREQ (filename, ps->filename)) + if (DEPRECATED_STREQ (filename, ps->filename)) PSYMTAB_TO_SYMTAB (ps); } } @@ -4783,7 +4783,7 @@ all_sals_for_line (const char *filename, int line_num, char ***canonical) QUIT; - if (!STREQ (s->filename, filename)) + if (!DEPRECATED_STREQ (s->filename, filename)) continue; target_line_num = @@ -4961,9 +4961,9 @@ begin_command (char *args, int from_tty) int is_ada_runtime_file (char *filename) { - return (STREQN (filename, "s-", 2) || - STREQN (filename, "a-", 2) || - STREQN (filename, "g-", 2) || STREQN (filename, "i-", 2)); + return (DEPRECATED_STREQN (filename, "s-", 2) || + DEPRECATED_STREQN (filename, "a-", 2) || + DEPRECATED_STREQN (filename, "g-", 2) || DEPRECATED_STREQN (filename, "i-", 2)); } /* find the first frame that contains debugging information and that is not @@ -4984,7 +4984,7 @@ find_printable_frame (struct frame_info *fi, int level) from finding the right frame */ if (sal.symtab->objfile && - STREQ (sal.symtab->objfile->name, "/usr/shlib/libpthread.so")) + DEPRECATED_STREQ (sal.symtab->objfile->name, "/usr/shlib/libpthread.so")) continue; #endif deprecated_selected_frame = fi; @@ -5045,7 +5045,7 @@ ada_is_exception_sym (struct symbol *sym) return (SYMBOL_CLASS (sym) != LOC_TYPEDEF && SYMBOL_CLASS (sym) != LOC_BLOCK && SYMBOL_CLASS (sym) != LOC_CONST - && type_name != NULL && STREQ (type_name, "exception")); + && type_name != NULL && DEPRECATED_STREQ (type_name, "exception")); } int @@ -5068,7 +5068,7 @@ ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp) *break_on_exceptionp = 0; /* FIXME: language_ada should be defined in defs.h */ /* if (current_language->la_language == language_ada - && STREQN (arg, "exception", 9) && + && DEPRECATED_STREQN (arg, "exception", 9) && (arg[9] == ' ' || arg[9] == '\t' || arg[9] == '\0')) { char *tok, *end_tok; @@ -5093,7 +5093,7 @@ ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp) make_cleanup (xfree, arg); if (toklen == 0) strcpy (arg, "__gnat_raise_nodefer_with_msg"); - else if (STREQN (tok, "unhandled", toklen)) + else if (DEPRECATED_STREQN (tok, "unhandled", toklen)) { *break_on_exceptionp = 2; strcpy (arg, "__gnat_unhandled_exception"); @@ -5106,7 +5106,7 @@ ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp) } } else if (current_language->la_language == language_ada - && STREQN (arg, "assert", 6) && + && DEPRECATED_STREQN (arg, "assert", 6) && (arg[6] == ' ' || arg[6] == '\t' || arg[6] == '\0')) { char *tok = arg + 6; @@ -5138,7 +5138,7 @@ ada_is_ignored_field (struct type *type, int field_num) { const char *name = TYPE_FIELD_NAME (type, field_num); return (name == NULL - || (name[0] == '_' && !STREQN (name, "_parent", 7))); + || (name[0] == '_' && !DEPRECATED_STREQN (name, "_parent", 7))); } } @@ -5197,7 +5197,7 @@ ada_is_parent_field (struct type *type, int field_num) { const char *name = TYPE_FIELD_NAME (check_typedef (type), field_num); return (name != NULL && - (STREQN (name, "PARENT", 6) || STREQN (name, "_parent", 7))); + (DEPRECATED_STREQN (name, "PARENT", 6) || DEPRECATED_STREQN (name, "_parent", 7))); } /* True iff field number FIELD_NUM of structure type TYPE is a @@ -5211,8 +5211,8 @@ ada_is_wrapper_field (struct type *type, int field_num) { const char *name = TYPE_FIELD_NAME (type, field_num); return (name != NULL - && (STREQN (name, "PARENT", 6) || STREQ (name, "REP") - || STREQN (name, "_parent", 7) + && (DEPRECATED_STREQN (name, "PARENT", 6) || DEPRECATED_STREQ (name, "REP") + || DEPRECATED_STREQN (name, "_parent", 7) || name[0] == 'S' || name[0] == 'R' || name[0] == 'O')); } @@ -5283,7 +5283,7 @@ ada_variant_discrim_name (struct type *type0) for (discrim_end = name + strlen (name) - 6; discrim_end != name; discrim_end -= 1) { - if (STREQN (discrim_end, "___XVN", 6)) + if (DEPRECATED_STREQN (discrim_end, "___XVN", 6)) break; } if (discrim_end == name) @@ -5294,7 +5294,7 @@ ada_variant_discrim_name (struct type *type0) { if (discrim_start == name + 1) return ""; - if ((discrim_start > name + 3 && STREQN (discrim_start - 3, "___", 3)) + if ((discrim_start > name + 3 && DEPRECATED_STREQN (discrim_start - 3, "___", 3)) || discrim_start[-1] == '.') break; } @@ -5778,7 +5778,7 @@ field_alignment (struct type *type, int f) else align_offset = len - 1; - if (align_offset < 7 || !STREQN ("___XV", name + align_offset - 6, 5)) + if (align_offset < 7 || !DEPRECATED_STREQN ("___XV", name + align_offset - 6, 5)) return TARGET_CHAR_BIT; return atoi (name + align_offset) * TARGET_CHAR_BIT; @@ -5882,7 +5882,7 @@ dynamic_template_type (struct type *type) else { int len = strlen (ada_type_name (type)); - if (len > 6 && STREQ (ada_type_name (type) + len - 6, "___XVE")) + if (len > 6 && DEPRECATED_STREQ (ada_type_name (type) + len - 6, "___XVE")) return type; else return ada_find_parallel_type (type, "___XVE"); @@ -6547,8 +6547,8 @@ ada_is_character_type (struct type *type) && (TYPE_CODE (type) == TYPE_CODE_CHAR || TYPE_CODE (type) == TYPE_CODE_INT || TYPE_CODE (type) == TYPE_CODE_RANGE) - && (STREQ (name, "character") || STREQ (name, "wide_character") - || STREQ (name, "unsigned char")); + && (DEPRECATED_STREQ (name, "character") || DEPRECATED_STREQ (name, "wide_character") + || DEPRECATED_STREQ (name, "unsigned char")); } /* True if TYPE appears to be an Ada string type. */ @@ -6581,7 +6581,7 @@ ada_is_aligner_type (struct type *type) CHECK_TYPEDEF (type); return (TYPE_CODE (type) == TYPE_CODE_STRUCT && TYPE_NFIELDS (type) == 1 - && STREQ (TYPE_FIELD_NAME (type, 0), "F")); + && DEPRECATED_STREQ (TYPE_FIELD_NAME (type, 0), "F")); } /* If there is an ___XVS-convention type parallel to SUBTYPE, return @@ -7668,7 +7668,7 @@ ada_is_vax_floating_type (struct type *type) name_len > 6 && (TYPE_CODE (type) == TYPE_CODE_INT || TYPE_CODE (type) == TYPE_CODE_RANGE) - && STREQN (ada_type_name (type) + name_len - 6, "___XF", 5); + && DEPRECATED_STREQN (ada_type_name (type) + name_len - 6, "___XF", 5); } /* The type of special VAX floating-point type this is, assuming diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index d8bc78952bf..139e3aad3dd 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -759,7 +759,7 @@ name_lookup (name0, err_name, token_type) if (segments == 0) { type = lookup_primitive_typename (name); - if (type == NULL && STREQ ("system__address", name)) + if (type == NULL && DEPRECATED_STREQ ("system__address", name)) type = builtin_type_ada_system_address; if (type != NULL) { diff --git a/gdb/coffread.c b/gdb/coffread.c index fc6bdeb6309..215be80ef96 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -202,7 +202,7 @@ coff_locate_sections (bfd *abfd, asection *sectp, void *csip) csi = (struct coff_symfile_info *) csip; name = bfd_get_section_name (abfd, sectp); - if (STREQ (name, ".text")) + if (DEPRECATED_STREQ (name, ".text")) { csi->textaddr = bfd_section_vma (abfd, sectp); csi->textsize += bfd_section_size (abfd, sectp); @@ -211,7 +211,7 @@ coff_locate_sections (bfd *abfd, asection *sectp, void *csip) { csi->textsize += bfd_section_size (abfd, sectp); } - else if (STREQ (name, ".stabstr")) + else if (DEPRECATED_STREQ (name, ".stabstr")) { csi->stabstrsect = sectp; } @@ -819,7 +819,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, case C_THUMBSTATFUNC: if (cs->c_name[0] == '.') { - if (STREQ (cs->c_name, ".text")) + if (DEPRECATED_STREQ (cs->c_name, ".text")) { /* FIXME: don't wire in ".text" as section name or symbol name! */ @@ -944,7 +944,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, break; case C_FCN: - if (STREQ (cs->c_name, ".bf")) + if (DEPRECATED_STREQ (cs->c_name, ".bf")) { within_function = 1; @@ -966,7 +966,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, new->name = process_coff_symbol (&fcn_cs_saved, &fcn_aux_saved, objfile); } - else if (STREQ (cs->c_name, ".ef")) + else if (DEPRECATED_STREQ (cs->c_name, ".ef")) { if (!within_function) error ("Bad coff function information\n"); @@ -1042,13 +1042,13 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, break; case C_BLOCK: - if (STREQ (cs->c_name, ".bb")) + if (DEPRECATED_STREQ (cs->c_name, ".bb")) { tmpaddr = cs->c_value; tmpaddr += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); push_context (++depth, tmpaddr); } - else if (STREQ (cs->c_name, ".eb")) + else if (DEPRECATED_STREQ (cs->c_name, ".eb")) { if (context_stack_depth <= 0) { /* We attempted to pop an empty context stack */ diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h index e8612c075cc..fdc17567af5 100644 --- a/gdb/config/mips/tm-irix5.h +++ b/gdb/config/mips/tm-irix5.h @@ -31,7 +31,7 @@ /* The signal handler trampoline is called _sigtramp. */ #undef IN_SIGTRAMP -#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name)) +#define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name)) /* Irix 5 saves a full 64 bits for each register. We skip 2 * 4 to get to the saved PC (the register mask and status register are both diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h index 88a9a5c591b..272cafeac07 100644 --- a/gdb/config/mips/tm-irix6.h +++ b/gdb/config/mips/tm-irix6.h @@ -24,7 +24,7 @@ /* The signal handler trampoline is called _sigtramp. */ #undef IN_SIGTRAMP -#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name)) +#define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name)) /* Offsets for register values in _sigtramp frame. sigcontext is immediately above the _sigtramp frame on Irix. */ diff --git a/gdb/config/mips/tm-mipsv4.h b/gdb/config/mips/tm-mipsv4.h index 37f9e464790..fa4f0e011b4 100644 --- a/gdb/config/mips/tm-mipsv4.h +++ b/gdb/config/mips/tm-mipsv4.h @@ -23,7 +23,7 @@ /* The signal handler trampoline is called _sigtramp. */ #undef IN_SIGTRAMP -#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name)) +#define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name)) /* On entry to the signal handler trampoline, an ucontext is already pushed on the stack. We can get at the saved registers via the diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h index 9efe7794ea8..2247914c50d 100644 --- a/gdb/config/sparc/tm-sun4sol2.h +++ b/gdb/config/sparc/tm-sun4sol2.h @@ -30,7 +30,7 @@ /* There are two different signal handler trampolines in Solaris2. */ #define IN_SIGTRAMP(pc, name) \ ((name) \ - && (STREQ ("sigacthandler", name) || STREQ ("ucbsigvechandler", name))) + && (DEPRECATED_STREQ ("sigacthandler", name) || DEPRECATED_STREQ ("ucbsigvechandler", name))) /* The signal handler gets a pointer to an ucontext as third argument if it is called from sigacthandler. This is the offset to the saved diff --git a/gdb/dbxread.c b/gdb/dbxread.c index c736c3475e4..9bcb50eda32 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -483,7 +483,7 @@ record_minimal_symbol (char *name, CORE_ADDR address, int type, Record it as global even if it's local, not global, so lookup_minimal_symbol can find it. We don't check symbol_leading_char because for SunOS4 it always is '_'. */ - if (name[8] == 'C' && STREQ ("__DYNAMIC", name)) + if (name[8] == 'C' && DEPRECATED_STREQ ("__DYNAMIC", name)) ms_type = mst_data; /* Same with virtual function tables, both global and static. */ @@ -2511,13 +2511,13 @@ read_ofile_symtab (struct partial_symtab *pst) { const char *tempstring = namestring; - if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL)) + if (DEPRECATED_STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL)) processing_gcc_compilation = 1; - else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL)) + else if (DEPRECATED_STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL)) processing_gcc_compilation = 2; if (tempstring[0] == bfd_get_symbol_leading_char (symfile_bfd)) ++tempstring; - if (STREQN (tempstring, "__gnu_compiled", 14)) + if (DEPRECATED_STREQN (tempstring, "__gnu_compiled", 14)) processing_gcc_compilation = 2; } @@ -2583,9 +2583,9 @@ read_ofile_symtab (struct partial_symtab *pst) However, there is no reason not to accept the GCC_COMPILED_FLAG_SYMBOL anywhere. */ - if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL)) + if (DEPRECATED_STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL)) processing_gcc_compilation = 1; - else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL)) + else if (DEPRECATED_STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL)) processing_gcc_compilation = 2; #if 0 diff --git a/gdb/defs.h b/gdb/defs.h index d2c02ceed01..98d151d029f 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -154,8 +154,14 @@ typedef bfd_vma CORE_ADDR; issue is found that we spend the effort on algorithmic optimizations than micro-optimizing.'' J.T. */ -#define STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0) -#define STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0) +/* NOTE: cagney/2003-11-23: All instances of STREQ[N] covered by + testing GDB on a stabs system have been replaced by equivalent + str[n]cmp calls. To avoid the possability of introducing bugs when + making untested changes, the remaining references were deprecated + rather than replaced. */ + +#define DEPRECATED_STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0) +#define DEPRECATED_STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0) /* Check if a character is one of the commonly used C++ marker characters. */ extern int is_cplus_marker (int); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 49ba00ca334..53dd02f6c18 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2659,7 +2659,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die, /* Look up member function name in fieldlist. */ for (i = 0; i < fip->nfnfields; i++) { - if (STREQ (fip->fnfieldlists[i].name, fieldname)) + if (DEPRECATED_STREQ (fip->fnfieldlists[i].name, fieldname)) break; } @@ -2938,7 +2938,7 @@ read_structure_scope (struct die_info *die, struct dwarf2_cu *cu) { char *fieldname = TYPE_FIELD_NAME (t, i); - if (STREQN (fieldname, vptr_name, strlen (vptr_name) - 1) + if (DEPRECATED_STREQN (fieldname, vptr_name, strlen (vptr_name) - 1) && is_cplus_marker (fieldname[strlen (vptr_name)])) { TYPE_VPTR_FIELDNO (type) = i; diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index 5c1848707ab..b66d84080ab 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -1802,7 +1802,7 @@ handle_producer (char *producer) /* If this compilation unit was compiled with g++ or gcc, then set the processing_gcc_compilation flag. */ - if (STREQN (producer, GCC_PRODUCER, strlen (GCC_PRODUCER))) + if (DEPRECATED_STREQN (producer, GCC_PRODUCER, strlen (GCC_PRODUCER))) { char version = producer[strlen (GCC_PRODUCER)]; processing_gcc_compilation = (version == '2' ? 2 : 1); @@ -1820,7 +1820,7 @@ handle_producer (char *producer) if (AUTO_DEMANGLING) { - if (STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER))) + if (DEPRECATED_STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER))) { #if 0 /* For now, stay with AUTO_DEMANGLING for g++ output, as we don't @@ -1828,7 +1828,7 @@ handle_producer (char *producer) set_demangling_style (GNU_DEMANGLING_STYLE_STRING); #endif } - else if (STREQN (producer, LCC_PRODUCER, strlen (LCC_PRODUCER))) + else if (DEPRECATED_STREQN (producer, LCC_PRODUCER, strlen (LCC_PRODUCER))) { set_demangling_style (LUCID_DEMANGLING_STYLE_STRING); } diff --git a/gdb/environ.c b/gdb/environ.c index 01eb57a3658..b62938851b9 100644 --- a/gdb/environ.c +++ b/gdb/environ.c @@ -170,7 +170,7 @@ unset_in_environ (struct environ *e, char *var) for (; (s = *vector) != NULL; vector++) { - if (STREQN (s, var, len) && s[len] == '=') + if (DEPRECATED_STREQN (s, var, len) && s[len] == '=') { xfree (s); /* Walk through the vector, shuffling args down by one, including diff --git a/gdb/eval.c b/gdb/eval.c index a44d0c7fbe2..95a2e4a3f8e 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -227,7 +227,7 @@ evaluate_struct_tuple (struct value *struct_val, fieldno++) { char *field_name = TYPE_FIELD_NAME (struct_type, fieldno); - if (field_name != NULL && STREQ (field_name, label)) + if (field_name != NULL && DEPRECATED_STREQ (field_name, label)) { variantno = -1; subfieldno = fieldno; @@ -255,7 +255,7 @@ evaluate_struct_tuple (struct value *struct_val, subfieldno < TYPE_NFIELDS (substruct_type); subfieldno++) { - if (STREQ (TYPE_FIELD_NAME (substruct_type, + if (DEPRECATED_STREQ (TYPE_FIELD_NAME (substruct_type, subfieldno), label)) { diff --git a/gdb/exec.c b/gdb/exec.c index 1c51917a851..b849533e0c4 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -384,14 +384,14 @@ bfdsec_to_vmap (struct bfd *abfd, struct bfd_section *sect, void *arg3) if ((bfd_get_section_flags (abfd, sect) & SEC_LOAD) == 0) return; - if (STREQ (bfd_section_name (abfd, sect), ".text")) + if (DEPRECATED_STREQ (bfd_section_name (abfd, sect), ".text")) { vp->tstart = bfd_section_vma (abfd, sect); vp->tend = vp->tstart + bfd_section_size (abfd, sect); vp->tvma = bfd_section_vma (abfd, sect); vp->toffs = sect->filepos; } - else if (STREQ (bfd_section_name (abfd, sect), ".data")) + else if (DEPRECATED_STREQ (bfd_section_name (abfd, sect), ".data")) { vp->dstart = bfd_section_vma (abfd, sect); vp->dend = vp->dstart + bfd_section_size (abfd, sect); diff --git a/gdb/f-lang.c b/gdb/f-lang.c index 9ad4792dcb9..37ca92c7d43 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -799,7 +799,8 @@ find_common_for_function (char *name, char *funcname) while (tmp != NULL) { - if (STREQ (tmp->name, name) && STREQ (tmp->owning_function, funcname)) + if (DEPRECATED_STREQ (tmp->name, name) + && DEPRECATED_STREQ (tmp->owning_function, funcname)) return (tmp); else tmp = tmp->next; diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 0d1d3050422..53113166b9c 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -3379,7 +3379,7 @@ hppa_skip_trampoline_code (CORE_ADDR pc) ALL_MSYMBOLS (objfile, msymbol) { if (MSYMBOL_TYPE (msymbol) == mst_text - && STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (msym))) + && DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (msymbol), DEPRECATED_SYMBOL_NAME (msym))) { function_found = 1; break; diff --git a/gdb/hpread.c b/gdb/hpread.c index daa5d5e45e2..40875f79377 100644 --- a/gdb/hpread.c +++ b/gdb/hpread.c @@ -3897,7 +3897,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp, fn_p = fn_list; while (fn_p) { - if (STREQ (fn_p->field.name, method_name)) + if (DEPRECATED_STREQ (fn_p->field.name, method_name)) break; fn_p = fn_p->next; } @@ -6303,7 +6303,7 @@ hpread_get_next_skip_over_anon_unions (int skip_fields, dnttpointer field, /* Do we have another anonymous union? If so, adjust the bitoffsets of its members and skip over its members. */ if ((TYPE_CODE (anon_type) == TYPE_CODE_UNION) && - (!name || STREQ (name, ""))) + (!name || DEPRECATED_STREQ (name, ""))) { hpread_adjust_bitoffsets (anon_type, bitoffset); field = hpread_get_next_skip_over_anon_unions (TYPE_NFIELDS (anon_type), field, fieldp, objfile); diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index 586c1ca4fb3..41da7d0f3fd 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -1133,34 +1133,34 @@ yylex () switch (namelen) { case 7: - if (STREQN (tokstart, "boolean", 7)) + if (DEPRECATED_STREQN (tokstart, "boolean", 7)) return BOOLEAN; break; case 6: - if (STREQN (tokstart, "double", 6)) + if (DEPRECATED_STREQN (tokstart, "double", 6)) return DOUBLE; break; case 5: - if (STREQN (tokstart, "short", 5)) + if (DEPRECATED_STREQN (tokstart, "short", 5)) return SHORT; - if (STREQN (tokstart, "false", 5)) + if (DEPRECATED_STREQN (tokstart, "false", 5)) { yylval.lval = 0; return BOOLEAN_LITERAL; } - if (STREQN (tokstart, "super", 5)) + if (DEPRECATED_STREQN (tokstart, "super", 5)) return SUPER; - if (STREQN (tokstart, "float", 5)) + if (DEPRECATED_STREQN (tokstart, "float", 5)) return FLOAT; break; case 4: - if (STREQN (tokstart, "long", 4)) + if (DEPRECATED_STREQN (tokstart, "long", 4)) return LONG; - if (STREQN (tokstart, "byte", 4)) + if (DEPRECATED_STREQN (tokstart, "byte", 4)) return BYTE; - if (STREQN (tokstart, "char", 4)) + if (DEPRECATED_STREQN (tokstart, "char", 4)) return CHAR; - if (STREQN (tokstart, "true", 4)) + if (DEPRECATED_STREQN (tokstart, "true", 4)) { yylval.lval = 1; return BOOLEAN_LITERAL; diff --git a/gdb/language.c b/gdb/language.c index 04b032ce8c1..3be9f9eedcd 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -344,17 +344,17 @@ show_case_command (char *ignore, int from_tty) static void set_case_command (char *ignore, int from_tty) { - if (STREQ (case_sensitive, "on")) + if (DEPRECATED_STREQ (case_sensitive, "on")) { case_sensitivity = case_sensitive_on; case_mode = case_mode_manual; } - else if (STREQ (case_sensitive, "off")) + else if (DEPRECATED_STREQ (case_sensitive, "off")) { case_sensitivity = case_sensitive_off; case_mode = case_mode_manual; } - else if (STREQ (case_sensitive, "auto")) + else if (DEPRECATED_STREQ (case_sensitive, "auto")) { case_mode = case_mode_auto; set_type_range_case (); @@ -1059,7 +1059,7 @@ language_enum (char *str) int i; for (i = 0; i < languages_size; i++) - if (STREQ (languages[i]->la_name, str)) + if (DEPRECATED_STREQ (languages[i]->la_name, str)) return languages[i]->la_language; return language_unknown; diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 11495614b6d..646672b391f 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -835,7 +835,7 @@ yylex () /* See if it is a special token of length 2 */ for( i = 0 ; i < (int) (sizeof tokentab2 / sizeof tokentab2[0]) ; i++) - if(STREQN(tokentab2[i].name, tokstart, 2)) + if(DEPRECATED_STREQN(tokentab2[i].name, tokstart, 2)) { lexptr += 2; return tokentab2[i].token; @@ -992,7 +992,7 @@ yylex () /* Lookup special keywords */ for(i = 0 ; i < (int) (sizeof(keytab) / sizeof(keytab[0])) ; i++) - if(namelen == strlen(keytab[i].keyw) && STREQN(tokstart,keytab[i].keyw,namelen)) + if(namelen == strlen(keytab[i].keyw) && DEPRECATED_STREQN(tokstart,keytab[i].keyw,namelen)) return keytab[i].token; yylval.sval.ptr = tokstart; @@ -1066,12 +1066,12 @@ yylex () else { /* Built-in BOOLEAN type. This is sort of a hack. */ - if(STREQN(tokstart,"TRUE",4)) + if(DEPRECATED_STREQN(tokstart,"TRUE",4)) { yylval.ulval = 1; return M2_TRUE; } - else if(STREQN(tokstart,"FALSE",5)) + else if(DEPRECATED_STREQN(tokstart,"FALSE",5)) { yylval.ulval = 0; return M2_FALSE; diff --git a/gdb/mcore-rom.c b/gdb/mcore-rom.c index 339c64096d6..dcc2cfb26cf 100644 --- a/gdb/mcore-rom.c +++ b/gdb/mcore-rom.c @@ -102,7 +102,7 @@ picobug_dumpregs (void) if (strchr (p, '-')) { /* got a range. either r0-r7, r8-r15 or ss0-ss4 */ - if (STREQN (p, "r0", 2) || STREQN (p, "r8", 2)) + if (DEPRECATED_STREQN (p, "r0", 2) || DEPRECATED_STREQN (p, "r8", 2)) { int rn = (p[1] == '0' ? 0 : 8); int i = 0; @@ -116,7 +116,7 @@ picobug_dumpregs (void) i++; } } - else if (STREQN (p, "ss", 2)) + else if (DEPRECATED_STREQN (p, "ss", 2)) { /* get the next five values, ignoring the first */ int rn; @@ -145,7 +145,7 @@ picobug_dumpregs (void) { for (i = 0; i < NUM_REGS; i++) { - if (picobug_regnames[i] && STREQ (picobug_regnames[i], name)) + if (picobug_regnames[i] && DEPRECATED_STREQ (picobug_regnames[i], name)) break; } diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 2ccaac34592..97794dc0a76 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -793,7 +793,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, else { t = parse_type (cur_fd, ax, sh->index + 1, 0, bigend, name); - if (STREQ (name, "malloc") && TYPE_CODE (t) == TYPE_CODE_VOID) + if (DEPRECATED_STREQ (name, "malloc") && TYPE_CODE (t) == TYPE_CODE_VOID) { /* I don't know why, but, at least under Alpha GNU/Linux, when linking against a malloc without debugging @@ -1667,7 +1667,7 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs, bad_tag_guess_complaint (sym_name); TYPE_CODE (tp) = type_code; } - if (TYPE_NAME (tp) == NULL || !STREQ (TYPE_NAME (tp), name)) + if (TYPE_NAME (tp) == NULL || !DEPRECATED_STREQ (TYPE_NAME (tp), name)) TYPE_NAME (tp) = obsavestring (name, strlen (name), ¤t_objfile->type_obstack); } @@ -1987,7 +1987,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab, /* Correct incorrect setjmp procedure descriptor from the library to make backtrace through setjmp work. */ - if (e->pdr.pcreg == 0 && STREQ (sh_name, "setjmp")) + if (e->pdr.pcreg == 0 && DEPRECATED_STREQ (sh_name, "setjmp")) { complaint (&symfile_complaints, "fixing bad setjmp PDR from libc"); e->pdr.pcreg = RA_REGNUM; @@ -2608,7 +2608,7 @@ parse_partial_symbols (struct objfile *objfile) ((char *) debug_info->external_sym + (fh->isymBase + 1) * external_sym_size), &sh); - if (STREQ (debug_info->ss + fh->issBase + sh.iss, stabs_symbol)) + if (DEPRECATED_STREQ (debug_info->ss + fh->issBase + sh.iss, stabs_symbol)) processing_gcc_compilation = 2; } @@ -2929,12 +2929,12 @@ parse_partial_symbols (struct objfile *objfile) things like "break c-exp.y:435" need to work (I suppose the psymtab_include_list could be hashed or put in a binary tree, if profiling shows this is a major hog). */ - if (pst && STREQ (namestring, pst->filename)) + if (pst && DEPRECATED_STREQ (namestring, pst->filename)) continue; { int i; for (i = 0; i < includes_used; i++) - if (STREQ (namestring, psymtab_include_list[i])) + if (DEPRECATED_STREQ (namestring, psymtab_include_list[i])) { i = -1; break; @@ -3861,7 +3861,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename) ((char *) debug_info->external_sym + (fh->isymBase + 1) * external_sym_size), &sh); - if (STREQ (debug_info->ss + fh->issBase + sh.iss, + if (DEPRECATED_STREQ (debug_info->ss + fh->issBase + sh.iss, stabs_symbol)) { /* We indicate that this is a GCC compilation so that certain diff --git a/gdb/mipsread.c b/gdb/mipsread.c index 2ea18d712d5..a6506f232d9 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -197,19 +197,19 @@ alphacoff_locate_sections (bfd *ignore_abfd, asection *sectp, void *sip) si = (struct alphacoff_dynsecinfo *) sip; - if (STREQ (sectp->name, ".dynsym")) + if (DEPRECATED_STREQ (sectp->name, ".dynsym")) { si->sym_sect = sectp; } - else if (STREQ (sectp->name, ".dynstr")) + else if (DEPRECATED_STREQ (sectp->name, ".dynstr")) { si->str_sect = sectp; } - else if (STREQ (sectp->name, ".dynamic")) + else if (DEPRECATED_STREQ (sectp->name, ".dynamic")) { si->dyninfo_sect = sectp; } - else if (STREQ (sectp->name, ".got")) + else if (DEPRECATED_STREQ (sectp->name, ".got")) { si->got_sect = sectp; } diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y index f6123e6ab1d..f56f68d7a07 100644 --- a/gdb/objc-exp.y +++ b/gdb/objc-exp.y @@ -680,7 +680,7 @@ qualified_name: typebase COLONCOLON name error ("`%s' is not defined as an aggregate type.", TYPE_NAME (type)); - if (!STREQ (type_name_no_tag (type), $4.ptr)) + if (!DEPRECATED_STREQ (type_name_no_tag (type), $4.ptr)) error ("invalid destructor `%s::~%s'", type_name_no_tag (type), $4.ptr); @@ -1265,7 +1265,7 @@ yylex () tokstart = lexptr; /* See if it is a special token of length 3. */ for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++) - if (STREQN (tokstart, tokentab3[i].operator, 3)) + if (DEPRECATED_STREQN (tokstart, tokentab3[i].operator, 3)) { lexptr += 3; yylval.opcode = tokentab3[i].opcode; @@ -1274,7 +1274,7 @@ yylex () /* See if it is a special token of length 2. */ for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++) - if (STREQN (tokstart, tokentab2[i].operator, 2)) + if (DEPRECATED_STREQN (tokstart, tokentab2[i].operator, 2)) { lexptr += 2; yylval.opcode = tokentab2[i].opcode; @@ -1589,43 +1589,43 @@ yylex () switch (namelen) { case 8: - if (STREQN (tokstart, "unsigned", 8)) + if (DEPRECATED_STREQN (tokstart, "unsigned", 8)) return UNSIGNED; if (current_language->la_language == language_cplus && strncmp (tokstart, "template", 8) == 0) return TEMPLATE; - if (STREQN (tokstart, "volatile", 8)) + if (DEPRECATED_STREQN (tokstart, "volatile", 8)) return VOLATILE_KEYWORD; break; case 6: - if (STREQN (tokstart, "struct", 6)) + if (DEPRECATED_STREQN (tokstart, "struct", 6)) return STRUCT; - if (STREQN (tokstart, "signed", 6)) + if (DEPRECATED_STREQN (tokstart, "signed", 6)) return SIGNED_KEYWORD; - if (STREQN (tokstart, "sizeof", 6)) + if (DEPRECATED_STREQN (tokstart, "sizeof", 6)) return SIZEOF; - if (STREQN (tokstart, "double", 6)) + if (DEPRECATED_STREQN (tokstart, "double", 6)) return DOUBLE_KEYWORD; break; case 5: if ((current_language->la_language == language_cplus) && strncmp (tokstart, "class", 5) == 0) return CLASS; - if (STREQN (tokstart, "union", 5)) + if (DEPRECATED_STREQN (tokstart, "union", 5)) return UNION; - if (STREQN (tokstart, "short", 5)) + if (DEPRECATED_STREQN (tokstart, "short", 5)) return SHORT; - if (STREQN (tokstart, "const", 5)) + if (DEPRECATED_STREQN (tokstart, "const", 5)) return CONST_KEYWORD; break; case 4: - if (STREQN (tokstart, "enum", 4)) + if (DEPRECATED_STREQN (tokstart, "enum", 4)) return ENUM; - if (STREQN (tokstart, "long", 4)) + if (DEPRECATED_STREQN (tokstart, "long", 4)) return LONG; break; case 3: - if (STREQN (tokstart, "int", 3)) + if (DEPRECATED_STREQN (tokstart, "int", 3)) return INT_KEYWORD; break; default: diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 9ea0dc9ba47..923d59b2c10 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -1104,7 +1104,7 @@ is_in_import_list (char *name, struct objfile *objfile) return 0; for (i = 0; i < objfile->import_list_size; i++) - if (objfile->import_list[i] && STREQ (name, objfile->import_list[i])) + if (objfile->import_list[i] && DEPRECATED_STREQ (name, objfile->import_list[i])) return 1; return 0; } diff --git a/gdb/p-exp.y b/gdb/p-exp.y index 6132e6eb10c..779424e90d5 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -1369,29 +1369,29 @@ yylex () switch (namelen) { case 6: - if (STREQ (uptokstart, "OBJECT")) + if (DEPRECATED_STREQ (uptokstart, "OBJECT")) return CLASS; - if (STREQ (uptokstart, "RECORD")) + if (DEPRECATED_STREQ (uptokstart, "RECORD")) return STRUCT; - if (STREQ (uptokstart, "SIZEOF")) + if (DEPRECATED_STREQ (uptokstart, "SIZEOF")) return SIZEOF; break; case 5: - if (STREQ (uptokstart, "CLASS")) + if (DEPRECATED_STREQ (uptokstart, "CLASS")) return CLASS; - if (STREQ (uptokstart, "FALSE")) + if (DEPRECATED_STREQ (uptokstart, "FALSE")) { yylval.lval = 0; return FALSEKEYWORD; } break; case 4: - if (STREQ (uptokstart, "TRUE")) + if (DEPRECATED_STREQ (uptokstart, "TRUE")) { yylval.lval = 1; return TRUEKEYWORD; } - if (STREQ (uptokstart, "SELF")) + if (DEPRECATED_STREQ (uptokstart, "SELF")) { /* here we search for 'this' like inserted in FPC stabs debug info */ diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index 99d67e27577..a8908b155d2 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -139,8 +139,8 @@ void pascal_type_print_method_args (char *physname, char *methodname, struct ui_file *stream) { - int is_constructor = STREQN (physname, "__ct__", 6); - int is_destructor = STREQN (physname, "__dt__", 6); + int is_constructor = DEPRECATED_STREQN (physname, "__ct__", 6); + int is_destructor = DEPRECATED_STREQN (physname, "__dt__", 6); if (is_constructor || is_destructor) { @@ -559,7 +559,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show, { QUIT; /* Don't print out virtual function table. */ - if (STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5) + if (DEPRECATED_STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5) && is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5])) continue; @@ -637,8 +637,8 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show, { char *physname = TYPE_FN_FIELD_PHYSNAME (f, j); - int is_constructor = STREQN (physname, "__ct__", 6); - int is_destructor = STREQN (physname, "__dt__", 6); + int is_constructor = DEPRECATED_STREQN (physname, "__ct__", 6); + int is_destructor = DEPRECATED_STREQN (physname, "__dt__", 6); QUIT; if (TYPE_FN_FIELD_PROTECTED (f, j)) diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 90d968a4764..eb92f77591c 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -650,7 +650,7 @@ pascal_object_print_class_method (char *valaddr, struct type *type, check_stub_method_group (domain, i); for (j = 0; j < len2; j++) { - if (STREQ (DEPRECATED_SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j))) + if (DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j))) goto common; } } diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 6f96c176bf1..78789842608 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -759,7 +759,7 @@ add_vmap (LdInfo *ldi) last = 0; /* FIXME??? am I tossing BFDs? bfd? */ while ((last = bfd_openr_next_archived_file (abfd, last))) - if (STREQ (mem, last->filename)) + if (DEPRECATED_STREQ (mem, last->filename)) break; if (!last) @@ -843,8 +843,8 @@ vmap_ldinfo (LdInfo *ldi) /* The filenames are not always sufficient to match on. */ - if ((name[0] == '/' && !STREQ (name, vp->name)) - || (memb[0] && !STREQ (memb, vp->member))) + if ((name[0] == '/' && !DEPRECATED_STREQ (name, vp->name)) + || (memb[0] && !DEPRECATED_STREQ (memb, vp->member))) continue; /* See if we are referring to the same file. @@ -941,17 +941,17 @@ vmap_exec (void) for (i = 0; &exec_ops.to_sections[i] < exec_ops.to_sections_end; i++) { - if (STREQ (".text", exec_ops.to_sections[i].the_bfd_section->name)) + if (DEPRECATED_STREQ (".text", exec_ops.to_sections[i].the_bfd_section->name)) { exec_ops.to_sections[i].addr += vmap->tstart - vmap->tvma; exec_ops.to_sections[i].endaddr += vmap->tstart - vmap->tvma; } - else if (STREQ (".data", exec_ops.to_sections[i].the_bfd_section->name)) + else if (DEPRECATED_STREQ (".data", exec_ops.to_sections[i].the_bfd_section->name)) { exec_ops.to_sections[i].addr += vmap->dstart - vmap->dvma; exec_ops.to_sections[i].endaddr += vmap->dstart - vmap->dvma; } - else if (STREQ (".bss", exec_ops.to_sections[i].the_bfd_section->name)) + else if (DEPRECATED_STREQ (".bss", exec_ops.to_sections[i].the_bfd_section->name)) { exec_ops.to_sections[i].addr += vmap->dstart - vmap->dvma; exec_ops.to_sections[i].endaddr += vmap->dstart - vmap->dvma; diff --git a/gdb/source.c b/gdb/source.c index a44a93b1421..c5f588af69e 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -260,7 +260,7 @@ select_source_symtab (struct symtab *s) { char *name = s->filename; int len = strlen (name); - if (!(len > 2 && (STREQ (&name[len - 2], ".h")))) + if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h")))) { current_source_symtab = s; } @@ -277,7 +277,7 @@ select_source_symtab (struct symtab *s) { char *name = ps->filename; int len = strlen (name); - if (!(len > 2 && (STREQ (&name[len - 2], ".h")))) + if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h")))) { cs_pst = ps; } diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index c32d3029b54..d3b24186769 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -433,7 +433,7 @@ sparc_frame_saved_pc (struct frame_info *frame) as the third parameter. The offset to the saved pc is 12. */ find_pc_partial_function (get_frame_pc (frame), &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL); - if (name && STREQ (name, "ucbsigvechandler")) + if (name && DEPRECATED_STREQ (name, "ucbsigvechandler")) saved_pc_offset = 12; /* The sigcontext address is contained in register O2. */ diff --git a/gdb/stack.c b/gdb/stack.c index db45284727a..04e6a18bce6 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1356,7 +1356,7 @@ print_block_frame_labels (struct block *b, int *have_default, ALL_BLOCK_SYMBOLS (b, iter, sym) { - if (STREQ (DEPRECATED_SYMBOL_NAME (sym), "default")) + if (DEPRECATED_STREQ (DEPRECATED_SYMBOL_NAME (sym), "default")) { if (*have_default) continue; diff --git a/gdb/target.c b/gdb/target.c index 7e088b93b96..4c12bda3f8a 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -1284,7 +1284,7 @@ target_disconnect (char *args, int from_tty) void target_link (char *modname, CORE_ADDR *t_reloc) { - if (STREQ (current_target.to_shortname, "rombug")) + if (DEPRECATED_STREQ (current_target.to_shortname, "rombug")) { (current_target.to_lookup_symbol) (modname, t_reloc); if (*t_reloc == 0) diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 6183785db69..4375d18afdf 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1251,7 +1251,7 @@ read_xcoff_symtab (struct partial_symtab *pst) break; case C_FCN: - if (STREQ (cs->c_name, ".bf")) + if (DEPRECATED_STREQ (cs->c_name, ".bf")) { CORE_ADDR off = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); @@ -1268,7 +1268,7 @@ read_xcoff_symtab (struct partial_symtab *pst) if (new->name != NULL) SYMBOL_SECTION (new->name) = SECT_OFF_TEXT (objfile); } - else if (STREQ (cs->c_name, ".ef")) + else if (DEPRECATED_STREQ (cs->c_name, ".ef")) { bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass, @@ -1362,7 +1362,7 @@ read_xcoff_symtab (struct partial_symtab *pst) break; case C_BLOCK: - if (STREQ (cs->c_name, ".bb")) + if (DEPRECATED_STREQ (cs->c_name, ".bb")) { depth++; new = push_context (depth, @@ -1370,7 +1370,7 @@ read_xcoff_symtab (struct partial_symtab *pst) + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)))); } - else if (STREQ (cs->c_name, ".eb")) + else if (DEPRECATED_STREQ (cs->c_name, ".eb")) { if (context_stack_depth <= 0) { /* We attempted to pop an empty context stack */ @@ -1671,7 +1671,7 @@ read_symbol_lineno (int symno) if (symbol->n_sclass == C_FCN) { char *name = xcoff64 ? strtbl + symbol->n_offset : symbol->n_name; - if (STREQ (name, ".bf")) + if (DEPRECATED_STREQ (name, ".bf")) goto gotit; } symno += symbol->n_numaux + 1; @@ -1705,7 +1705,7 @@ find_linenos (struct bfd *abfd, struct bfd_section *asect, void *vpinfo) count = asect->lineno_count; - if (!STREQ (asect->name, ".text") || count == 0) + if (!DEPRECATED_STREQ (asect->name, ".text") || count == 0) return; size = count * coff_data (abfd)->local_linesz; @@ -2530,12 +2530,12 @@ scan_xcoff_symtab (struct objfile *objfile) things like "break c-exp.y:435" need to work (I suppose the psymtab_include_list could be hashed or put in a binary tree, if profiling shows this is a major hog). */ - if (pst && STREQ (namestring, pst->filename)) + if (pst && DEPRECATED_STREQ (namestring, pst->filename)) continue; { int i; for (i = 0; i < includes_used; i++) - if (STREQ (namestring, psymtab_include_list[i])) + if (DEPRECATED_STREQ (namestring, psymtab_include_list[i])) { i = -1; break; |