This is the mail archive of the gdb@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]

Re: backtrace changes current source location


On Tue, Oct 26, 2004 at 12:51:15AM -0700, Felix Lee wrote:
> after doing a backtrace, the current source location is set to
> the last frame in the backtrace, which is often main().  this
> doesn't seem like useful behavior.  I think backtrace shouldn't
> change the current source location at all, but it's been that way
> since gdb 5.3.
> 
> this is when the change happened:
>     http://sources.redhat.com/ml/gdb-patches/2002-08/msg00358.html
> any time frame info gets printed, the current source location is
> set to that frame, which seems reasonable to me, but it causes
> this awkward backtrace behavior.
> 
> maybe backtraces should be considered a special case, and
> stack.c:backtrace_command_1 should save/restore the current
> source location around the call to print_frame_info?

I've been meaning to fix this since 6.0... I think your suggestion is
reasonable; do you want to try it?

-- 
Daniel Jacobowitz


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