Skip to content

Commit

Permalink
x86-symbolic: Add function to extract message from exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett committed Jan 24, 2024
1 parent d1ba6e4 commit f1e25e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions x86_symbolic/src/Data/Macaw/X86/Crucible.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module Data.Macaw.X86.Crucible

-- * Instruction interpretation
, MissingSemantics(..)
, missingSemanticsMessage
, funcSemantics
, stmtSemantics
, termSemantics
Expand Down Expand Up @@ -139,6 +140,14 @@ data MissingSemantics

instance Exception MissingSemantics

-- | Create a human-readable message from a 'MissingSemantics' exception.
missingSemanticsMessage :: MissingSemantics -> String
missingSemanticsMessage =
\case
MissingPrimFnSemantics msg -> msg
MissingStmtSemantics msg -> msg
MissingTermSemantics msg -> msg

stmtSemantics
:: (IsSymInterface sym, HasLLVMAnn sym, ?memOpts :: MemOptions)
=> SymFuns sym
Expand Down

0 comments on commit f1e25e9

Please sign in to comment.