From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 988 invoked by alias); 13 Apr 2012 16:00:18 -0000 Received: (qmail 927 invoked by uid 22791); 13 Apr 2012 16:00:09 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (217.140.96.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Apr 2012 15:59:55 +0000 Received: from mudshark.cambridge.arm.com (mudshark.cambridge.arm.com [10.1.79.58]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id q3DFxoOK000649; Fri, 13 Apr 2012 16:59:50 +0100 (BST) Date: Fri, 13 Apr 2012 16:23:00 -0000 From: Will Deacon To: Pedro Alves Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH] gdbserver: ARM: add support for uclinux Message-ID: <20120413155949.GC4605@mudshark.cambridge.arm.com> References: <1334308067-2285-1-git-send-email-will.deacon@arm.com> <4F883EE5.8080407@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F883EE5.8080407@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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/msg00368.txt.bz2 On Fri, Apr 13, 2012 at 03:57:41PM +0100, Pedro Alves wrote: > 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. Actually, it's for bleeding-edge kernels (3.4-rc2) since the ptrace request has been broken until recently (it would return -EIO). Although the #defines are exported in the kernel headers, they don't seem to be picked up by sys/ptrace.h, which is why I followed the same path as the other architectures here. An alternative would be to include asm/ptrace.h directly and introduce guards for the other architectures to avoid duplicate #defines... ...or would you expect libc to throw these out in its headers? Cheers, Will