[PATCH 3/3] linux/x86: sync sys/ptrace.h with Linux 4.14 [BZ #22433]

Dmitry V. Levin ldv@altlinux.org
Fri Dec 29 13:36:00 GMT 2017


On Fri, Dec 29, 2017 at 11:13:03AM -0200, Adhemerval Zanella wrote:
> On 27/12/2017 01:46, Dmitry V. Levin wrote:
> > Clone generic linux/sys/ptrace.h, add the following x86-specific
> > __ptrace_request constants: PTRACE_GET_THREAD_AREA,
> > PTRACE_SET_THREAD_AREA, PTRACE_ARCH_PRCTL, PTRACE_SYSEMU,
> > PTRACE_SYSEMU_SINGLESTEP, and PTRACE_SINGLEBLOCK.
> > 
> > [BZ #22433]
> > * sysdeps/unix/sysv/linux/x86/sys/ptrace.h: New file.
> 
> Wouldn't be better to avoid code duplication to add a ptrace-arch.h as an
> empty one for generic case and add a x86 with the arch-specific bits?

Maybe, but there are two complications.

First, this x86/bits/ptrace-arch.h would have to contain a part of
enum __ptrace_request definition - are we OK with distributing
such ugly looking arch-specific bits?

Second, there are exceptions, e.g. ia64/sys/ptrace.h includes additional
headers and defines struct __pt_all_user_regs, s390/sys/ptrace.h and
sparc/sys/ptrace.h undefine potentially conflicting PTRACE_* macros -
we would have to #include more arch-specific bits to accommodate them.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20171229/dbdcbab0/attachment.sig>


More information about the Libc-alpha mailing list