2002-11-28 Andrew Cagney <ac131313@redhat.com>

* frame.c (pc_notcurrent): New function.
	(find_frame_sal): New function.
	* frame.h (find_frame_sal): Declare.
	(struct symtab_and_line): Add opaque declaration.
	* stack.c (print_frame_info_base): Use find_pc_line instead of
	find_frame_sal.
	(frame_info): Ditto.
	* ada-lang.c (find_printable_frame): Ditto.

Index: tui/ChangeLog
2002-11-28  Andrew Cagney  <ac131313@redhat.com>

	* tuiStack.c (tuiShowFrameInfo): Use find_frame_sal instead of
	find_pc_line.
This commit is contained in:
Andrew Cagney
2002-11-29 01:52:02 +00:00
parent d92419e5e9
commit 1058bca748
7 changed files with 70 additions and 28 deletions

View File

@@ -5032,20 +5032,7 @@ find_printable_frame (struct frame_info *fi, int level)
for (; fi != NULL; level += 1, fi = get_prev_frame (fi))
{
/* If fi is not the innermost frame, that normally means that
fi->pc points at the return instruction (which is *after* the
call instruction), and we want to get the line containing the
call (because the call is where the user thinks the program
is). However, if the next frame is either a SIGTRAMP_FRAME
or a DUMMY_FRAME, then the next frame will contain a saved
interrupt PC and such a PC indicates the current (rather than
next) instruction/line, consequently, for such cases, want to
get the line containing fi->pc. */
sal =
find_pc_line (fi->pc,
fi->next != NULL
&& !(get_frame_type (fi->next) == SIGTRAMP_FRAME)
&& !(get_frame_type (fi->next) == DUMMY_FRAME));
find_frame_sal (fi, &sal);
if (sal.symtab && !is_ada_runtime_file (sal.symtab->filename))
{
#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)