From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2653 invoked by alias); 15 Aug 2007 19:29:11 -0000 Received: (qmail 2620 invoked by uid 22791); 15 Aug 2007 19:29:10 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 15 Aug 2007 19:29:05 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 9368098311; Wed, 15 Aug 2007 19:29:05 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 6424D9812E; Wed, 15 Aug 2007 19:29:05 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1ILOYA-0000OA-Vh; Wed, 15 Aug 2007 15:29:02 -0400 Date: Wed, 15 Aug 2007 19:29:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: Jerome Guitton , gdb-patches@sources.redhat.com Subject: Re: [RFA] backtrace in mixed language applications Message-ID: <20070815192902.GA1422@caradoc.them.org> Mail-Followup-To: Joel Brobecker , Jerome Guitton , gdb-patches@sources.redhat.com References: <20070810100313.GA29799@adacore.com> <20070815191834.GK11498@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070815191834.GK11498@adacore.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00319.txt.bz2 On Wed, Aug 15, 2007 at 12:18:34PM -0700, Joel Brobecker wrote: > I think this opens the chance for the debugger to change the selected > frame if something goes wrong (or the user presses controlC), which is an > unexpected side-effect. Correct. If you have to switch the global selected frame, please use a cleanup. It's better to pass the selected frame explicitly where possible, but it may not be practical depending what is checking the language. > Also, I'm thinking this is the wrong place for doing this frame switch. > How about doing it inside print_frame? I think this would make sure > we cover all the cases where we print a frame, such as after an "up", > "down", or a "frame" command. And I think the frame selection needs > to be protected against error raising. > > What do others think? Yes, I agree. If we really need to change the selected frame to print a frame correctly, then let's do it lower down (or document/assert the requirement). -- Daniel Jacobowitz CodeSourcery