From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95000 invoked by alias); 8 Feb 2017 22:15:46 -0000 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 Received: (qmail 94910 invoked by uid 89); 8 Feb 2017 22:15:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=Frame, H*f:CAH, sk:hardene, Malcomson X-HELO: mail-qk0-f174.google.com Received: from mail-qk0-f174.google.com (HELO mail-qk0-f174.google.com) (209.85.220.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Feb 2017 22:15:44 +0000 Received: by mail-qk0-f174.google.com with SMTP id u25so137750575qki.2 for ; Wed, 08 Feb 2017 14:15:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=0zOw6i8SmuHcuiMQ4yGaGnoz349yBdbOxW01Ztow6lw=; b=uD4WwVc3BowfvkTdlaA6PnVcezRilIVZODRLDSvlx4pdM8Q5Gd6Liw96Be0/izy8B/ OKc8mN+t60/Mi4dqpDzOSTNk4eikUgyP2kt2fUmCJrHZmJ+bGmbz7pvQ6h1/ch3PeC4r qjUsWeOE/jfEAXa9X+tHnv+Njs1ujfcAs4cIx3piYxiiP8MHXP4DoKogEEwYH+g23MZf 4QRwwPM3YrmIlPuevn/PNPqQE24ED9yfENhhTgTL7JVgw3n0irCSYzwA7d3Qy/KXuCEm p8/wJKE3OwUnYrBVWIkSqaZ0Ju8Vi0+TPv6NC0GYClp4XcU/x0KeV6FvYtN4nV5bWr8J IlwA== X-Gm-Message-State: AMke39nv9iMO87lxWy4tcNIzl315AWGCTfTxvC0u+sM6D4+fDe0r2toxoRcYlUf2oHT+mvVtMfDHWBsnovyT5w== X-Received: by 10.55.137.7 with SMTP id l7mr24107554qkd.11.1486592142590; Wed, 08 Feb 2017 14:15:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.140.194 with HTTP; Wed, 8 Feb 2017 14:15:42 -0800 (PST) In-Reply-To: References: From: Yao Qi Date: Wed, 08 Feb 2017 22:15:00 -0000 Message-ID: Subject: Re: [PATCH] Add gdb.current_arch() function to python module -- equivalent of guile (current-arch) To: Matthew Malcomson Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00206.txt.bz2 On Wed, Feb 8, 2017 at 5:46 PM, Matthew Malcomson wrote: > The problem is that without this patch I can't get an Architecture object > without first having a Frame object, and I can't get a Frame object witho= ut > starting my target program. > > Adding a gdb.current_arch() function is in order to get the Architecture > object I need without starting the target program. > IMO, "current" arch is unclear as an extension language interface. Yes, we do have function get_current_arch, but it is just a c function, we are free= to change it in the future. It would be better to add function Inferior.architecture. I don't have much GDB python expertise, so I'd like to hear what other people think. --=20 Yao (=E9=BD=90=E5=B0=A7)