From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31583 invoked by alias); 9 Oct 2008 17:53:45 -0000 Received: (qmail 31573 invoked by uid 22791); 9 Oct 2008 17:53:45 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.29.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 09 Oct 2008 17:52:57 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id m99Hq0tI270572 for ; Thu, 9 Oct 2008 17:52:00 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 v9.1) with ESMTP id m99Hpx2b1495098 for ; Thu, 9 Oct 2008 19:51:59 +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 m99Hpuqa001684 for ; Thu, 9 Oct 2008 19:51:56 +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 m99HpuoM001681; Thu, 9 Oct 2008 19:51:56 +0200 Message-Id: <200810091751.m99HpuoM001681@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 9 Oct 2008 19:51:56 +0200 Subject: Re: [rfc] Simplify ppc64_sysv_abi_adjust_breakpoint_address To: luisgpm@linux.vnet.ibm.com Date: Thu, 09 Oct 2008 17:53:00 -0000 From: "Ulrich Weigand" Cc: drow@false.org (Daniel Jacobowitz), gdb-patches@sourceware.org In-Reply-To: <1223397031.612.26.camel@gargoyle> from "Luis Machado" at Oct 07, 2008 01:30:30 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: 2008-10/txt/msg00296.txt.bz2 Luis Machado wrote: > It seems we have a situation in which > "ppc64_sysv_abi_adjust_breakpoint_address" is still required, in a way. > > Before removing this function, GDB was smart enough to know that the > entry point of a 64-bit PPC binary is, in reality, a function > descriptor, thus grabbing the correct breakpoint location from within > that address and setting it correctly. > > After removing this function, GDB no longer knows that a specific > address is a function descriptor, and places a breakpoint at a data > section. The binary's code tries to fetch the correct address from the > function descriptor's address and ends up fetching the breakpoint > instruction, which makes no sense. > > So, i see two ways: > > 1 - Make GDB smart again, being able to determine if the address is of a > function descriptor or not, basically the way i was before this patch. > > 2 - Assume the user knows what he's doing and that he knows where to > place a breakpoint when using the address of a function descriptor. I'm not sure exactly what situation you're refering to ... is this about break *0x..... where the address that was manually specified refers to a function descriptor instead of the function code? In that case, I'd tend to consider this user error -- if you use hard-coded addresses, you should know what you're doing on the platform. If this is about something else, could you show a command line that does the wrong thing for you? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com