3. Enjoy your world… • Example: (gdb) p 1 + 2 + abs(-‐3) (gdb) p strcmp("VIVOTEK", "AXIS") (gdb) x/s getenv(“HOME”) (gdb) p (char*)getenv("HOME") (gdb) p (char)*getenv("HOME") (gdb) p printf("%d\n", 12345678)
close terminal (e.g., PuTTY, iTerm,...) Conventional solution GNU Screen / Tmux nohup GDB solution $ gdb [program] [pid] (gdb) handle SIGHUP nopass (gdb) continue (gdb) handle SIGHUP Signal Stop Print Pass to program Description SIGHUP Yes Yes Yes Hangup (gdb) handle SIGHUP nopass Signal Stop Print Pass to program Description SIGHUP Yes Yes No Hangup Program received signal SIGHUP, Hangup. 0x0000003ac7a954e0 in __nanosleep_nocancel () from /lib64/libc.so.6 (gdb) Continuing.