diff --git a/x86_symbolic/macaw-x86-symbolic.cabal b/x86_symbolic/macaw-x86-symbolic.cabal index 4a1b55b5..2c887b51 100644 --- a/x86_symbolic/macaw-x86-symbolic.cabal +++ b/x86_symbolic/macaw-x86-symbolic.cabal @@ -39,6 +39,19 @@ library ghc-prof-options: -O2 -fprof-auto-top default-extensions: NoStarIsType +executable macaw-x86-dump + hs-source-dirs: tools + main-is: Dump.hs + default-language: Haskell2010 + ghc-options: -Wall -Wcompat + build-depends: + base, + containers, + macaw-x86, + macaw-x86-symbolic, + macaw-dump, + macaw-symbolic + test-suite macaw-x86-symbolic-tests type: exitcode-stdio-1.0 default-language: Haskell2010 diff --git a/x86_symbolic/tools/Dump.hs b/x86_symbolic/tools/Dump.hs new file mode 100644 index 00000000..00502955 --- /dev/null +++ b/x86_symbolic/tools/Dump.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE ImportQualifiedPost #-} +{-# LANGUAGE TypeApplications #-} + +module Main (main) where + +import Data.Macaw.Dump qualified as MD +import Data.Macaw.Symbolic qualified as MS +import Data.Macaw.X86 qualified as MX +import Data.Macaw.X86.Symbolic () +import Data.Proxy (Proxy(..)) + +main :: IO () +main = do + archVals <- + case MS.archVals (Proxy @MX.X86_64) Nothing of + Just archVals -> pure archVals + Nothing -> error "impossible" + MD.main MX.x86_64_linux_info archVals MX.x86_64PLTStubInfo