Unfortunately gVisor does not allow core dumps as far as I can tell.
Within gdb hello.dbg, after issuing run I see:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000405637 in __init_fds (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at libc/intrin/fds.c:117
117 fds->p[0].flags = O_RDONLY;
I can get:
$1 = (void (*)()) 0x405637 <__init_fds+1415>
from p $rip
That et command returns:
0x7ec98cf78620: 0x7ec98cf78640 0x4048f6 <_init_fds+16>
0x7ec98cf78640: 0x7ec98cf78650 0x4049f9 <cosmo+35>
0x7ec98cf78650: 0x0 0x4045f9 <_start+130>
but tool/cosmocc/bin/cosmoaddr2line o/examples/hello.dbg 0x405637 (run on the host machine)
responds with
error: addr2line failed
I'm copying a hello.dbg binary built on my host machine into this gVisor container as I cannot build the binary within the container because the current cosmo tools segfault in there.
Not sure this is much help! Thanks as ever for everyone's efforts in this project!