This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
backtrace/1969: backtrace changes currently selected source line
- From: jiflgdb at jifvik dot org
- To: gdb-gnats at sources dot redhat dot com
- Date: 12 Jul 2005 15:51:23 -0000
- Subject: backtrace/1969: backtrace changes currently selected source line
- Reply-to: jiflgdb at jifvik dot org
>Number: 1969
>Category: backtrace
>Synopsis: backtrace changes currently selected source line
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 12 15:58:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Larmour <jiflgdb@jifvik.org>
>Release: 6.3
>Organization:
>Environment:
linux native, but is generic
>Description:
The 'backtrace' command affects the source line chosen for 'list' and others. This means that doing a list after a backtrace returns the source line context of the outermost frame. I understood 'backtrace' was not meant to change the currently selected source line.
The issue seems to be that stack.c:backtrace_command() calls stack.c:print_frame_info() which calls set_current_source_symtab_and_line().
>How-To-Repeat:
With any program, break it at any subroutine and do:
l
bt
l
>Fix:
I suggest either print_frame_info() should not call set_current_source_symtab_and_line(), or the backtrace command should save the current 'sal', and restore it after the print_frame_info calls.
>Release-Note:
>Audit-Trail:
>Unformatted: