2003-11-07 Andrew Cagney <cagney@redhat.com>

* top.c (print_gdb_version): Replace STREQ with strcmp.
	* valops.c (value_struct_elt_for_reference): Ditto.
	(value_struct_elt_for_reference): Ditto.
	* symtab.c (gdb_mangle_name): Ditto.
	(find_line_symtab): Ditto.
	* symmisc.c (maintenance_print_symbols): Ditto.
	* symfile.c (symbol_file_command): Ditto.
	* stabsread.c (define_symbol, read_type): Ditto.
	(cleanup_undefined_types, scan_file_globals): Ditto.
	* solib.c (solib_map_sections): Ditto.
	* solib-svr4.c (bfd_lookup_symbol): Ditto.
	* rs6000-tdep.c (skip_prologue): Ditto.
	* p-valprint.c (pascal_value_print): Ditto.
	(pascal_object_is_vtbl_ptr_type): Ditto.
	* objfiles.c (in_plt_section): Ditto.
	* minsyms.c (lookup_minimal_symbol): Ditto.
	(compact_minimal_symbols): Ditto.
	(find_solib_trampoline_target): Ditto.
	* mdebugread.c (parse_type): Ditto.
	* language.c (set_language_command): Ditto.
	(set_type_command, set_range_command): Ditto.
	* f-lang.c (add_common_block): Ditto.
	(add_common_block): Ditto.
	(find_first_common_named): Ditto.
	(patch_all_commons_by_name): Ditto.
	* elfread.c (elf_locate_sections): Ditto.
	(elf_locate_sections): Ditto.
	(elfstab_offset_sections): Ditto.
	* dwarf2read.c (dwarf2_locate_sections): Ditto.
	* dbxread.c (add_old_header_file): Ditto.
	(find_corresponding_bincl_psymtab): Ditto.
	(read_dbx_symtab, process_one_symbol): Ditto.
	* coffread.c (patch_opaque_types): Ditto.
	* cli/cli-decode.c (delete_cmd): Ditto.
	* cli/cli-cmds.c (pwd_command, list_command): Ditto.
	* c-typeprint.c (c_type_print_base): Ditto.
	* breakpoint.c (bpstat_stop_status): Ditto.
	(clear_command, breakpoint_re_set_one): Ditto.
This commit is contained in:
Andrew Cagney 2003-11-08 00:13:03 +00:00
parent fe62ef869f
commit 6314a34934
24 changed files with 123 additions and 79 deletions

View File

@ -1,3 +1,44 @@
2003-11-07 Andrew Cagney <cagney@redhat.com>
* top.c (print_gdb_version): Replace STREQ with strcmp.
* valops.c (value_struct_elt_for_reference): Ditto.
(value_struct_elt_for_reference): Ditto.
* symtab.c (gdb_mangle_name): Ditto.
(find_line_symtab): Ditto.
* symmisc.c (maintenance_print_symbols): Ditto.
* symfile.c (symbol_file_command): Ditto.
* stabsread.c (define_symbol, read_type): Ditto.
(cleanup_undefined_types, scan_file_globals): Ditto.
* solib.c (solib_map_sections): Ditto.
* solib-svr4.c (bfd_lookup_symbol): Ditto.
* rs6000-tdep.c (skip_prologue): Ditto.
* p-valprint.c (pascal_value_print): Ditto.
(pascal_object_is_vtbl_ptr_type): Ditto.
* objfiles.c (in_plt_section): Ditto.
* minsyms.c (lookup_minimal_symbol): Ditto.
(compact_minimal_symbols): Ditto.
(find_solib_trampoline_target): Ditto.
* mdebugread.c (parse_type): Ditto.
* language.c (set_language_command): Ditto.
(set_type_command, set_range_command): Ditto.
* f-lang.c (add_common_block): Ditto.
(add_common_block): Ditto.
(find_first_common_named): Ditto.
(patch_all_commons_by_name): Ditto.
* elfread.c (elf_locate_sections): Ditto.
(elf_locate_sections): Ditto.
(elfstab_offset_sections): Ditto.
* dwarf2read.c (dwarf2_locate_sections): Ditto.
* dbxread.c (add_old_header_file): Ditto.
(find_corresponding_bincl_psymtab): Ditto.
(read_dbx_symtab, process_one_symbol): Ditto.
* coffread.c (patch_opaque_types): Ditto.
* cli/cli-decode.c (delete_cmd): Ditto.
* cli/cli-cmds.c (pwd_command, list_command): Ditto.
* c-typeprint.c (c_type_print_base): Ditto.
* breakpoint.c (bpstat_stop_status): Ditto.
(clear_command, breakpoint_re_set_one): Ditto.
2003-11-07 Andrew Cagney <cagney@redhat.com>
* bcache.h: Update copyright. Add comments on bcache VS hashtab.

