[Lldb-commits] [lldb] [lldb] [NFC] [by AI] Add class documentation for the `PlugIn` base classes (PR #188619)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 26 03:53:59 PDT 2026
================
@@ -16,6 +16,37 @@
namespace lldb_private {
+/// \class Architecture Architecture.h "lldb/Core/Architecture.h"
+/// An abstract base class for architecture-specific behavior overrides.
+///
+/// Architecture plugins provide hooks to customize LLDB's behavior for
+/// specific CPU architectures in ways that go beyond the ABI. While ABI
+/// plugins handle calling conventions and register layouts, Architecture
+/// plugins handle architecture-specific quirks in:
+///
+/// - Instruction semantics (e.g., ARM IT blocks, delay slots)
+/// - Address manipulation (e.g., Thumb bit, pointer authentication)
+/// - Breakpoint placement (e.g., adjusting breakpoint addresses)
+/// - Function prologue handling (e.g., multiple entry points)
+/// - Stack unwinding customization
+/// - Memory tagging extensions (e.g., ARM MTE, SPARC ADI)
+/// - Dynamic register reconfiguration (e.g., SVE vector length changes)
+///
+/// Architecture plugins are typically selected based on the target's
+/// architecture and are instantiated as needed. Unlike ABI plugins which
+/// are tied to a process, Architecture plugins can be used in various
+/// contexts throughout LLDB.
+///
+/// The plugin is selected via PluginManager callbacks, typically when
+/// creating a Target or during execution context setup. Multiple architecture
+/// plugins may be registered, and the first one that supports the given
+/// ArchSpec will be used.
----------------
DavidSpickett wrote:
Most of this is just how plugins in general work. For instance, the first plugin to say "yes I can handle this file format" handles the program file. So I would not include this.
If a reader really cares, they can start from the very root of the plugin classes and learn about this there.
https://github.com/llvm/llvm-project/pull/188619
More information about the lldb-commits
mailing list