mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-12-28 08:34:23 +03:00
[refinement] Enable PPC testing.
This commit is contained in:
parent
3eeaed08a2
commit
290e33279a
@ -54,7 +54,11 @@ library
|
|||||||
, lens
|
, lens
|
||||||
, macaw-base
|
, macaw-base
|
||||||
, macaw-loader
|
, macaw-loader
|
||||||
|
, macaw-loader-ppc
|
||||||
|
, macaw-loader-x86
|
||||||
|
, macaw-ppc
|
||||||
, macaw-symbolic
|
, macaw-symbolic
|
||||||
|
, macaw-ppc-symbolic
|
||||||
, mtl
|
, mtl
|
||||||
, parameterized-utils
|
, parameterized-utils
|
||||||
, prettyprinter
|
, prettyprinter
|
||||||
@ -92,6 +96,7 @@ executable run-refinement
|
|||||||
, macaw-loader-x86
|
, macaw-loader-x86
|
||||||
, macaw-loader-ppc
|
, macaw-loader-ppc
|
||||||
, macaw-ppc
|
, macaw-ppc
|
||||||
|
, macaw-ppc-symbolic
|
||||||
, macaw-refinement
|
, macaw-refinement
|
||||||
, macaw-symbolic
|
, macaw-symbolic
|
||||||
, macaw-x86
|
, macaw-x86
|
||||||
@ -124,6 +129,7 @@ test-suite test-refinements
|
|||||||
, macaw-loader-x86
|
, macaw-loader-x86
|
||||||
, macaw-loader-ppc
|
, macaw-loader-ppc
|
||||||
, macaw-ppc
|
, macaw-ppc
|
||||||
|
, macaw-ppc-symbolic
|
||||||
, macaw-refinement
|
, macaw-refinement
|
||||||
, macaw-symbolic
|
, macaw-symbolic
|
||||||
, macaw-x86
|
, macaw-x86
|
||||||
|
@ -55,7 +55,8 @@ import Data.Macaw.BinaryLoader.X86 ()
|
|||||||
import Data.Macaw.CFG as MC
|
import Data.Macaw.CFG as MC
|
||||||
import qualified Data.Macaw.Discovery as MD
|
import qualified Data.Macaw.Discovery as MD
|
||||||
import qualified Data.Macaw.Memory.ElfLoader as ML
|
import qualified Data.Macaw.Memory.ElfLoader as ML
|
||||||
-- import Data.Macaw.PPC
|
import Data.Macaw.PPC
|
||||||
|
import Data.Macaw.PPC.Symbolic ()
|
||||||
import Data.Macaw.Refinement
|
import Data.Macaw.Refinement
|
||||||
import qualified Data.Macaw.Symbolic as MS
|
import qualified Data.Macaw.Symbolic as MS
|
||||||
import qualified Data.Macaw.X86 as MX86
|
import qualified Data.Macaw.X86 as MX86
|
||||||
@ -69,8 +70,8 @@ import qualified Data.Set as Set
|
|||||||
import Data.Tagged
|
import Data.Tagged
|
||||||
import Data.Typeable ( Typeable )
|
import Data.Typeable ( Typeable )
|
||||||
import Options.Applicative
|
import Options.Applicative
|
||||||
-- import qualified SemMC.Architecture.PPC32 as PPC32
|
import qualified SemMC.Architecture.PPC32 as PPC32
|
||||||
-- import qualified SemMC.Architecture.PPC64 as PPC64
|
import qualified SemMC.Architecture.PPC64 as PPC64
|
||||||
import System.Directory ( doesFileExist )
|
import System.Directory ( doesFileExist )
|
||||||
import System.FilePath ( (</>), (<.>) )
|
import System.FilePath ( (</>), (<.>) )
|
||||||
import qualified System.FilePath as FP
|
import qualified System.FilePath as FP
|
||||||
@ -251,20 +252,20 @@ testExpected useRefinement expFile testinp beVerbose readBinary = do
|
|||||||
where
|
where
|
||||||
withElf64 elf =
|
withElf64 elf =
|
||||||
case E.elfMachine elf of
|
case E.elfMachine elf of
|
||||||
-- E.EM_PPC64 -> do
|
E.EM_PPC64 -> do
|
||||||
-- bin <- MBL.loadBinary @PPC64.PPC ML.defaultLoadOptions elf
|
bin <- MBL.loadBinary @PPC64.PPC ML.defaultLoadOptions elf
|
||||||
-- let pli = ppc64_linux_info bin
|
let pli = ppc64_linux_info bin
|
||||||
-- withBinaryDiscoveredInfo testinp useRefinement expFile pli bin
|
withBinaryDiscoveredInfo testinp useRefinement expFile pli bin
|
||||||
E.EM_X86_64 ->
|
E.EM_X86_64 ->
|
||||||
withBinaryDiscoveredInfo testinp useRefinement expFile MX86.x86_64_linux_info =<<
|
withBinaryDiscoveredInfo testinp useRefinement expFile MX86.x86_64_linux_info =<<
|
||||||
MBL.loadBinary @MX86.X86_64 ML.defaultLoadOptions elf
|
MBL.loadBinary @MX86.X86_64 ML.defaultLoadOptions elf
|
||||||
m -> error $ "no 64-bit ELF support for " ++ show m
|
m -> error $ "no 64-bit ELF support for " ++ show m
|
||||||
withElf32 elf =
|
withElf32 elf =
|
||||||
case E.elfMachine elf of
|
case E.elfMachine elf of
|
||||||
-- E.EM_PPC -> do
|
E.EM_PPC -> do
|
||||||
-- bin <- MBL.loadBinary @PPC32.PPC ML.defaultLoadOptions elf
|
bin <- MBL.loadBinary @PPC32.PPC ML.defaultLoadOptions elf
|
||||||
-- let pli = ppc32_linux_info bin
|
let pli = ppc32_linux_info bin
|
||||||
-- withBinaryDiscoveredInfo testinp useRefinement expFile pli bin
|
withBinaryDiscoveredInfo testinp useRefinement expFile pli bin
|
||||||
m -> error $ "no 32-bit ELF support for " ++ show m
|
m -> error $ "no 32-bit ELF support for " ++ show m
|
||||||
|
|
||||||
withBinaryDiscoveredInfo :: ( X.MonadThrow m
|
withBinaryDiscoveredInfo :: ( X.MonadThrow m
|
||||||
|
@ -21,6 +21,7 @@ import Data.Macaw.CFG ( ArchAddrWidth )
|
|||||||
import qualified Data.Macaw.Discovery as MD
|
import qualified Data.Macaw.Discovery as MD
|
||||||
import qualified Data.Macaw.Memory.ElfLoader as ML
|
import qualified Data.Macaw.Memory.ElfLoader as ML
|
||||||
import Data.Macaw.PPC
|
import Data.Macaw.PPC
|
||||||
|
import Data.Macaw.PPC.Symbolic ()
|
||||||
import qualified Data.Macaw.Refinement as MR
|
import qualified Data.Macaw.Refinement as MR
|
||||||
import Data.Macaw.Symbolic ( SymArchConstraints )
|
import Data.Macaw.Symbolic ( SymArchConstraints )
|
||||||
import qualified Data.Macaw.X86 as MX86
|
import qualified Data.Macaw.X86 as MX86
|
||||||
|
Loading…
Reference in New Issue
Block a user