<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Hi</div><div><br></div><div>I am working to implement ARM SVE register access support in LLDB for Linux based operating systems. </div><div><br></div><div>In order to access SVE registers via ptrace Linux provides macros implemented here:</div><div><a href="https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/ptrace.h" target="_blank">https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/ptrace.h</a><br></div><div><a href="https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/sve_context.h" target="_blank">https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/sve_context.h</a><br></div><div><br></div><div>These macros are pulled into aarch64-linux-gnu/include/asm/ptrace.h if we have aarch64-linux-gnu cross compiler installed on ubuntu 18.04. In cases where these headers are not available we have to manually include them into our code. Just like gdb has done here: <a href="https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/nat/aarch64-sve-linux-sigcontext.h" target="_blank">https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/nat/aarch64-sve-linux-sigcontext.h</a></div><div><br></div><div>My patch posted here: <a href="https://reviews.llvm.org/D77047" target="_blank">https://reviews.llvm.org/D77047</a> also makes use of similar strategy by including these macros in LLDB under lldb/source/Plugins/Process/Linux/LinuxPTraceDefines_arm64sve.h</div><div><a href="https://reviews.llvm.org/differential/changeset/?ref=1893998&whitespace=ignore-most" target="_blank">https://reviews.llvm.org/differential/changeset/?ref=1893998&whitespace=ignore-most</a><br></div><div></div><div><br></div><div>My question is about licensing issues around including this piece of patch into llvm mono repo. These macros are provided by linux kernel for the use of its client applications and are included when LLDB is compiled with #include <ptrace.h>. Only change we have here is that we are shipping this code as part of LLDB in case linux headers on a particular system do not yet support these macos.</div><div><br></div><div>Please provide your opinion on licensing validity of this code.</div><div><br></div><div>Thanks!</div><div><br></div>-- <br><div dir="ltr" data-smartmail="gmail_signature">Omair Javaid<br><a href="http://www.linaro.org" target="_blank">www.linaro.org</a></div></div></div></div>