Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
test-primops
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
test-primops
Merge requests
!13
Use an emulator (QEMU) to run "simple"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Use an emulator (QEMU) to run "simple"
wip/supersven/simple-with-emulator
into
master
Overview
0
Commits
1
Pipelines
2
Changes
2
Merged
Sven Tennie
requested to merge
wip/supersven/simple-with-emulator
into
master
1 year ago
Overview
0
Commits
1
Pipelines
2
Changes
2
Expand
This is useful for cross-platform development. Currently, the only targeted emulator is QEMU.
0
0
Merge request reports
Compare
master
version 1
1da370fe
1 year ago
master (base)
and
latest version
latest version
4b2b0dd1
1 commit,
1 year ago
version 1
1da370fe
1 commit,
1 year ago
2 files
+
28
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
simple/run.sh
+
20
−
7
Options
@@ -4,19 +4,32 @@ set -e -x
TEST_GHC
=
"
${
TEST_GHC
:-
ghc
}
"
CABAL
=
"
${
CABAL
:-
cabal
}
"
# QEMU executable
EMULATOR
=
"
${
EMULATOR
:-}
"
rm
-Rf
dist-newstyle
args
=(
"-w
$TEST_GHC
"
"--ghc-options=
$@
"
"--disable-optimization"
"-v3"
)
"
$CABAL
"
build
"
${
args
[@]
}
"
simple
exe
=
"
$(
"
$CABAL
"
list-bin
"
${
args
[@]
}
"
simple
)
"
"
$CABAL
"
build
"
${
args
[@]
}
"
-v3
simple
exe
=
$(
"
$CABAL
"
list-bin
"
${
args
[@]
}
"
simple
)
gdb
"
$exe
"
\
-ex
"break test"
\
-ex
"run"
\
-ex
"disassemble"
echo
"Using executable:
$exe
"
if
[
-n
$EMULATOR
]
;
then
$EMULATOR
-g
1111
$exe
&
gdb
\
-ex
"file
$exe
"
\
-ex
"break test"
\
-ex
"target remote localhost:1111"
\
-ex
"continue"
\
-ex
"disassemble"
else
gdb
"
$exe
"
\
-ex
"break test"
\
-ex
"run"
\
-ex
"disassemble"
fi
Loading