gdb memo
callコマンドで関数を実行できる。
例) innodbのrecordの情報を出力する
(1)ブレークポイントを設定
break rec_init_offsets
(2)ブレークしたらデバッグ用の関数を実行
call rec_print(stderr, rec, index) continue
これでmysqlのerrファイル(mysqlhome/varにある)に出力される
出力例)
PHYSICAL RECORD: n_fields 6; compact format; info bits 0 0: len 4; hex 80000001; asc ;; 1: len 6; hex 000000000302; asc ;; 2: len 7; hex 800000002d0110; asc - ;; 3: len 4; hex 80000001; asc ;; 4: len 4; hex 80000000; asc ;; 5: len 1; hex 41; asc A;;