gdb and gdbserver support for MIPS NPTL
M.M. Kettenis
m.m.kettenis@alumnus.utwente.nl
Thu Mar 17 16:06:00 GMT 2005
Daniel Jacobowitz <drow@false.org> wrote:
> This patch provides ps_get_thread_area for both mips-linux-gdb and
> mips-linux gdbserver. I haven't checked it in yet, because the
> corresponding kernel changes and glibc changes are still pending; I'll check
> it in when they've been approved. Just wanted to get it off my hard drive.
The code include <linux/elf.h> that should be avoided if possible.
Is it still possible to change your glibc patches such that you can
avoid it?
> Index: gdb/gdb/gdbserver/linux-mips-low.c
> ===================================================================
> --- gdb.orig/gdb/gdbserver/linux-mips-low.c 2002-06-11 13:32:39.000000000 -0400
> +++ gdb/gdb/gdbserver/linux-mips-low.c 2005-02-13 21:59:15.000000000 -0500
> @@ -22,6 +22,26 @@
> #include "server.h"
> #include "linux-low.h"
>
> +#include <sys/ptrace.h>
> +
> +/* Correct for all GNU/Linux targets (for quite some time). */
> +#define GDB_GREGSET_T elf_gregset_t
> +#define GDB_FPREGSET_T elf_fpregset_t
> +
> +#ifndef HAVE_ELF_FPREGSET_T
> +/* Make sure we have said types. Not all platforms bring in <linux/elf.h>
> + via <sys/procfs.h>. */
> +#ifdef HAVE_LINUX_ELF_H
> +#include <linux/elf.h>
> +#endif
> +#endif
> +
More information about the Gdb-patches
mailing list