mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-28 01:35:33 +03:00
Replace diassemble error with trace
This commit is contained in:
parent
953e607e0e
commit
e97e7c7f49
@ -215,6 +215,7 @@ printAddrBacktrace found_map addr rsn = do
|
||||
SplitAt src -> pp ("Split from read of " ++ show src ++ ".") : prev src
|
||||
InterProcedureJump src -> pp ("Reference from external address " ++ show src ++ ".") : prev src
|
||||
|
||||
|
||||
-- | Return true if this address was added because of the contents of a global address
|
||||
-- in memory initially.
|
||||
--
|
||||
@ -263,10 +264,11 @@ tryDisassembleAddr rsn addr ab = do
|
||||
case maybeError of
|
||||
Just e -> do
|
||||
when (not (cameFromUnsoundReason (s0^.foundAddrs) rsn)) $ do
|
||||
error $ "Failed to disassemble " ++ show e ++ "\n"
|
||||
++ unlines (printAddrBacktrace (s0^.foundAddrs) addr rsn)
|
||||
trace ("Failed to disassemble " ++ show e ++ "\n"
|
||||
++ unlines (printAddrBacktrace (s0^.foundAddrs) addr rsn)) $ pure ()
|
||||
Nothing -> do
|
||||
pure ()
|
||||
|
||||
assert (segmentIndex (addrSegment next_ip) == segmentIndex (addrSegment addr)) $ do
|
||||
assert (next_ip^.addrOffset > addr^.addrOffset) $ do
|
||||
let block_map = Map.fromList [ (labelIndex (blockLabel b), b) | b <- bs ]
|
||||
|
Loading…
Reference in New Issue
Block a user