[Lldb-commits] [PATCH] lldb: deal with non-portable PTRACE-related constants

Todd Fiala tfiala at google.com
Mon Jun 23 09:56:43 PDT 2014


FWIW on the NativeProcessLinux side (llgs branch) I'm solving this more
like how the existing code did it:

--- a/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -52,6 +52,12 @@
 #define DEBUG_PTRACE_MAXBYTES 20

 // Support ptrace extensions even when compiled without required kernel
support
+#ifndef PTRACE_GETREGS
+#define PTRACE_GETREGS 12
+#endif
+#ifndef PTRACE_SETREGS
+  #define PTRACE_SETREGS 13
+#endif
 #ifndef PTRACE_GETREGSET
   #define PTRACE_GETREGSET 0x4204
 #endif

That approach should also clear up the cross compile issues.  More
importantly, if it's really running this code on the target, where the
ptrace support really does exist, then the code would still run properly.


On Mon, Jun 23, 2014 at 9:07 AM, Todd Fiala <tfiala at google.com> wrote:

> svn commit
> Sending        source/Plugins/Process/Linux/ProcessMonitor.cpp
> Transmitting file data .
> Committed revision 211503.
>
> http://reviews.llvm.org/D4091
>
>
>


-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140623/2c9a4d70/attachment.html>


More information about the lldb-commits mailing list