From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3368 invoked by alias); 1 Feb 2012 16:05:02 -0000 Received: (qmail 3349 invoked by uid 22791); 1 Feb 2012 16:05:01 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Feb 2012 16:04:48 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q11G4mSG008055 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 Feb 2012 11:04:48 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q11G4ltl017146; Wed, 1 Feb 2012 11:04:47 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id q11G4jGi026557; Wed, 1 Feb 2012 11:04:46 -0500 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: RFA: fix PR python/13351 References: <4F2916BE.6020105@redhat.com> Date: Wed, 01 Feb 2012 16:05:00 -0000 In-Reply-To: <4F2916BE.6020105@redhat.com> (Pedro Alves's message of "Wed, 01 Feb 2012 10:41:02 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-02/txt/msg00015.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> I'm getting a bit nervous about get_selected_frame_if_set usages Pedro> getting spread around. (It feels a bit like we're going back in Pedro> time, to a time before the always-a-frame work.) The selected Pedro> frame may not be set, while we still may have a current frame, so Pedro> get_selected_frame would lazily select it, and so the lookup Pedro> would still start on a frame block. If you don't want an error, Pedro> you can pass NULL to get_selected_frame. Ok, I can make that change. I don't understand why get_selected_frame is the preferred API. To me it seems clearly worse: passing in an error message is ugly, and it isn't really possible to distinguish "no frames" from "an exception was thrown for some other reason". Neither of these problems would affect get_selected_frame_if_set. Perhaps I can do the detection by checking has_stack_frames? Is that safe? Tom