mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-22 05:45:51 +03:00
riscv-symbolic: Split 32-bit and 64-bit dump
CLIs
This commit is contained in:
parent
ba19e989ec
commit
cff4945385
@ -112,14 +112,29 @@ library
|
||||
Data.Macaw.RISCV.Symbolic.Panic
|
||||
Data.Macaw.RISCV.Symbolic.Repeat
|
||||
|
||||
executable macaw-riscv-dump
|
||||
executable macaw-riscv32-dump
|
||||
hs-source-dirs: tools
|
||||
main-is: Dump.hs
|
||||
main-is: Dump32.hs
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -Wcompat
|
||||
build-depends:
|
||||
base,
|
||||
containers,
|
||||
grift,
|
||||
macaw-dump,
|
||||
macaw-riscv,
|
||||
macaw-riscv-symbolic,
|
||||
macaw-symbolic
|
||||
|
||||
executable macaw-riscv64-dump
|
||||
hs-source-dirs: tools
|
||||
main-is: Dump64.hs
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -Wcompat
|
||||
build-depends:
|
||||
base,
|
||||
containers,
|
||||
grift,
|
||||
macaw-dump,
|
||||
macaw-riscv,
|
||||
macaw-riscv-symbolic,
|
||||
|
@ -8,11 +8,12 @@ import Data.Macaw.RISCV qualified as MR
|
||||
import Data.Macaw.RISCV.Symbolic ()
|
||||
import Data.Macaw.Symbolic qualified as MS
|
||||
import Data.Proxy (Proxy(..))
|
||||
import GRIFT.Types qualified as G
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
archVals <-
|
||||
case MS.archVals (Proxy @MR.RISCV) Nothing of
|
||||
case MS.archVals (Proxy @(MR.RISCV G.RV32GC)) Nothing of
|
||||
Just archVals -> pure archVals
|
||||
Nothing -> error "impossible"
|
||||
MD.main MR.riscv_info archVals MR.riscvPLTStubInfo
|
||||
MD.main (MR.riscv_info G.rv32GCRepr) archVals MR.riscvPLTStubInfo
|
19
macaw-riscv-symbolic/tools/Dump64.hs
Normal file
19
macaw-riscv-symbolic/tools/Dump64.hs
Normal file
@ -0,0 +1,19 @@
|
||||
{-# LANGUAGE ImportQualifiedPost #-}
|
||||
{-# LANGUAGE TypeApplications #-}
|
||||
|
||||
module Main (main) where
|
||||
|
||||
import Data.Macaw.Dump qualified as MD
|
||||
import Data.Macaw.RISCV qualified as MR
|
||||
import Data.Macaw.RISCV.Symbolic ()
|
||||
import Data.Macaw.Symbolic qualified as MS
|
||||
import Data.Proxy (Proxy(..))
|
||||
import GRIFT.Types qualified as G
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
archVals <-
|
||||
case MS.archVals (Proxy @(MR.RISCV G.RV64GC)) Nothing of
|
||||
Just archVals -> pure archVals
|
||||
Nothing -> error "impossible"
|
||||
MD.main (MR.riscv_info G.rv64GCRepr) archVals MR.riscvPLTStubInfo
|
Loading…
Reference in New Issue
Block a user