gdb では、return キーを押すと、最後のコマンドが繰り返されます。Sun/Oracle/Solaris dbx を同様に構成する方法はありますか?
2 に答える
2
これには $repeatmode を使用できるようです。dbx-guideから以下を取得しました
Repeating Commands
You can execute any of the commands contained in the history list. Each
history command begins with an exclamation point (!):
!! Repeats the previous command. If the value of the dbx
variable $repeatmode is set to 1, then entering a carriage
return at an empty line is equivalent to executing !!. By
default, $repeatmode is set to 0.
また、dbx を gdb のように動作させる別のオプション「gdb on」があるようです。私は現在 dbx にアクセスできないため、どちらも試していません。
于 2012-05-31T13:21:09.700 に答える
2
dbx で「gdb モード」を有効にすることで、その動作を得ることができます。
(dbx) gdb on
(dbx) step
stopped in main at line 4 in file "t.c"
4 printf("world");
(dbx)
step
stopped in main at line 5 in file "t.c"
5 printf("!");
(dbx)
step
stopped in main at line 6 in file "t.c"
6 printf("\n");
(dbx)
step
helloworld!
stopped in main at line 7 in file "t.c"
7 }
これは、最新の dbx からの gdb モードのヘルプです。
(dbx) ヘルプ gdb gdb (コマンド) gdb で | オフ 「gdb on」を使用して、dbx が認識できる gdb コマンド モードに入ります。 gdb コマンドを受け入れます。gdb コマンド モードを終了して dbx に戻るには コマンド モードで、「gdb off」と入力します。dbx コマンドは実行されないことに注意してください。 gdb コマンド モードでは受け入れられ、その逆も同様です。すべてのデバッグ設定 ブレークポイントなどは、さまざまなコマンド モードで保持されます。の 次の gdb コマンドは、現在のリリースではサポートされていません。 - コマンド - 定義 - ハンドル - hbreak - 中断 - メンテナンス -printf -rbreak - リターン - シグナル - tcatch - まで
于 2012-06-05T16:28:55.510 に答える