View File

@ -2837,8 +2837,8 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
bs->print = 0;
bs->commands = b->commands;
if (bs->commands &&
(STREQ ("silent", bs->commands->line) ||
(xdb_commands && STREQ ("Q", bs->commands->line))))
(strcmp ("silent", bs->commands->line) == 0
|| (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
{
bs->commands = bs->commands->next;
bs->print = 0;
@ -6591,7 +6591,7 @@ clear_command (char *arg, int from_tty)
|| ((default_match || (0 == sal.pc))
&& b->source_file != NULL
&& sal.symtab != NULL
&& STREQ (b->source_file, sal.symtab->filename)
&& strcmp (b->source_file, sal.symtab->filename) == 0
&& b->line_number == sal.line)))
/* Yes, if sal source file and line matches b. */
{
@ -6992,7 +6992,7 @@ breakpoint_re_set_one (void *bint)
the source file name or the line number changes... */
|| (b->source_file != NULL
&& sals.sals[i].symtab != NULL
&& (!STREQ (b->source_file, sals.sals[i].symtab->filename)
&& (strcmp (b->source_file, sals.sals[i].symtab->filename) != 0
|| b->line_number != sals.sals[i].line)
)
/* ...or we switch between having a source file and not having

View File

@ -945,7 +945,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
int j, len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
char *name = type_name_no_tag (type);
int is_constructor = name && STREQ (method_name, name);
int is_constructor = name && strcmp (method_name, name) == 0;
for (j = 0; j < len2; j++)
{
char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);

View File

@ -297,7 +297,7 @@ pwd_command (char *args, int from_tty)
error ("The \"pwd\" command does not take an argument: %s", args);
getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
if (!STREQ (gdb_dirbuf, current_directory))
if (strcmp (gdb_dirbuf, current_directory) != 0)
printf_unfiltered ("Working directory %s\n (canonically %s).\n",
current_directory, gdb_dirbuf);
else
@ -651,7 +651,7 @@ list_command (char *arg, int from_tty)
/* "l" or "l +" lists next ten lines. */
if (arg == 0 || STREQ (arg, "+"))
if (arg == 0 || strcmp (arg, "+") == 0)
{
print_source_lines (cursal.symtab, cursal.line,
cursal.line + get_lines_to_list (), 0);
@ -659,7 +659,7 @@ list_command (char *arg, int from_tty)
}
/* "l -" lists previous ten lines, the ones before the ten just listed. */
if (STREQ (arg, "-"))
if (strcmp (arg, "-") == 0)
{
print_source_lines (cursal.symtab,
max (get_first_line_listed () - get_lines_to_list (), 1),

View File

@ -503,7 +503,7 @@ delete_cmd (char *name, struct cmd_list_element **list)
struct cmd_list_element *c;
struct cmd_list_element *p;
while (*list && STREQ ((*list)->name, name))
while (*list && strcmp ((*list)->name, name) == 0)
{
if ((*list)->hookee_pre)
(*list)->hookee_pre->hook_pre = 0; /* Hook slips out of its mouth */
@ -517,7 +517,7 @@ delete_cmd (char *name, struct cmd_list_element **list)
if (*list)
for (c = *list; c->next;)
{
if (STREQ (c->next->name, name))
if (strcmp (c->next->name, name) == 0)
{
if (c->next->hookee_pre)
c->next->hookee_pre->hook_pre = 0; /* hooked cmd gets away. */

View File

@ -1430,7 +1430,7 @@ patch_opaque_types (struct symtab *s)
for (sym = opaque_type_chain[hash]; sym;)
{
if (name[0] == DEPRECATED_SYMBOL_NAME (sym)[0] &&
STREQ (name + 1, DEPRECATED_SYMBOL_NAME (sym) + 1))
strcmp (name + 1, DEPRECATED_SYMBOL_NAME (sym) + 1) == 0)
{
if (prev)
{

View File

@ -352,7 +352,7 @@ add_old_header_file (char *name, int instance)
int i;
for (i = 0; i < N_HEADER_FILES (current_objfile); i++)
if (STREQ (p[i].name, name) && instance == p[i].instance)
if (strcmp (p[i].name, name) == 0 && instance == p[i].instance)
{
add_this_object_header_file (i);
return;
@ -935,7 +935,7 @@ find_corresponding_bincl_psymtab (char *name, int instance)
for (bincl = bincl_list; bincl < next_bincl; bincl++)
if (bincl->instance == instance
&& STREQ (name, bincl->name))
&& strcmp (name, bincl->name) == 0)
return bincl->pst;
repeated_header_complaint (name, symnum);
@ -1607,12 +1607,12 @@ read_dbx_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 && strcmp (namestring, pst->filename) == 0)
continue;
{
int i;
for (i = 0; i < includes_used; i++)
if (STREQ (namestring, psymtab_include_list[i]))
if (strcmp (namestring, psymtab_include_list[i]) == 0)
{
i = -1;
break;
@ -3229,7 +3229,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
case N_OPT: /* Solaris 2: Compiler options */
if (name)
{
if (STREQ (name, GCC2_COMPILED_FLAG_SYMBOL))
if (strcmp (name, GCC2_COMPILED_FLAG_SYMBOL) == 0)
{
processing_gcc_compilation = 2;
#if 0 /* Works, but is experimental. -fnf */

View File

@ -997,61 +997,61 @@ dwarf2_has_info (bfd *abfd)
static void
dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
{
if (STREQ (sectp->name, INFO_SECTION))
if (strcmp (sectp->name, INFO_SECTION) == 0)
{
dwarf_info_offset = sectp->filepos;
dwarf_info_size = bfd_get_section_size_before_reloc (sectp);
dwarf_info_section = sectp;
}
else if (STREQ (sectp->name, ABBREV_SECTION))
else if (strcmp (sectp->name, ABBREV_SECTION) == 0)
{
dwarf_abbrev_offset = sectp->filepos;
dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp);
dwarf_abbrev_section = sectp;
}
else if (STREQ (sectp->name, LINE_SECTION))
else if (strcmp (sectp->name, LINE_SECTION) == 0)
{
dwarf_line_offset = sectp->filepos;
dwarf_line_size = bfd_get_section_size_before_reloc (sectp);
dwarf_line_section = sectp;
}
else if (STREQ (sectp->name, PUBNAMES_SECTION))
else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0)
{
dwarf_pubnames_offset = sectp->filepos;
dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp);
dwarf_pubnames_section = sectp;
}
else if (STREQ (sectp->name, ARANGES_SECTION))
else if (strcmp (sectp->name, ARANGES_SECTION) == 0)
{
dwarf_aranges_offset = sectp->filepos;
dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp);
dwarf_aranges_section = sectp;
}
else if (STREQ (sectp->name, LOC_SECTION))
else if (strcmp (sectp->name, LOC_SECTION) == 0)
{
dwarf_loc_offset = sectp->filepos;
dwarf_loc_size = bfd_get_section_size_before_reloc (sectp);
dwarf_loc_section = sectp;
}
else if (STREQ (sectp->name, MACINFO_SECTION))
else if (strcmp (sectp->name, MACINFO_SECTION) == 0)
{
dwarf_macinfo_offset = sectp->filepos;
dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp);
dwarf_macinfo_section = sectp;
}
else if (STREQ (sectp->name, STR_SECTION))
else if (strcmp (sectp->name, STR_SECTION) == 0)
{
dwarf_str_offset = sectp->filepos;
dwarf_str_size = bfd_get_section_size_before_reloc (sectp);
dwarf_str_section = sectp;
}
else if (STREQ (sectp->name, FRAME_SECTION))
else if (strcmp (sectp->name, FRAME_SECTION) == 0)
{
dwarf_frame_offset = sectp->filepos;
dwarf_frame_size = bfd_get_section_size_before_reloc (sectp);
dwarf_frame_section = sectp;
}
else if (STREQ (sectp->name, EH_FRAME_SECTION))
else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0)
{
flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
if (aflag & SEC_HAS_CONTENTS)
@ -1061,7 +1061,7 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
dwarf_eh_frame_section = sectp;
}
}
else if (STREQ (sectp->name, RANGES_SECTION))
else if (strcmp (sectp->name, RANGES_SECTION) == 0)
{
dwarf_ranges_offset = sectp->filepos;
dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp);

View File

@ -80,25 +80,25 @@ elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip)
struct elfinfo *ei;
ei = (struct elfinfo *) eip;
if (STREQ (sectp->name, ".debug"))
if (strcmp (sectp->name, ".debug") == 0)
{
ei->dboffset = sectp->filepos;
ei->dbsize = bfd_get_section_size_before_reloc (sectp);
}
else if (STREQ (sectp->name, ".line"))
else if (strcmp (sectp->name, ".line") == 0)
{
ei->lnoffset = sectp->filepos;
ei->lnsize = bfd_get_section_size_before_reloc (sectp);
}
else if (STREQ (sectp->name, ".stab"))
else if (strcmp (sectp->name, ".stab") == 0)
{
ei->stabsect = sectp;
}
else if (STREQ (sectp->name, ".stab.index"))
else if (strcmp (sectp->name, ".stab.index") == 0)
{
ei->stabindexsect = sectp;
}
else if (STREQ (sectp->name, ".mdebug"))
else if (strcmp (sectp->name, ".mdebug") == 0)
{
ei->mdebugsect = sectp;
}
@ -690,7 +690,7 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
for (; maybe; maybe = maybe->next)
{
if (filename[0] == maybe->filename[0]
&& STREQ (filename, maybe->filename))
&& strcmp (filename, maybe->filename) == 0)
{
/* We found a match. But there might be several source files
(from different directories) with the same name. */

View File

@ -673,8 +673,8 @@ add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
parser have fits. */
if (STREQ (name, BLANK_COMMON_NAME_ORIGINAL) ||
STREQ (name, BLANK_COMMON_NAME_MF77))
if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
|| strcmp (name, BLANK_COMMON_NAME_MF77) == 0)
{
xfree (name);
@ -777,7 +777,7 @@ find_first_common_named (char *name)
while (tmp != NULL)
{
if (STREQ (tmp->name, name))
if (strcmp (tmp->name, name) == 0)
return (tmp);
else
tmp = tmp->next;
@ -848,8 +848,8 @@ patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
/* For blank common blocks, change the canonical reprsentation
of a blank name */
if ((STREQ (name, BLANK_COMMON_NAME_ORIGINAL)) ||
(STREQ (name, BLANK_COMMON_NAME_MF77)))
if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
|| strcmp (name, BLANK_COMMON_NAME_MF77) == 0)
{
xfree (name);
name = alloca (strlen (BLANK_COMMON_NAME_LOCAL) + 1);
@ -861,7 +861,7 @@ patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
while (tmp != NULL)
{
if (COMMON_NEEDS_PATCHING (tmp))
if (STREQ (tmp->name, name))
if (strcmp (tmp->name, name) == 0)
patch_common_entries (tmp, offset, secnum);
tmp = tmp->next;

View File

@ -205,7 +205,7 @@ set_language_command (char *ignore, int from_tty)
/* Search the list of languages for a match. */
for (i = 0; i < languages_size; i++)
{
if (STREQ (languages[i]->la_name, language))
if (strcmp (languages[i]->la_name, language) == 0)
{
/* Found it! Go into manual mode, and use this language. */
if (languages[i]->la_language == language_auto)
@ -253,22 +253,22 @@ show_type_command (char *ignore, int from_tty)
static void
set_type_command (char *ignore, int from_tty)
{
if (STREQ (type, "on"))
if (strcmp (type, "on") == 0)
{
type_check = type_check_on;
type_mode = type_mode_manual;
}
else if (STREQ (type, "warn"))
else if (strcmp (type, "warn") == 0)
{
type_check = type_check_warn;
type_mode = type_mode_manual;
}
else if (STREQ (type, "off"))
else if (strcmp (type, "off") == 0)
{
type_check = type_check_off;
type_mode = type_mode_manual;
}
else if (STREQ (type, "auto"))
else if (strcmp (type, "auto") == 0)
{
type_mode = type_mode_auto;
set_type_range_case ();
@ -299,22 +299,22 @@ show_range_command (char *ignore, int from_tty)
static void
set_range_command (char *ignore, int from_tty)
{
if (STREQ (range, "on"))
if (strcmp (range, "on") == 0)
{
range_check = range_check_on;
range_mode = range_mode_manual;
}
else if (STREQ (range, "warn"))
else if (strcmp (range, "warn") == 0)
{
range_check = range_check_warn;
range_mode = range_mode_manual;
}
else if (STREQ (range, "off"))
else if (strcmp (range, "off") == 0)
{
range_check = range_check_off;
range_mode = range_mode_manual;
}
else if (STREQ (range, "auto"))
else if (strcmp (range, "auto") == 0)
{
range_mode = range_mode_auto;
set_type_range_case ();

View File

@ -1632,7 +1632,7 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
if (name[0] == '.' || name[0] == '\0')
TYPE_TAG_NAME (tp) = NULL;
else if (TYPE_TAG_NAME (tp) == NULL
|| !STREQ (TYPE_TAG_NAME (tp), name))
|| strcmp (TYPE_TAG_NAME (tp), name) != 0)
TYPE_TAG_NAME (tp) = obsavestring (name, strlen (name),
&current_objfile->type_obstack);
}

View File

@ -205,7 +205,8 @@ lookup_minimal_symbol (const char *name, const char *sfile,
case mst_file_data:
case mst_file_bss:
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (sfile == NULL || STREQ (msymbol->filename, sfile))
if (sfile == NULL
|| strcmp (msymbol->filename, sfile) == 0)
found_file_symbol = msymbol;
#else
/* We have neither the ability nor the need to
@ -737,10 +738,10 @@ compact_minimal_symbols (struct minimal_symbol *msymbol, int mcount,
copyfrom = copyto = msymbol;
while (copyfrom < msymbol + mcount - 1)
{
if (SYMBOL_VALUE_ADDRESS (copyfrom) ==
SYMBOL_VALUE_ADDRESS ((copyfrom + 1)) &&
(STREQ (SYMBOL_LINKAGE_NAME (copyfrom),
SYMBOL_LINKAGE_NAME ((copyfrom + 1)))))
if (SYMBOL_VALUE_ADDRESS (copyfrom)
== SYMBOL_VALUE_ADDRESS ((copyfrom + 1))
&& strcmp (SYMBOL_LINKAGE_NAME (copyfrom),
SYMBOL_LINKAGE_NAME ((copyfrom + 1))) == 0)
{
if (MSYMBOL_TYPE ((copyfrom + 1)) == mst_unknown)
{
@ -975,8 +976,8 @@ find_solib_trampoline_target (CORE_ADDR pc)
ALL_MSYMBOLS (objfile, msymbol)
{
if (MSYMBOL_TYPE (msymbol) == mst_text
&& STREQ (SYMBOL_LINKAGE_NAME (msymbol),
SYMBOL_LINKAGE_NAME (tsymbol)))
&& strcmp (SYMBOL_LINKAGE_NAME (msymbol),
SYMBOL_LINKAGE_NAME (tsymbol)) == 0)
return SYMBOL_VALUE_ADDRESS (msymbol);
}
}

View File

@ -1087,7 +1087,7 @@ in_plt_section (CORE_ADDR pc, char *name)
retval = (s != NULL
&& s->the_bfd_section->name != NULL
&& STREQ (s->the_bfd_section->name, ".plt"));
&& strcmp (s->the_bfd_section->name, ".plt") == 0);
return (retval);
}

View File

@ -553,8 +553,8 @@ pascal_value_print (struct value *val, struct ui_file *stream, int format,
type is indicated by the quoted string anyway. */
if (TYPE_CODE (type) == TYPE_CODE_PTR &&
TYPE_NAME (type) == NULL &&
TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL &&
STREQ (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char"))
TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL
&& strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char") == 0)
{
/* Print nothing */
}
@ -694,7 +694,7 @@ pascal_object_is_vtbl_ptr_type (struct type *type)
char *typename = type_name_no_tag (type);
return (typename != NULL
&& (STREQ (typename, pascal_vtbl_ptr_name)));
&& strcmp (typename, pascal_vtbl_ptr_name) == 0);
}
/* Return truth value for the assertion that TYPE is of the type

View File

@ -985,7 +985,8 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
initializer function as well. */
tmp = find_pc_misc_function (pc);
if (tmp >= 0 && STREQ (misc_function_vector[tmp].name, main_name ()))
if (tmp >= 0
&& strcmp (misc_function_vector[tmp].name, main_name ()) == 0)
return pc + 8;
}
}

View File

@ -228,7 +228,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
for (i = 0; i < number_of_symbols; i++)
{
sym = *symbol_table++;
if (STREQ (sym->name, symname)
if (strcmp (sym->name, symname) == 0
&& (sym->section->flags & sect_flags) == sect_flags)
{
/* Bfd symbols are section relative. */
@ -257,7 +257,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
{
sym = *symbol_table++;
if (STREQ (sym->name, symname)
if (strcmp (sym->name, symname) == 0
&& (sym->section->flags & sect_flags) == sect_flags)
{
/* Bfd symbols are section relative. */

View File

@ -275,7 +275,7 @@ solib_map_sections (void *arg)
object's file by the base address to which the object was actually
mapped. */
TARGET_SO_RELOCATE_SECTION_ADDRESSES (so, p);
if (STREQ (p->the_bfd_section->name, ".text"))
if (strcmp (p->the_bfd_section->name, ".text") == 0)
{
so->textsection = p;
}

View File

@ -1128,7 +1128,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];
if ((SYMBOL_CLASS (prev_sym) == LOC_REF_ARG
|| SYMBOL_CLASS (prev_sym) == LOC_ARG)
&& STREQ (DEPRECATED_SYMBOL_NAME (prev_sym), DEPRECATED_SYMBOL_NAME (sym)))
&& strcmp (DEPRECATED_SYMBOL_NAME (prev_sym),
DEPRECATED_SYMBOL_NAME (sym)) == 0)
{
SYMBOL_CLASS (prev_sym) = LOC_REGPARM;
/* Use the type from the LOC_REGISTER; that is the type
@ -1575,7 +1576,7 @@ again:
if (SYMBOL_CLASS (sym) == LOC_TYPEDEF
&& SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
&& (TYPE_CODE (SYMBOL_TYPE (sym)) == code)
&& STREQ (DEPRECATED_SYMBOL_NAME (sym), type_name))
&& strcmp (DEPRECATED_SYMBOL_NAME (sym), type_name) == 0)
{
obstack_free (&objfile->type_obstack, type_name);
type = SYMBOL_TYPE (sym);
@ -4207,7 +4208,7 @@ cleanup_undefined_types (void)
&& SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
&& (TYPE_CODE (SYMBOL_TYPE (sym)) ==
TYPE_CODE (*type))
&& STREQ (DEPRECATED_SYMBOL_NAME (sym), typename))
&& strcmp (DEPRECATED_SYMBOL_NAME (sym), typename) == 0)
replace_type (*type, SYMBOL_TYPE (sym));
}
}
@ -4289,7 +4290,7 @@ scan_file_globals (struct objfile *objfile)
for (sym = global_sym_chain[hash]; sym;)
{
if (DEPRECATED_SYMBOL_NAME (msymbol)[0] == DEPRECATED_SYMBOL_NAME (sym)[0] &&
STREQ (DEPRECATED_SYMBOL_NAME (msymbol) + 1, DEPRECATED_SYMBOL_NAME (sym) + 1))
strcmp (DEPRECATED_SYMBOL_NAME (msymbol) + 1, DEPRECATED_SYMBOL_NAME (sym) + 1) == 0)
{
/* Splice this symbol out of the hash chain and
assign the value we have to it. */

View File

@ -1223,7 +1223,7 @@ symbol_file_command (char *args, int from_tty)
cleanups = make_cleanup_freeargv (argv);
while (*argv != NULL)
{
if (STREQ (*argv, "-mapped"))
if (strcmp (*argv, "-mapped") == 0)
flags |= OBJF_MAPPED;
else
if (STREQ (*argv, "-readnow"))
@ -2539,7 +2539,7 @@ free_named_symtabs (char *name)
again2:
for (ps = partial_symtab_list; ps; ps = ps->next)
{
if (STREQ (name, ps->filename))
if (strcmp (name, ps->filename) == 0)
{
cashier_psymtab (ps); /* Blow it away...and its little dog, too. */
goto again2; /* Must restart, chain has been munged */
@ -2550,7 +2550,7 @@ again2:
for (s = symtab_list; s; s = s->next)
{
if (STREQ (name, s->filename))
if (strcmp (name, s->filename) == 0)
break;
prev = s;
}

View File

@ -579,7 +579,7 @@ Arguments missing: an output file name and an optional symbol file name");
immediate_quit++;
ALL_SYMTABS (objfile, s)
if (symname == NULL || (STREQ (symname, s->filename)))
if (symname == NULL || strcmp (symname, s->filename) == 0)
dump_symtab (objfile, s, outfile);
immediate_quit--;
do_cleanups (cleanups);
@ -818,7 +818,7 @@ maintenance_print_psymbols (char *args, int from_tty)
immediate_quit++;
ALL_PSYMTABS (objfile, ps)
if (symname == NULL || (STREQ (symname, ps->filename)))
if (symname == NULL || strcmp (symname, ps->filename) == 0)
dump_psymtab (objfile, ps, outfile);
immediate_quit--;
do_cleanups (cleanups);
@ -965,7 +965,7 @@ maintenance_print_msymbols (char *args, int from_tty)
immediate_quit++;
ALL_OBJFILES (objfile)
if (symname == NULL || (STREQ (symname, objfile->name)))
if (symname == NULL || strcmp (symname, objfile->name) == 0)
dump_msymbols (objfile, outfile);
immediate_quit--;
fprintf_filtered (outfile, "\n\n");

View File

@ -343,7 +343,7 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
is_full_physname_constructor = is_constructor_name (physname);
is_constructor =
is_full_physname_constructor || (newname && STREQ (field_name, newname));
is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0);
if (!is_destructor)
is_destructor = (strncmp (physname, "__dt", 4) == 0);
@ -2125,7 +2125,7 @@ find_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match)
struct linetable *l;
int ind;
if (!STREQ (symtab->filename, s->filename))
if (strcmp (symtab->filename, s->filename) != 0)
continue;
l = LINETABLE (s);
ind = find_line_common (l, line, &exact);

View File

@ -1375,7 +1375,7 @@ There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
/* After the required info we print the configuration information. */
fprintf_filtered (stream, "This GDB was configured as \"");
if (!STREQ (host_name, target_name))
if (strcmp (host_name, target_name) != 0)
{
fprintf_filtered (stream, "--host=%s --target=%s", host_name, target_name);
}

View File

@ -2267,7 +2267,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
{
char *t_field_name = TYPE_FIELD_NAME (t, i);
if (t_field_name && STREQ (t_field_name, name))
if (t_field_name && strcmp (t_field_name, name) == 0)
{
if (TYPE_FIELD_STATIC (t, i))
{
@ -2314,7 +2314,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
else if (cplus_demangle_opname (t_field_name, dem_opname, 0))
t_field_name = dem_opname;
}
if (t_field_name && STREQ (t_field_name, name))
if (t_field_name && strcmp (t_field_name, name) == 0)
{
int j = TYPE_FN_FIELDLIST_LENGTH (t, i);
struct fn_field *f = TYPE_FN_FIELDLIST1 (t, i);