From 566f02b7b8de81f919e7ddd6035141c50d8e577d Mon Sep 17 00:00:00 2001 From: mnemonikr <138624285+mnemonikr@users.noreply.github.com> Date: Thu, 16 Oct 2025 11:51:19 -0700 Subject: [PATCH] Improve documentation around AddressSpaceId --- src/sleigh.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sleigh.rs b/src/sleigh.rs index 4a83496..6076c37 100644 --- a/src/sleigh.rs +++ b/src/sleigh.rs @@ -189,7 +189,9 @@ impl From<&sys::VarnodeData> for VarnodeData { } } -/// Address space identifier for an address space +/// Address space identifier for an address space. While this value is unique, it is **NOT** +/// guaranteed to be deterministically constructed. This means different instances of Sleigh may +/// identify the same address space with _different_ identifiers. #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct AddressSpaceId(usize); @@ -315,7 +317,9 @@ impl From for AddressSpaceType { } } -/// A pcode instruction +/// A pcode instruction. Interpreting the pcode instruction can require additional context in some +/// cases. For example, the [OpCode::Load] operation encodes the [AddressSpace] using the +/// [AddressSpaceId]. This identifier in particular may differ across Sleigh instances. #[derive(Clone, Debug, PartialEq, Eq)] pub struct PcodeInstruction { /// The originating address for this instruction. This information is necessary to include for