GDB でレジスタを表示するときに (gdb) info register rax # もしくは i r rax としていたが、レジスタは変数としても参照可能なことを知った。頭に $ をつけるだけ。 (gdb) print/x $rax 変数として参照できるので、操作の度に自動でレジスタを表示する display コマンドを設定する事が可能。 (gdb) display $rax また register をポインタに cast してごにょごにょとかも可能。 (gdb) print/x ((intptr_t*)$rax)[1] $1 = 0x415a2c .gdbinit # http://0xcc.net/blog/archives/000126.html set history save on set history size 10000 set history filename ~/.