LoginSignup
2
1

More than 5 years have passed since last update.

gdbについてまとめてみました

Last updated at Posted at 2018-08-04

業務でgdbを使う機会が最近あったので書いてみます。

コマンドは略称で覚える

コマンドは、breakpointだったりcontinueと打つと効率が悪いので略称で覚えたほうが効率が良いです。
breakpointはbで打てますし、continueはcで打てます。

TUIモードがなんだかんだ最強

gdbはデフォルトだと見づらいので、TUIモードで使うと見やすいです。
wh というコマンドを打つと呼び出せます。ただこのモードは頻繁に画面が崩れるのでCntr + Lで画面を再描画しないといけません。pythonであれば、GDB Dashboardを入れると最高だと思います。

gdbinitで設定を弄るべき

gdbには、起動時に読み込むgdbinitファイルがあるのでコマンドをdefineでまとめたり設定をここに書きましょう。githubに僕のdotfileをあげているので見てください。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1