summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci.debugger/scripts/hist002.script
blob: 01982071921a3c3af77492173e2f1b39dd71f4f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
:l Test3.hs
-- set a break on the [] case in map
:b 1
-- trace an execution
:tr mymap (+1) [1,2]
:hist
:back
:show bindings
:back
:show bindings
:force _result
-- Run a GC so the BLACKHOLE indirection for _result (the AP_STACK) is removed,
-- ensuring _result now points directly to the value (in this case, the integer
-- 3).  This will be tagged, so we are checking that the pointer isn't naively
-- dereferenced to generate an unaligned load.
System.Mem.performGC
:back
:forward
-- at this point, we can't retrieve the bindings because _result (the AP_STACK)
-- was evaluated previously.  GHCi should not crash, preferably.