From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32404 invoked by alias); 13 Apr 2012 14:58:06 -0000 Received: (qmail 32393 invoked by uid 22791); 13 Apr 2012 14:58:04 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Apr 2012 14:57:46 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3DEvhu0023575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Apr 2012 10:57:43 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3DEvfmw005886; Fri, 13 Apr 2012 10:57:42 -0400 Message-ID: <4F883EE5.8080407@redhat.com> Date: Fri, 13 Apr 2012 14:59:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Will Deacon CC: gdb-patches@sourceware.org Subject: Re: [PATCH] gdbserver: ARM: add support for uclinux References: <1334308067-2285-1-git-send-email-will.deacon@arm.com> In-Reply-To: <1334308067-2285-1-git-send-email-will.deacon@arm.com> Content-Type: text/plain; charset=ISO-8859-1 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: 2012-04/txt/msg00363.txt.bz2 On 04/13/2012 10:07 AM, Will Deacon wrote: > When debugging a uclinux target, it is necessary to retrieve the text > and data offsets of the running program in order for symbol resolution > to work correctly. > > This patch defines PT_{TEXT,DATA,TEXT_END}_ADDR for ARM, which can be > issued as `magic' addresses to the PTRACE_PEEKUSER request in order to > retrieve the child offsets. Is this for older kernels? I see these defined in arch/arm/include/asm/ptrace.h in current mainline. Anyway, looks fine. > --- > > 2012-04-13 Will Deacon > > * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR and > PT_DATA_ADDR for ARM targets. > > gdb/gdbserver/linux-low.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c > index 043451d..c4b52e7 100644 > --- a/gdb/gdbserver/linux-low.c > +++ b/gdb/gdbserver/linux-low.c > @@ -4766,6 +4766,10 @@ linux_stopped_data_address (void) > #define PT_TEXT_ADDR (0x10000*4) > #define PT_DATA_ADDR (0x10004*4) > #define PT_TEXT_END_ADDR (0x10008*4) > +#elif defined(__arm__) > +#define PT_TEXT_ADDR 0x10000 > +#define PT_DATA_ADDR 0x10004 > +#define PT_TEXT_END_ADDR 0x10008 > #endif > > /* Under uClinux, programs are loaded at non-zero offsets, which we need -- Pedro Alves