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] |
On 29/12/2017 11:36, Dmitry V. Levin wrote: > 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. > > Indeed breaking down the enum on arch-specific bits does not seems a good refactor way. It seems ptrace.h justify to be a quite arch-specific header. The patch LGTM then.
Attachment:
signature.asc
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |