aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-29 01:52:02 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-29 01:52:02 +0000
commit1058bca7483f329cd60fba85ce7391d522885fde (patch)
tree036848f60b897b3e984bd3b9863fb1ed44ba8496 /gdb/stack.c
parentd92419e5e96545b7021e28c14db0576ad0b1790b (diff)
downloadgdb-1058bca7483f329cd60fba85ce7391d522885fde.zip
gdb-1058bca7483f329cd60fba85ce7391d522885fde.tar.gz
gdb-1058bca7483f329cd60fba85ce7391d522885fde.tar.bz2
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.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index effa18c..999de6fd 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -356,11 +356,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
frame is a SIGTRAMP_FRAME or a DUMMY_FRAME, then the next frame
was not entered as the result of a call, and we 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);
location_print = (source == LOCATION
|| source == LOC_AND_ADDRESS
@@ -757,11 +753,10 @@ frame_info (char *addr_exp, int from_tty)
if (fi == NULL)
error ("Invalid frame specified.");
- 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);
func = get_frame_function (fi);
+ /* FIXME: cagney/2002-11-28: Why bother? Won't sal.symtab contain
+ the same value. */
s = find_pc_symtab (fi->pc);
if (func)
{
@@ -858,7 +853,8 @@ frame_info (char *addr_exp, int from_tty)
if (fi->next || calling_frame_info)
puts_filtered ("\n");
if (s)
- printf_filtered (" source language %s.\n", language_str (s->language));
+ printf_filtered (" source language %s.\n",
+ language_str (s->language));
#ifdef PRINT_EXTRA_FRAME_INFO
PRINT_EXTRA_FRAME_INFO (fi);