From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57152 invoked by alias); 24 Mar 2017 14:41:51 -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 57140 invoked by uid 89); 24 Mar 2017 14:41:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=million X-HELO: mail-pf0-f179.google.com Received: from mail-pf0-f179.google.com (HELO mail-pf0-f179.google.com) (209.85.192.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Mar 2017 14:41:49 +0000 Received: by mail-pf0-f179.google.com with SMTP id o126so1848042pfb.3 for ; Fri, 24 Mar 2017 07:41:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=RW/WphreBdcpfbJDy3Waa/yFVZc+wgiM7BNP+YT6cDk=; b=rQsJa4gWkVToJg24l+GTNbfvbdweqfHOIoXn/3vMjn9A3km1sJFT8uzKPfdp3Gn2eN xGYHF0PnJCrSOKJk37ZI6lIkBiEJYlcl3JqGWjkI7UImU1TSYLFkMcv4xHi7x3k7NEgn VtPVXxzghavhaXNpyHS4vteKuLu40R9d5C3nSw9Bm6hbFpFwMvjiKzE6bXOLg8mBYv4m z1rDQawaIab0QBDSh7jwkITNEhrh8VrAvhHtvKMfrh3bqB/yfje/43prErlRrTpPbDMD FqdCTWdeXpWambEAgh/ONfxT25pEM3uwUFOQHt6LNDHBKOTfn4wPs5jP4f4iZH79wUBJ 9czA== X-Gm-Message-State: AFeK/H0wwUeLucivFTUgRTKPRgYTlvO+Bw4VyVN6TiMiekkfuoIH9S3yvdeBSCM4SFf1mg== X-Received: by 10.99.123.72 with SMTP id k8mr9455312pgn.139.1490366509159; Fri, 24 Mar 2017 07:41:49 -0700 (PDT) Received: from E107787-LIN (gcc114.osuosl.org. [140.211.9.72]) by smtp.gmail.com with ESMTPSA id x21sm5262757pfa.71.2017.03.24.07.41.47 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 24 Mar 2017 07:41:48 -0700 (PDT) From: Yao Qi To: "Metzger\, Markus T" Cc: "gdb-patches\@sourceware.org" , "Wiederhake\, Tim" , "xdje42\@gmail.com" , Joel Brobecker Subject: Re: GDB 8.0 release/branching 2017-03-20 update References: <20170320201629.pbjzaqsnvs7dx7f2@adacore.com> <86zigevkv0.fsf@gmail.com> <86inn1utkp.fsf@gmail.com> <86inmzvrbx.fsf@gmail.com> Date: Fri, 24 Mar 2017 14:41:00 -0000 In-Reply-To: (Markus T. Metzger's message of "Thu, 23 Mar 2017 18:16:42 +0000") Message-ID: <86shm2u47t.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00440.txt.bz2 "Metzger, Markus T" writes: > I meant that's all we store internally. Everything else, the pc, the > instruction's bytes, > the disassembly, even the is_speculative flag, is computed when the respe= ctive > function is called (or field is accessed). > We can also compute them lazily in gdb.disassemble (). > I think we already agreed to remove the ptid from the API. I'm also > not really sure > we need the number in Python. It is needed by the CLI to refer to an > instruction > but in Python we can use an instruction object directly. > > Once we drop those, the internal representation will be completely > different from the > external one. And it will be record-(btrace-)specific. I like that a > lot since computing AFAICS, The internal representation of instruction object provided by gdb.disassemble () can be a base class, and record-(target-) specific instruction object can extend it, but doesn't have to. It is an implementation decision, and user invisible, right? > the disassembly is rather expensive and the string is relatively big. > When a script is > iterating over a few million instructions and all it needs is the pc > or the sal or the > is_speculative flag to find a TSX region, we don't want to disassemble > the instruction. I agree. --=20 Yao (=E9=BD=90=E5=B0=A7)