* 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.
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>
simple_tail += 1;
break;
}
- else if (STREQN (simple_tail, "__", 2))
+ else if (DEPRECATED_STREQN (simple_tail, "__", 2))
{
simple_tail += 2;
break;
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;
{
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")));
}
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
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;
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;
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)
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] == '<')
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. */
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]))
{
}
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]))
{
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));
}
}
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)
{
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);
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;
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)
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
{
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]))
return 0;
if (str[2] == '_')
{
- if (STREQ (str + 3, "LJM"))
+ if (DEPRECATED_STREQ (str + 3, "LJM"))
return 1;
if (str[3] != 'X')
return 0;
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
{
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);
{
QUIT;
- if (STREQ (filename, ps->filename))
+ if (DEPRECATED_STREQ (filename, ps->filename))
PSYMTAB_TO_SYMTAB (ps);
}
}
QUIT;
- if (!STREQ (s->filename, filename))
+ if (!DEPRECATED_STREQ (s->filename, filename))
continue;
target_line_num =
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
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;
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
*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;
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");
}
}
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;
{
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)));
}
}
{
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
{
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'));
}
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)
{
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;
}
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;
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");
&& (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. */
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
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
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)
{
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);
{
csi->textsize += bfd_section_size (abfd, sectp);
}
- else if (STREQ (name, ".stabstr"))
+ else if (DEPRECATED_STREQ (name, ".stabstr"))
{
csi->stabstrsect = sectp;
}
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! */
break;
case C_FCN:
- if (STREQ (cs->c_name, ".bf"))
+ if (DEPRECATED_STREQ (cs->c_name, ".bf"))
{
within_function = 1;
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");
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 */
/* 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
/* 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. */
/* 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
/* 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
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. */
{
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;
}
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
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);
/* 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;
}
{
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;
/* 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);
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
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);
}
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
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;
subfieldno < TYPE_NFIELDS (substruct_type);
subfieldno++)
{
- if (STREQ (TYPE_FIELD_NAME (substruct_type,
+ if (DEPRECATED_STREQ (TYPE_FIELD_NAME (substruct_type,
subfieldno),
label))
{
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);
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;
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;
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;
}
/* 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);
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;
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 ();
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;
/* 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;
/* 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;
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;
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;
i++;
}
}
- else if (STREQN (p, "ss", 2))
+ else if (DEPRECATED_STREQN (p, "ss", 2))
{
/* get the next five values, ignoring the first */
int rn;
{
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;
}
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
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);
}
/* 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;
((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;
}
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;
((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
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;
}
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);
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;
/* 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;
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:
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;
}
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 */
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)
{
{
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;
{
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))
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;
}
}
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)
/* 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.
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;
{
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;
}
{
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;
}
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. */
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;
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)
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));
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,
break;
case C_BLOCK:
- if (STREQ (cs->c_name, ".bb"))
+ if (DEPRECATED_STREQ (cs->c_name, ".bb"))
{
depth++;
new = push_context (depth,
+ 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 */
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;
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;
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;