[llvm] [llvm] [Triple] Add QNX Neutrino RTOS to llvm::Triple (PR #97417)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 06:30:38 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Ayush Sahay (ayushsahay1837)
<details>
<summary>Changes</summary>
This change adds the _QNX Neutrino Real-Time Operating System_ to _llvm::Triple_, and is the first in a series of changes that look to facilitate remote debug of _AArch64_ targets on _QNX_.
_QNX Neutrino Real-Time Operating System_ is a commercial Unix-like real-time operating system primarily targeting the embedded systems market including automotive, medical devices, robotics, transportation, and industrial embedded systems.
The series of changes in question looks to provision support for –
- Launching a debuggee
- Attaching to a debuggee
- Having the debuggee come up stopped at the entry point
- Setting breakpoints
- Stopping at breakpoints
- Reading/writing contents of/to the debuggee's memory
- Reading/writing contents of/to the debuggee's registers
- Reading/writing contents of/to the debuggee's variables
- Resuming the debuggee's execution
- Single-stepping the debuggee's execution
- Interrupting the debuggee's execution
- Dumping information pertaining to the debuggee's stack trace
Kindly note that _ptrace_ isn't available on QNX. Instead, _devctl_ can be leveraged to observe and control the execution of a process under debug on _QNX_.
Any additional support (including the facilitation of execution of tests) will be the subject of future work.
---
Full diff: https://github.com/llvm/llvm-project/pull/97417.diff
2 Files Affected:
- (modified) llvm/include/llvm/TargetParser/Triple.h (+2-1)
- (modified) llvm/lib/TargetParser/Triple.cpp (+2)
``````````diff
diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h
index b3bb354b38ff5..c4fe640d9e4c9 100644
--- a/llvm/include/llvm/TargetParser/Triple.h
+++ b/llvm/include/llvm/TargetParser/Triple.h
@@ -239,7 +239,8 @@ class Triple {
LiteOS,
Serenity,
Vulkan, // Vulkan SPIR-V
- LastOSType = Vulkan
+ QNX, // BlackBerry QNX
+ LastOSType = QNX
};
enum EnvironmentType {
UnknownEnvironment,
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index 4fc1ff5aaa051..8542ff0744408 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -302,6 +302,7 @@ StringRef Triple::getOSTypeName(OSType Kind) {
case LiteOS: return "liteos";
case XROS: return "xros";
case Vulkan: return "vulkan";
+ case QNX: return "qnx";
}
llvm_unreachable("Invalid OSType");
@@ -682,6 +683,7 @@ static Triple::OSType parseOS(StringRef OSName) {
.StartsWith("liteos", Triple::LiteOS)
.StartsWith("serenity", Triple::Serenity)
.StartsWith("vulkan", Triple::Vulkan)
+ .StartsWith("qnx", Triple::QNX)
.Default(Triple::UnknownOS);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/97417
More information about the llvm-commits
mailing list