- Notifications
You must be signed in to change notification settings - Fork 15.6k
Extending LLDB to work on AIX #102601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Extending LLDB to work on AIX #102601
Changes from all commits
eef33d2 844f798 4d5a088 b457557 1d20ebb 2c30170 ad2c204 72de919 79e9625 84ab2f0 aefbbbf 847230b cab9674 054733b b01e24c 26a3c23 befb24c 68e0c4c 4fe42cd b4d4329 021ca06 49cc9bb f428ca6 e5ed4f2 cd39f0a ddcf64f 626c018 3903792 8a464f3 98de95c 9d3a322 82dbcb0 68c2b7a 57a4ca0 216bde5 72dd626 fc16f21 1692376 60294ea c031b94 21a4903 525eac8 2b1fa04 ad5e745 10baa47 b1a6d13 2644be5 594fb02 4bbace6 4805b13 cff574b fab3691 443ffb4 53fdcab 8f893f8 87306c9 2e09d01 56498e2 da2384e a063a3c 7573f57 e830161 303fa3b 6947dec 2461511 f73c609 7202a88 2d712d8 f69abba e509026 0dcff9f 25bea9c 720d624 7072565 04c8834 349ec00 a2eeca8 9269818 897ac5f b7e9ef1 736cd7a 665bf77 7edd558 a8cb431 f6ba504 1694792 94d62f7 9660ecd 377af0d 8a8dfc7 2b701ad 8067064 7a443bf de2cdd8 57cb805 84ee3fa 75c73f5 0767ef0 3f65e2b 43da4bc 88ebd6d 1e17654 77dfc77 611e819 0d959cc 6259bb3 66547e8 8214e5d eaf11c3 558a128 83b29b8 28ad04b d00d28a 1ca1630 7b6ca81 160d101 44cd046 0796990 9ff945e b776a1d b443dd5 96db5e3 89b3aba 6abd1d1 9a61aa4 fafd74e f20fc0f 3bc2ab8 71d4fed 7a2d01a 16edbe1 ebf12ac fa23737 13f46a5 a9175ca 6406fb6 2b562b4 da6225a 60dbdfe 4f04550 db00cae ab3521f eb74bb5 16f90e9 f3e4223 3398280 cc397ec 535e874 3c09908 01e99c2 40e4888 d7a892e 0830e47 127e009 19c88e2 44e3f98 362b39c e756590 a9178ed 09e392a b4b50bc 8a512c6 f412036 37f9632 b158b87 b3f3733 182a373 c6d2bc2 5dcc4aa 8dd3bd9 c2d7807 35ac0cb 2e0029c bd233df a111502 1071a2c 24c6dd5 e0952b5 70345f2 c12d50c fbf0ac0 0b68935 33f5c2a 9a621e6 9f6f565 27b41f8 c09f8d2 0798db7 8f90e19 389ba77 a2062c6 414cebb fb6ddcb 0f45797 2fa2cc0 31dfd63 4b7cbff a43cc55 98ff2b1 317e53f 993234b e776a7e c195233 ad7ee05 12e0701 b820ca0 6ef7a6c de34b4b 24b155d 24cbe68 b63b013 fb81c21 d2fc5a2 90f4db2 ff2d84f 998f509 6530bc3 97a6e02 178b69a 17055ab 9dcf6b9 6e3552f 8d01231 79ff473 4b08395 613eb45 09d8f6b 9b2902a b6dac6c 5d0a68f 434af8d fc7775c bbb0508 e1104e6 2c8c436 938a1e2 7ee4288 e81a807 2ab7bfc dddb11f 2677b29 8175fea c056342 71c6029 62b4fb7 5dc24cd 7af7010 472a7a8 0d729e7 fa51fc9 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| //===-- Host.h --------------------------------------------------*- C++ -*-===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
| | ||
| #ifndef LLDB_HOST_AIX_HOST_H | ||
| #define LLDB_HOST_AIX_HOST_H | ||
| | ||
| #include "lldb/lldb-types.h" | ||
| #include <optional> | ||
| | ||
| namespace lldb_private { | ||
| | ||
| // Get PID (i.e. the primary thread ID) corresponding to the specified TID. | ||
| std::optional<lldb::pid_t> getPIDForTID(lldb::pid_t tid); | ||
| | ||
| } // namespace lldb_private | ||
| | ||
| #endif // #ifndef LLDB_HOST_AIX_HOST_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| //===-- Ptrace.h ------------------------------------------------*- C++ -*-===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
| | ||
| // This file defines ptrace functions & structures | ||
| | ||
| #ifndef liblldb_Host_aix_Ptrace_h_ | ||
| #define liblldb_Host_aix_Ptrace_h_ | ||
| | ||
| #include <sys/ptrace.h> | ||
| | ||
| #define DEBUG_PTRACE_MAXBYTES 20 | ||
| | ||
| // Support ptrace extensions even when compiled without required kernel support | ||
| #ifndef PTRACE_GETREGS | ||
| #define PTRACE_GETREGS (PT_COMMAND_MAX+1) | ||
| #endif | ||
| #ifndef PTRACE_SETREGS | ||
| #define PTRACE_SETREGS (PT_COMMAND_MAX+2) | ||
| #endif | ||
| #ifndef PTRACE_GETFPREGS | ||
| #define PTRACE_GETFPREGS (PT_COMMAND_MAX+3) | ||
| #endif | ||
| #ifndef PTRACE_SETFPREGS | ||
| #define PTRACE_SETFPREGS (PT_COMMAND_MAX+4) | ||
| #endif | ||
| #ifndef PTRACE_GETREGSET | ||
| #define PTRACE_GETREGSET 0x4204 | ||
| #endif | ||
| #ifndef PTRACE_SETREGSET | ||
| #define PTRACE_SETREGSET 0x4205 | ||
| #endif | ||
| #ifndef PTRACE_GET_THREAD_AREA | ||
| #define PTRACE_GET_THREAD_AREA (PT_COMMAND_MAX+5) | ||
| #endif | ||
| #ifndef PTRACE_ARCH_PRCTL | ||
| #define PTRACE_ARCH_PRCTL (PT_COMMAND_MAX+6) | ||
| #endif | ||
| #ifndef ARCH_GET_FS | ||
| #define ARCH_SET_GS 0x1001 | ||
| #define ARCH_SET_FS 0x1002 | ||
| #define ARCH_GET_FS 0x1003 | ||
| #define ARCH_GET_GS 0x1004 | ||
| #endif | ||
| #ifndef PTRACE_PEEKMTETAGS | ||
| #define PTRACE_PEEKMTETAGS (PT_COMMAND_MAX+7) | ||
| Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Funny seeing this here, I worked on lldb's MTE support for AArch64. Does AIX support a memory tagging feature as well? If so I'd be quite interested to see how it fits into the memory tagging support code. I tried to make it generic but when you've only got one implementation, you never know if it's truly flexible or not. | ||
| #endif | ||
| #ifndef PTRACE_POKEMTETAGS | ||
| #define PTRACE_POKEMTETAGS (PT_COMMAND_MAX+8) | ||
| #endif | ||
| #ifndef PTRACE_GETVRREGS | ||
| #define PTRACE_GETVRREGS (PT_COMMAND_MAX+9) | ||
| #endif | ||
| #ifndef PTRACE_GETVSRREGS | ||
| #define PTRACE_GETVSRREGS (PT_COMMAND_MAX+10) | ||
| #endif | ||
| | ||
| #endif // liblldb_Host_aix_Ptrace_h_ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -68,6 +68,10 @@ class RegisterContextUnwind : public lldb_private::RegisterContext { | |
| | ||
| bool ReadPC(lldb::addr_t &start_pc); | ||
| | ||
| #ifdef _AIX | ||
| bool ReadLR(lldb::addr_t &lr); | ||
| #endif | ||
| | ||
| Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's likely we'd ask you to make this a method on all platforms that is only called on, or implemented for, AIX. | ||
| // Indicates whether this frame *behaves* like frame zero -- the currently | ||
| // executing frame -- or not. This can be true in the middle of the stack | ||
| // above asynchronous trap handlers (sigtramp) for instance. | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory if you configure with
-DLLDB_ENABLE_LIBXML2=OFF, the libxml2 parts will be removed. Was something else being included despite that?