From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83789 invoked by alias); 8 Feb 2017 17:46:35 -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 83779 invoked by uid 89); 8 Feb 2017 17:46:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=disassembly, Architecture, Frame, H*f:CAH X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Feb 2017 17:46:24 +0000 Received: by mail-wm0-f68.google.com with SMTP id r18so34527879wmd.3 for ; Wed, 08 Feb 2017 09:46:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ad/jVekYP1uR4j7rnvFr1gx4RdC1KEvxzUTRCu6tpxw=; b=UzRY/xZUqcbmnZulhi449ywn69AMGryq7p/dRFSe9JG6fByPOTKSU6fohT+Znq+nz3 xA279VjwUuol1hdy1SZ2PXmDbkx9h+ZgSnnw2DujtvACubAYgY90ET9Uugj9rfhww/VY Dsv+DLGvkEc1ac1LJXUL09vBJHXORE0GRtLuVmDK/QKIoOYekeJGBXDwzytDCF2E/GHE 1m712e9KbsKGBNtGGiJSFrn+qACikezeOs1Y1VkbZFhW+nUt9UfKgGmGHmrqTSu1Dq0b ObE4o6taBe5xzyAf4g5tdNYQEx9kyGFwOSDTBIycWuuegPKwVz7MvwcwjFRmxaVySNUY w/ig== X-Gm-Message-State: AMke39mU/xNGPbB2pt9GSjX/hHnzqTJ9TxQtfPzsAtEHrdPDj4vziX4+24Ss0Z4ZeKBkkQ== X-Received: by 10.28.51.205 with SMTP id z196mr18016076wmz.22.1486575982343; Wed, 08 Feb 2017 09:46:22 -0800 (PST) Received: from [10.0.0.57] (host86-142-187-79.range86-142.btcentralplus.com. [86.142.187.79]) by smtp.gmail.com with ESMTPSA id m29sm14103799wrm.38.2017.02.08.09.46.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 09:46:21 -0800 (PST) Subject: Re: [PATCH] Add gdb.current_arch() function to python module -- equivalent of guile (current-arch) To: Yao Qi References: Cc: "gdb-patches@sourceware.org" From: Matthew Malcomson Message-ID: Date: Wed, 08 Feb 2017 17:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00200.txt.bz2 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 without 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. On 08/02/17 17:15, Yao Qi wrote: > On Mon, Feb 6, 2017 at 5:01 PM, Matthew Malcomson > wrote: >> I've been finding that awkward in some extensions I've been writing, mainly >> when I want to work with the disassembly of a function before my target >> program >> has started. >> > Architecture.disassemble doesn't work? > https://sourceware.org/gdb/current/onlinedocs/gdb/Architectures-In-Python.html >