From c823c9af00385197defcdbbf003421ce34d5211e Mon Sep 17 00:00:00 2001 From: Valentin Robert Date: Fri, 5 Jan 2024 11:50:59 -0800 Subject: [PATCH] minor cleanups --- base/src/Data/Macaw/CFG/Core.hs | 2 +- base/src/Data/Macaw/Memory.hs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/base/src/Data/Macaw/CFG/Core.hs b/base/src/Data/Macaw/CFG/Core.hs index d372de12..72eadae1 100644 --- a/base/src/Data/Macaw/CFG/Core.hs +++ b/base/src/Data/Macaw/CFG/Core.hs @@ -316,7 +316,7 @@ instance Show (CValue arch tp) where -- and are immutable within that context (i.e. their value would not -- change from a memory write). data Value arch ids tp where - -- | A constant vlaue + -- | A constant value CValue :: !(CValue arch tp) -> Value arch ids tp -- | Value from an assignment statement. AssignedValue :: !(Assignment arch ids tp) diff --git a/base/src/Data/Macaw/Memory.hs b/base/src/Data/Macaw/Memory.hs index ad067c6d..d752a3a5 100644 --- a/base/src/Data/Macaw/Memory.hs +++ b/base/src/Data/Macaw/Memory.hs @@ -1287,9 +1287,10 @@ instance MemWidth w => Show (MemoryError w) where ------------------------------------------------------------------------ -- Reading contents --- | Return list of contents from given word or an error if this we can't cleanly --- partition a relocation --- due to a relocation. +-- | Return the memory contents from a given offset, that is, the `MemChunk` at +-- the given offset, then the following `MemChunk` until the end of the segment. +-- Returns a `MemoryError` if the requested offset falls within a relocation, +-- which we cannot partition. segoffContentsAfter :: MemWidth w => MemSegmentOff w -> Either (MemoryError w) [MemChunk w]