* coffread.c (coff_symfile_read): Use xmalloc, not malloc.

* language.c, printcmd.c:  Lint.
        * language.h (get_frame_language):  Declare.
        * saber.suppress:  update.
        * stack.c (find_relative_frame):  Remove complex code that was
        #if 0'd, stick with simple code.  Lint.
	* saber.suppress:  Update a bit.
        * symfile.c (add_symbol_file_command):  Add "?" to question.
        * utils.c (parse_escape):  Avoid \a due to bdead compilers.
        * value.h:  Declare typedef_print.

        * valprint.c (val_print, type_print_base):  TYPE_CODE_RANGE less
        kludgey.
This commit is contained in:
John Gilmore 1991-09-28 01:35:29 +00:00
parent dad0e12d57
commit d8ce13268e
6 changed files with 246 additions and 124 deletions

View file

@ -32,7 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
extern int addressprint; /* Print addresses, or stay symbolic only? */
extern int info_verbose; /* Verbosity of symbol reading msgs */
extern unsigned lines_to_list; /* # of lines "list" command shows by default */
extern int lines_to_list; /* # of lines "list" command shows by default */
extern char *reg_names[]; /* Names of registers */
/* Thie "selected" stack frame is used by default for local and arg access.
@ -899,7 +899,7 @@ find_relative_frame (frame, level_offset_ptr)
register int* level_offset_ptr;
{
register FRAME prev;
register FRAME frame1, frame2;
register FRAME frame1;
/* Going up is simple: just do get_prev_frame enough times
or until initial frame is reached. */
@ -911,36 +911,9 @@ find_relative_frame (frame, level_offset_ptr)
(*level_offset_ptr)--;
frame = prev;
}
/* Going down could be done by iterating get_frame_info to
find the next frame, but that would be quadratic
since get_frame_info must scan all the way from the current frame.
The following algorithm is linear. */
/* Going down is just as simple. */
if (*level_offset_ptr < 0)
{
#if 0
/* This is ancient and unnecessary? -- gnu@cygnus.com
It also loops forever if frame #0 is not current_frame (e.g. when we have
used the "frame" command after the stack was invalid). */
/* First put frame1 at innermost frame
and frame2 N levels up from there. */
frame1 = get_current_frame ();
frame2 = frame1;
while (*level_offset_ptr < 0 && frame2 != frame)
{
frame2 = get_prev_frame (frame2);
(*level_offset_ptr) ++;
}
/* Then slide frame1 and frame2 up in synchrony
and when frame2 reaches our starting point
frame1 must be N levels down from there. */
while (frame2 != frame)
{
frame1 = get_prev_frame (frame1);
frame2 = get_prev_frame (frame2);
}
return frame1;
#else
while (*level_offset_ptr < 0) {
frame1 = get_next_frame (frame);
if (!frame1)
@ -948,7 +921,6 @@ find_relative_frame (frame, level_offset_ptr)
frame = frame1;
(*level_offset_ptr)++;
}
#endif
}
return frame;
}