aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorgdb-2.5.1 <gdb@fsf.org>1988-05-02 01:00:00 +0100
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:30 +0100
commit632ea0ccc5c4c3f9fc06881bfedfc4b075873941 (patch)
tree96f152433c41c5f51fe57307b287eb85865a43e2 /gdb/stack.c
parent7b4ac7e1ed2c4616bce56d1760807798be87ac9e (diff)
downloadgdb-632ea0ccc5c4c3f9fc06881bfedfc4b075873941.zip
gdb-632ea0ccc5c4c3f9fc06881bfedfc4b075873941.tar.gz
gdb-632ea0ccc5c4c3f9fc06881bfedfc4b075873941.tar.bz2
gdb-2.5.1
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 2698729..fce015b 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -39,6 +39,11 @@ FRAME selected_frame;
int selected_frame_level;
+/* Nonzero means print the full filename and linenumber
+ when a frame is printed, and do so in a format programs can parse. */
+
+int frame_file_full_name = 0;
+
static void select_calling_frame ();
void print_frame_info ();
@@ -114,9 +119,13 @@ print_frame_info (fi, level, source, args)
if (source != 0 && sal.symtab)
{
+ int done = 0;
if (source < 0 && fi->pc != sal.pc)
printf ("0x%x\t", fi->pc);
- print_source_lines (sal.symtab, sal.line, sal.line + 1);
+ if (frame_file_full_name)
+ done = identify_source_line (sal.symtab, sal.line);
+ if (!done)
+ print_source_lines (sal.symtab, sal.line, sal.line + 1);
current_source_line = max (sal.line - 5, 1);
}
if (source != 0)