* buildsym.c (scan_file_globals): Beware the null file.
Fix from Jim Williams. * stack.c (return_command): Evaluate expression *before* popping off the stack frames! Fix inspired by Jim Williams. (up_silently_command, down_silently_command): No sel frame is error. * defs.h (memcpy, memset): Conditionalize decls on #ifndef MEM_FNS_DECLARED, since DECstation differs. (alloca): Break out the STDC and non-STDC alloca cases, to make it work on old preprocessors as well as "picky ANSI" ones. * xm-mips.h (memcpy, memset): Declare, and set MEM_FNS_DECLARED. * mips-tdep.c (heuristic_proc_start): Zero arg produces zero. * utils.c (fputs_demangled): Rename SLOP since DECstation system header files define it!
This commit is contained in:
parent
c47793da96
commit
0f552c5fc6
7 changed files with 102 additions and 65 deletions
|
@ -1098,7 +1098,7 @@ fputs_demangled (linebuffer, stream, arg_mode)
|
|||
&& (isalnum(c) || (c) == '_' || (c) == CPLUS_MARKER))
|
||||
|
||||
char buf[SYMBOL_MAX+1];
|
||||
# define SLOP 5 /* How much room to leave in buf */
|
||||
# define DMSLOP 5 /* How much room to leave in buf */
|
||||
char *p;
|
||||
|
||||
if (linebuffer == NULL)
|
||||
|
@ -1116,7 +1116,7 @@ fputs_demangled (linebuffer, stream, arg_mode)
|
|||
int i = 0;
|
||||
|
||||
/* collect non-interesting characters into buf */
|
||||
while ( *p != (char) 0 && !SYMBOL_CHAR(*p) && i < (int)sizeof(buf)-SLOP ) {
|
||||
while (*p != (char) 0 && !SYMBOL_CHAR(*p) && i < (int)sizeof(buf)-DMSLOP ) {
|
||||
buf[i++] = *p;
|
||||
p++;
|
||||
}
|
||||
|
@ -1131,7 +1131,7 @@ fputs_demangled (linebuffer, stream, arg_mode)
|
|||
while (i < SYMBOL_MAX
|
||||
&& *p != (char) 0
|
||||
&& SYMBOL_CHAR(*p)
|
||||
&& i < (int)sizeof(buf) - SLOP) {
|
||||
&& i < (int)sizeof(buf) - DMSLOP) {
|
||||
buf[i++] = *p;
|
||||
p++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue