Created
July 28, 2012 11:29
-
-
Save master-q/3192919 to your computer and use it in GitHub Desktop.
newCAFの第三引数は何者なのか?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) b newCAF | |
Breakpoint 1 at 0x69c15c: file rts/sm/Storage.c, line 353. | |
(gdb) run +RTS -V0 | |
Starting program: /home/kiwamu/src/DiveIntoRTS/Main +RTS -V0 | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". | |
Breakpoint 1, newCAF (reg=0x94ee18, caf=0x90c8a0, bh=0x7ffff6c04000) at rts/sm/Storage.c:353 | |
353 if (lockCAF(caf,bh) == 0) return 0; | |
(gdb) l | |
348 } | |
349 | |
350 StgWord | |
351 newCAF(StgRegTable *reg, StgClosure *caf, StgClosure *bh) | |
352 { | |
353 if (lockCAF(caf,bh) == 0) return 0; | |
354 | |
355 if(keepCAFs) | |
356 { | |
357 // HACK: | |
(gdb) print bh | |
$1 = (StgClosure *) 0x7ffff6c04000 | |
(gdb) print *bh | |
$4 = {header = {info = 0x6a65f8}, payload = 0x7ffff6c04008} | |
(gdb) x 0x6a65f8 | |
0x6a65f8 <stg_CAF_BLACKHOLE_info>: 0xfffee3e9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ごめん。勘違いだった。そうか。bhはinfoではなくて、closureか!