We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GDB を使って低レイヤプログラムをデバッグする際に便利なテクニックを集める。
condition コマンドを使うと, break コマンドで作成したブレークポイントに対し条件を付けられる。 スタックポインタのアライメントが 16 の倍数でない場合にブレークするには次のようにする。
condition
break
condition <bnum> ((unsigned long)$rsp & 0xf) != 0
<bnum> はブレークポイント番号。GDB において $rsp は void* 型の扱いなので,整数にキャストしないとビット演算ができない。
<bnum>
$rsp
void*