This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Compile error: 'PTRACE_GETREGS' undeclared (first use in this function) by arm64-sdk


Hi,
  I want to use ptrace in arm64, and there is a compile problem:

# aarch64-linux-gnu-gcc ptrace.c -o ptrace
ptrace.c: In function 'main':
ptrace.c:48:29: error: 'PTRACE_GETREGS' undeclared (first use in this function)
         ptrace_ret = ptrace(PTRACE_GETREGS, child, NULL, &regs);
                             ^
If the glibc does not support 'PTRACE_GETREGS'?


but I find:

/* Get register content.  */
  PTRACE_GETREGSET = 0x4204,
#define PTRACE_GETREGSET PTRACE_GETREGSET

in eglibc-2.19/libc/ports/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h.
Then I don't know why :-(


And I know 'regs' in ptrace(PTRACE_GETREGS, child, NULL, &regs) can define:
'struct user regs' in arm or powerpc;
'struct user_fpregs_struct regs' in X86_64 or i386;

but I can't find the struct in eglibc-2.19/libc/ports/sysdeps/unix/sysv/linux/aarch64/sys/user.h
What should I do in arm64 if I want to use it?

Thanks
Cui Bixuan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]