[uClinux-dev] gdbserver kills the shell?

John Williams jwilliams at itee.uq.edu.au
Thu Oct 6 06:22:34 EDT 2005

Hi Stuart,

Stuart Hughes wrote:

> For the m68knommu platform I'm working on, it doesn't have entries in
> Rather than try to put that into my kernel source, I did it this way:
> +#if defined(__m68k__)
> +/********************************************************************
> +   Note that some architectures define the following in ptrace.h
> +   For an example see: include/asm-v850/ptrace.h in the kernel
> +*********************************************************************/
> +#define PT_TEXT_ADDR 49*4
> +#define PT_TEXT_LEN  50*4
> +#define PT_DATA_ADDR 51*4
> +#endif
> +

> I suspect there is a better way of doing it than hard coding the
> constants in the linux-low.c file, but I couldn't think of a simple way.

take a look at include/asm-microblaze/ptrace.h - or asm-v850 which I
based it on.  All you do is define these magic values relative to the
last "real" one:

/* These are `magic' values for PTRACE_PEEKUSR that return info about
where a process is located in memory.  */
#define PT_TEXT_ADDR    (PT_SIZE + 1)
#define PT_TEXT_LEN     (PT_SIZE + 2)
#define PT_DATA_ADDR    (PT_SIZE + 3)



More information about the uClinux-dev mailing list