This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

backtrace/1969: backtrace changes currently selected source line


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]