PPC reg.h / glibc&kernel conflicts
I have added (like Dan Malek, I found out later) PPC support to gdbserver.
Given that the code has a configure check for reg.h which seems to provide PT_ definitions for both m68k and i386, I thought I would be a good boy and add that for PPC as well.
Unfortunately there are some conflicts between where the kernel includes and glibc includes expect the PT_ definitions to appear. On powerpc asm/ptrace.h is included from several other asm-ppc header files which prevents making PT_ definitions in glibc (because glibc cannot safely use asm headers without unexpectedly getting PT_ definitions as well).
I don't have time to sort this out properly (at the moment). Would be nice if someone who had time would sort this out - or at the very least air some opinions on the subject so I know whether to try and find time for fixing this in the future.
Below included the glibc-2.1.2 changes required - note that this is not a patch submittal but an RFC - the patch breaks glibc if used with current (stable) kernels.
Hm... Come to think of it, this could already be fixed in development versions of kernel/glibc.... If so, ignore this posting.
Cheers,
Jesper
Dist renamed from tmp/glibc-2.1.2/sysdeps/unix/sysv/linux/powerpc/Dist +1 -0
@@ -3,4 +3,5 @@ kernel_termios.h init-first.h sys/procfs.h +sys/reg.h sys/user.h
sys/reg.h renamed from tmp/glibc-2.1.2/sysdeps/unix/sysv/linux/powerpc/sys/reg.h +178 -0
178 lines not on this page · raw message
sys/user.h renamed from tmp/glibc-2.1.2/sysdeps/unix/sysv/linux/powerpc/sys/user.h +0 -2
@@ -21,8 +21,6 @@#define _SYS_USER_H 1#include <features.h> -#include <asm/ptrace.h> -struct user {struct pt_regs regs;/* entire machine state */ size_t u_tsize;/* text size (pages) */
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
If you like to have this patch added to glibc, you should email it on the developer list ([email protected]).
glibc-linux is about using/installing glibc on Linux - development doesn't happen there.
Andreas
Signature · 5 lines
Andreas Jaeger SuSE Labs [email protected] private [email protected] ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/