This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdbserver: ARM: add support for uclinux
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