* dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c: Lint. * breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c, findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c, putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c, values.c: Replace bcopy() use with memcpy(), which is more standard and can take advantage of gcc's builtin functions for increased performance. * breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c, ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h, target.c, values.c: Replace bzero() use with memset(), which is more standard and can take advantage of gcc's builtin functions for increased performance. * i386-tdep.c, main.c, valprint.c: Replace bcmp() use with memcmp(), which is more standard and can take advantage of gcc's builtin functions for increased performance.
This commit is contained in:
parent
22fd4704bc
commit
51b57ded88
44 changed files with 837 additions and 373 deletions
|
@ -175,8 +175,10 @@ typedef struct string /* Beware: these aren't required to be */
|
|||
static char *
|
||||
mop_up PARAMS ((string *, struct work_stuff *, int));
|
||||
|
||||
#if 0
|
||||
static int
|
||||
demangle_method_args PARAMS ((string *, const char **, struct work_stuff *));
|
||||
#endif
|
||||
|
||||
static int
|
||||
demangle_template PARAMS ((string *declp, const char **, struct work_stuff *));
|
||||
|
@ -211,8 +213,10 @@ string_init PARAMS ((string *));
|
|||
static void
|
||||
string_clear PARAMS ((string *));
|
||||
|
||||
#if 0
|
||||
static int
|
||||
string_empty PARAMS ((string *));
|
||||
#endif
|
||||
|
||||
static void
|
||||
string_append PARAMS ((string *, const char *));
|
||||
|
@ -335,7 +339,6 @@ cplus_demangle (mangled, options)
|
|||
string decl;
|
||||
int success = 0;
|
||||
struct work_stuff work[1];
|
||||
const char *p;
|
||||
char *demangled = NULL;
|
||||
|
||||
if ((mangled != NULL) && (*mangled != '\0'))
|
||||
|
@ -582,7 +585,6 @@ demangle_template (declp, mangled, work)
|
|||
struct work_stuff *work;
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
string tname;
|
||||
string trawname;
|
||||
int is_pointer;
|
||||
|
@ -662,8 +664,8 @@ demangle_template (declp, mangled, work)
|
|||
{
|
||||
case 'P':
|
||||
case 'R':
|
||||
done = is_pointer = 1;
|
||||
break;
|
||||
done = is_pointer = 1;
|
||||
break;
|
||||
case 'C': /* const */
|
||||
case 'S': /* explicitly signed [char] */
|
||||
case 'U': /* unsigned */
|
||||
|
@ -671,29 +673,29 @@ demangle_template (declp, mangled, work)
|
|||
case 'F': /* function */
|
||||
case 'M': /* member function */
|
||||
case 'O': /* ??? */
|
||||
old_p++;
|
||||
continue;
|
||||
old_p++;
|
||||
continue;
|
||||
case 'Q': /* repetition of following */
|
||||
case 'T': /* remembered type */
|
||||
abort ();
|
||||
break;
|
||||
abort ();
|
||||
break;
|
||||
case 'v': /* void */
|
||||
abort ();
|
||||
break;
|
||||
abort ();
|
||||
break;
|
||||
case 'x': /* long long */
|
||||
case 'l': /* long */
|
||||
case 'i': /* int */
|
||||
case 's': /* short */
|
||||
case 'c': /* char */
|
||||
done = is_integral = 1;
|
||||
break;
|
||||
done = is_integral = 1;
|
||||
break;
|
||||
case 'r': /* long double */
|
||||
case 'd': /* double */
|
||||
case 'f': /* float */
|
||||
done = is_real = 1;
|
||||
break;
|
||||
done = is_real = 1;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
if (is_integral)
|
||||
|
@ -786,6 +788,7 @@ demangle_template (declp, mangled, work)
|
|||
success = demangle_args (declp, mangled, work);
|
||||
}
|
||||
}
|
||||
return (success);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1839,6 +1842,8 @@ string_clear (s)
|
|||
s->p = s->b;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
static int
|
||||
string_empty (s)
|
||||
string *s;
|
||||
|
@ -1846,6 +1851,8 @@ string_empty (s)
|
|||
return (s->b == s->p);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
string_append (p, s)
|
||||
string *p;
|
||||
|
@ -1901,6 +1908,7 @@ string_prepend (p, s)
|
|||
}
|
||||
|
||||
#if 0
|
||||
|
||||
static void
|
||||
string_prepends (p, s)
|
||||
string *p, *s;
|
||||
|
@ -1910,6 +1918,7 @@ string_prepends (p, s)
|
|||
string_prependn (p, s->b, s->p - s->b);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue