From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19245 invoked by alias); 26 Oct 2004 07:51:19 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19167 invoked from network); 26 Oct 2004 07:51:18 -0000 Received: from unknown (HELO capitol.mail.pas.earthlink.net) (207.217.120.180) by sourceware.org with SMTP; 26 Oct 2004 07:51:18 -0000 Received: from ip216-26-76-19.dsl.du.teleport.com ([216.26.76.19] helo=stray.canids) by capitol.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1CMM6v-0002nw-00 for gdb@sources.redhat.com; Tue, 26 Oct 2004 00:51:18 -0700 Received: from stray.canids (localhost.localdomain [127.0.0.1]) by stray.canids (Postfix) with ESMTP id 4A2C354AAB5 for ; Tue, 26 Oct 2004 00:51:15 -0700 (PDT) From: Felix Lee To: gdb list Subject: backtrace changes current source location Date: Tue, 26 Oct 2004 14:49:00 -0000 Message-Id: <20041026075115.4A2C354AAB5@stray.canids> X-SW-Source: 2004-10/txt/msg00417.txt.bz2 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? --