Skip to content

Commit

Permalink
[lldb][AIX] Adding AIX version of ptrace64 (llvm#120390)
Browse files Browse the repository at this point in the history
This PR is in reference to porting LLDB on AIX.

Link to discussions on llvm discourse and github:

1. https://discourse.llvm.org/t/port-lldb-to-ibm-aix/80640
2. llvm#101657
The complete changes for porting are present in this draft PR:
llvm#102601

Adding changes for minimal build for lldb binary on AIX. ptrace64 is
needed to debug 64-bit AIX debuggee, and its format is different than
the traditional ptrace on other platforms: [AIX
ptrace](https://www.ibm.com/docs/en/aix/7.3?topic=p-ptrace-ptracex-ptrace64-subroutine)
  • Loading branch information
DhruvSrivastavaX authored Dec 20, 2024
1 parent c2bd5c2 commit cf0bc8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lldb/source/Host/posix/ProcessLauncherPosixFork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ struct ForkLaunchInfo {
}

// Start tracing this child that is about to exec.
#ifdef _AIX
if (ptrace64(PT_TRACE_ME, 0, 0, 0, nullptr) == -1)
#else
if (ptrace(PT_TRACE_ME, 0, nullptr, 0) == -1)
#endif
ExitWithError(error_fd, "ptrace");
}

Expand Down

0 comments on commit cf0bc8d

Please sign in to comment.