From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11234 invoked by alias); 23 Jul 2007 19:02:55 -0000 Received: (qmail 11220 invoked by uid 22791); 23 Jul 2007 19:02:54 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 23 Jul 2007 19:02:49 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id l6NJ2kYr365262 for ; Mon, 23 Jul 2007 19:02:46 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.4) with ESMTP id l6NJ2k0o2281568 for ; Mon, 23 Jul 2007 21:02:46 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l6NJ2da0004892 for ; Mon, 23 Jul 2007 21:02:40 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l6NJ2dJC004817; Mon, 23 Jul 2007 21:02:39 +0200 Message-Id: <200707231902.l6NJ2dJC004817@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 23 Jul 2007 21:02:33 +0200 Subject: Re: [rfc] Do not read from the executable if ptrace fails To: drow@false.org (Daniel Jacobowitz) Date: Mon, 23 Jul 2007 19:15:00 -0000 From: "Ulrich Weigand" Cc: brobecker@adacore.com (Joel Brobecker), gdb-patches@sourceware.org, alex00882007@gmail.com (Alex) In-Reply-To: <20070701223533.GC337@caradoc.them.org> from "Daniel Jacobowitz" at Jul 01, 2007 06:35:33 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2007-07/txt/msg00245.txt.bz2 Dan Jacobowitz wrote: > On Mon, Jun 25, 2007 at 07:54:03PM -0400, Joel Brobecker wrote: > > > Any comments, or shall I apply this? > > > > > > -- > > > Daniel Jacobowitz > > > CodeSourcery > > > > > > 2007-06-24 Daniel Jacobowitz > > > > > > PR symtab/2161 > > > * target.c (memory_xfer_partial): Do not continue past targets with > > > all memory. > > > > FWIW, it looks pretty good to me, and I think it should be part of 6.7 > > too. > > OK, I checked it in. I only noticed now, but this breaks SPU overlay support. Overlay support uses "LMA" addresses to refer to overlay sections not currently loaded, and performs xfer_partial requests to read from those (e.g. when invoking skip_prologue on a function not currently present). This works only if accesses to those LMA addresses go through to the xfer_memory routine in exec.c, which implements the required logic to retrieve those section contents from the executable file. This used to work (probably accidentally?), but is broken by this patch. Any suggestions how to fix it? Should the overlay logic from xfer_memory be moved to memory_xfer_partial, maybe? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com