From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21026 invoked by alias); 8 Sep 2003 13:33:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21012 invoked from network); 8 Sep 2003 13:33:36 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 8 Sep 2003 13:33:36 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D3B252B7F; Mon, 8 Sep 2003 09:33:33 -0400 (EDT) Message-ID: <3F5C852D.2010207@redhat.com> Date: Mon, 08 Sep 2003 13:33:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: selected frame in read_var_value References: <20030801192951.GA2109@nevyn.them.org> <3F329038.5040708@redhat.com> <20030828195501.GB27550@nevyn.them.org> <3F58C35A.3060908@redhat.com> <20030907035325.GA9985@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-09/txt/msg00112.txt.bz2 > Is this about what you wanted, and are my comments on the mark? Yes, just one pedantic tweak. > If so, how do you feel about a mass replacement of the one deprecated > construct (deprecated_selected_frame) with the new deprecated construct > (deprecated_safe_get_selected_frame) in the places in GDB which use > this "if frame arg is NULL, get selected frame" idiom? For 6.0, scares the peverbial out of me -> got a convincing argument? :-) For the mainline, not phased. Andrew > +/* This is a variant of get_selected_frame which can be called when the > + inferior is not running; in that case it will return NULL instead of > + calling error (). */ Almost. Those are also true for a core file. > +struct frame_info * > +deprecated_safe_get_selected_frame (void) > +{ > + if (!target_has_registers || !target_has_stack || !target_has_memory) > + return NULL; > + return get_selected_frame (); > +}