-
Notifications
You must be signed in to change notification settings - Fork 13.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
685aa51
7b28aa5
34adb6d
4b0c484
c826a08
8e80b80
93c105a
9ba650f
174efe0
d58b833
a8e7f03
818e9d8
f494470
3db456b
e7203d5
0ec1cd0
85ae4f0
05e2848
11cb200
7660757
6ce2d11
19b9251
cbc8e39
07b5dbd
b0ef220
015f689
61ad7c9
97531f7
20bcb5b
f234a2a
5c0f06e
8dfafd4
0fd991b
01d9338
71d2fcf
a52d2f6
9a526a0
8045b92
c7d4eab
78d1671
8fcf69e
c3c2b32
a4f4d4a
af732be
40b4fbe
51fb774
252e0c0
585bd72
22cd1da
a66defe
38ce4a5
2a2d668
5551074
fd59a98
49d795f
f8b05df
57d080e
673713a
53037f1
4d15937
63e8df6
94c6c10
cdc31f3
713a6cb
0a706d2
84ebb4e
27e8a91
b6c1d8d
588e1c5
0a18186
6db1782
c334103
3bfb427
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
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) | ||
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 |
---|---|---|
|
@@ -67,6 +67,10 @@ class RegisterContextUnwind : public lldb_private::RegisterContext { | |
|
||
bool ReadPC(lldb::addr_t &start_pc); | ||
|
||
#ifdef _AIX | ||
bool ReadLR(lldb::addr_t &lr); | ||
#endif | ||
|
||
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?