From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19714 invoked by alias); 11 Oct 2013 21:34:23 -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 19703 invoked by uid 89); 11 Oct 2013 21:34:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vb0-f49.google.com Received: from mail-vb0-f49.google.com (HELO mail-vb0-f49.google.com) (209.85.212.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 11 Oct 2013 21:34:22 +0000 Received: by mail-vb0-f49.google.com with SMTP id w16so3176363vbb.36 for ; Fri, 11 Oct 2013 14:34:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=9+IGu1lF/gIKwoxs7WOpuymwm3vk6GKX92gvLcFoQ6E=; b=lMZPhNl01JUz0QUYrRmFaG4B21CiLn8ckKLBph/qfYsy4gqh7lTd+IUVsRj+UjLXxK gZYLM+cKfkKyj+tQ+WzsTLXoDVpTviNvSTVn+QJuPAlp9A5JH7R2zoxXThWCmIrE7lYE hvnpgdLXJdFcqgHIQ7QvF5fc9p9KOwaXOzIABJ+O1SWMVmntC0qUS5ar1+a6iQnBuglK vKGFuamQelpbhLGUxN5hwXC6XcI62dXcMTHciKTDrYi169qrfCjfwkGu7L3io6cpB6xg Ilus4bWzZzwwibPiydo63gC8Zq5lkMagxAnwaQNVXL1wu62ZEFN7fVNf4mm15zB9+vuw S04Q== X-Gm-Message-State: ALoCoQk1k1P070HrkbgewlBmDnQR4XQxdg57wOpXb4aEWs14R4a2PV7z/GmUM+F7XVZ1kETax02Y9J1HI8LwcGEaJKIrv1flNNwly6iTSF+IPB9v5FvhE74HEB321e8MdHqh1x/WKYs3fgAp+yoW/GTQ+y/7UyBHgMmkHq5HQEB45nqxm0gPmi54nXcP8PlGU1NzcRzuoItTA6Zx3rt0QV9mQzK9nbI+Dg== MIME-Version: 1.0 X-Received: by 10.52.244.15 with SMTP id xc15mr157794vdc.52.1381527259537; Fri, 11 Oct 2013 14:34:19 -0700 (PDT) Received: by 10.52.37.138 with HTTP; Fri, 11 Oct 2013 14:34:19 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 Oct 2013 21:34:00 -0000 Message-ID: Subject: Re: [patch] Disassembly improvements From: Doug Evans To: "Abid, Hafiz" Cc: "Pedro Alves (palves@redhat.com)" , "gdb-patches@sourceware.org" , "Mirza, Taimoor" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00400.txt.bz2 On Thu, Oct 10, 2013 at 6:14 AM, Abid, Hafiz wrote: > Hi Pedro, > I am attaching the patch that was mentioned in the following thread. I re= surrected it from our internal repo, did a bit of manual testing and run th= e regression suite without any problem. It basically reads memory from the = target in a buffer in gdb_disassembly and tries to use this buffer in dis_a= sm_read_memory instead of reading from the target. This saves us on repeate= d memory read calls. The problem was noted when eclipse was trying to fill = its disassembly view. > https://sourceware.org/ml/gdb-patches/2013-10/msg00221.html > > Regards, > Abid > > 2013-10-10 Taimoor Mirza > > * disasm.c (DIS_BUF_SIZE): New define. > (dis_asm_read_memory): Read from the disassembly buffer instead > of target memory directly. > (gdb_disassembly): Fill the disassembly buffer with a chunk of > the memory to disassemble. This is a specific fix to a general problem. Question: How much more of the general problem can we fix without having a fix baked into the disassembler?