mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
* environ.c (unset_in_environ): Use strncmp instead of
DEPRECATED_STREQN. * exec.c (exec_file_attach): Remove DEPRECATED_HPUX_TEXT_END. * language.c (set_case_command, language_enum): Use strcmp instead of DEPRECATED_STREQ. * source.c (select_source_symtab): Sprinkle a few consts. Use strcmp instead of DEPRECATED_STREQ.
This commit is contained in:
parent
f44569944a
commit
591e78ffc0
@ -1,5 +1,13 @@
|
||||
2005-08-29 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* environ.c (unset_in_environ): Use strncmp instead of
|
||||
DEPRECATED_STREQN.
|
||||
* exec.c (exec_file_attach): Remove DEPRECATED_HPUX_TEXT_END.
|
||||
* language.c (set_case_command, language_enum): Use strcmp instead
|
||||
of DEPRECATED_STREQ.
|
||||
* source.c (select_source_symtab): Sprinkle a few consts. Use
|
||||
strcmp instead of DEPRECATED_STREQ.
|
||||
|
||||
* solib-svr4.c (svr4_current_sos, svr4_fetch_objfile_link_map):
|
||||
Use XZALLOC and xzalloc instead of xmalloc where appropriate.
|
||||
|
||||
|
@ -170,7 +170,7 @@ unset_in_environ (struct gdb_environ *e, char *var)
|
||||
|
||||
for (; (s = *vector) != NULL; vector++)
|
||||
{
|
||||
if (DEPRECATED_STREQN (s, var, len) && s[len] == '=')
|
||||
if (strncmp (s, var, len) == 0 && s[len] == '=')
|
||||
{
|
||||
xfree (s);
|
||||
/* Walk through the vector, shuffling args down by one, including
|
||||
|
@ -264,10 +264,6 @@ exec_file_attach (char *filename, int from_tty)
|
||||
scratch_pathname, bfd_errmsg (bfd_get_error ()));
|
||||
}
|
||||
|
||||
#ifdef DEPRECATED_HPUX_TEXT_END
|
||||
DEPRECATED_HPUX_TEXT_END (&exec_ops);
|
||||
#endif
|
||||
|
||||
validate_files ();
|
||||
|
||||
set_gdbarch_from_file (exec_bfd);
|
||||
|
@ -324,32 +324,34 @@ show_case_command (struct ui_file *file, int from_tty,
|
||||
"Warning: the current case sensitivity setting does not match the language.\n");
|
||||
}
|
||||
|
||||
/* Set command. Change the setting for case sensitivity. */
|
||||
/* Set command. Change the setting for case sensitivity. */
|
||||
|
||||
static void
|
||||
set_case_command (char *ignore, int from_tty, struct cmd_list_element *c)
|
||||
{
|
||||
if (DEPRECATED_STREQ (case_sensitive, "on"))
|
||||
{
|
||||
case_sensitivity = case_sensitive_on;
|
||||
case_mode = case_mode_manual;
|
||||
}
|
||||
else if (DEPRECATED_STREQ (case_sensitive, "off"))
|
||||
{
|
||||
case_sensitivity = case_sensitive_off;
|
||||
case_mode = case_mode_manual;
|
||||
}
|
||||
else if (DEPRECATED_STREQ (case_sensitive, "auto"))
|
||||
{
|
||||
case_mode = case_mode_auto;
|
||||
set_type_range_case ();
|
||||
/* Avoid hitting the set_case_str call below. We
|
||||
did it in set_type_range_case. */
|
||||
return;
|
||||
}
|
||||
if (strcmp (case_sensitive, "on") == 0)
|
||||
{
|
||||
case_sensitivity = case_sensitive_on;
|
||||
case_mode = case_mode_manual;
|
||||
}
|
||||
else if (strcmp (case_sensitive, "off") == 0)
|
||||
{
|
||||
case_sensitivity = case_sensitive_off;
|
||||
case_mode = case_mode_manual;
|
||||
}
|
||||
else if (strcmp (case_sensitive, "auto") == 0)
|
||||
{
|
||||
case_mode = case_mode_auto;
|
||||
set_type_range_case ();
|
||||
/* Avoid hitting the set_case_str call below. We did it in
|
||||
set_type_range_case. */
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
warning (_("Unrecognized case-sensitive setting: \"%s\""), case_sensitive);
|
||||
}
|
||||
{
|
||||
warning (_("Unrecognized case-sensitive setting: \"%s\""),
|
||||
case_sensitive);
|
||||
}
|
||||
set_case_str();
|
||||
show_case_command (NULL, from_tty, NULL, NULL);
|
||||
}
|
||||
@ -918,7 +920,7 @@ language_enum (char *str)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < languages_size; i++)
|
||||
if (DEPRECATED_STREQ (languages[i]->la_name, str))
|
||||
if (strcmp (languages[i]->la_name, str) == 0)
|
||||
return languages[i]->la_language;
|
||||
|
||||
return language_unknown;
|
||||
|
16
gdb/source.c
16
gdb/source.c
@ -251,12 +251,10 @@ select_source_symtab (struct symtab *s)
|
||||
{
|
||||
for (s = ofp->symtabs; s; s = s->next)
|
||||
{
|
||||
char *name = s->filename;
|
||||
const char *name = s->filename;
|
||||
int len = strlen (name);
|
||||
if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h"))))
|
||||
{
|
||||
current_source_symtab = s;
|
||||
}
|
||||
if (!(len > 2 && strcmp(&name[len - 2], ".h") == 0))
|
||||
current_source_symtab = s;
|
||||
}
|
||||
}
|
||||
if (current_source_symtab)
|
||||
@ -268,12 +266,10 @@ select_source_symtab (struct symtab *s)
|
||||
{
|
||||
for (ps = ofp->psymtabs; ps != NULL; ps = ps->next)
|
||||
{
|
||||
char *name = ps->filename;
|
||||
const char *name = ps->filename;
|
||||
int len = strlen (name);
|
||||
if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h"))))
|
||||
{
|
||||
cs_pst = ps;
|
||||
}
|
||||
if (!(len > 2 && strcmp (&name[len - 2], ".h") == 0))
|
||||
cs_pst = ps;
|
||||
}
|
||||
}
|
||||
if (cs_pst)
|
||||
|
Loading…
Reference in New Issue
Block a user