Improve failure message.

This commit is contained in:
Iavor Diatchki 2018-03-01 14:36:24 -08:00
parent da2a29b595
commit 9094d1bd91

View File

@ -74,7 +74,11 @@ doGetGlobal ::
)
doGetGlobal st mvar globs addr =
case Map.lookup (M.addrBase addr) globs of
Nothing -> fail ("[doGetGlobal] Undefined global region: " ++ show addr)
Nothing -> fail $ unlines
[ "[doGetGlobal] Undefined global region:"
, "*** Region: " ++ show (M.addrBase addr)
, "*** Address: " ++ show addr
]
Just region ->
do mem <- getMem st mvar
let sym = stateSymInterface st