在gdb中,如果我只是返回,它會重複上一條命令。有沒有辦法配置Sun/Oracle/Solaris dbx來做同樣的事情?有沒有辦法將dbx配置爲將空白命令作爲最後一個命令的重複處理?
3
A
回答
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) help gdb gdb (command) gdb on | off Use `gdb on' to enter the gdb command mode under which dbx will understand and accept gdb commands. To exit the gdb command mode and return to the dbx command mode, enter "gdb off". Please note that the dbx commands will not be accepted while in gdb command mode and vice versa. All debugging settings such as breakpoints are preserved across different command modes. The following gdb commands are not supported in the current release: - commands - define - handle - hbreak - interrupt - maintenance - printf - rbreak - return - signal - tcatch - until
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.
下看起來也似乎是另一種選擇「對GDB」這使得dbx的行爲像GDB。我還沒有嘗試過,因爲我現在無法訪問dbx,因此如果這適用於您,可以讓我知道。
相關問題
- 1. 有沒有辦法爲「DIR」命令轉義空格
- 2. 有沒有辦法從命令行配置Maven POM的版本?
- 3. 有沒有辦法在下一個命令前等待最後一條命令到GPU?
- 4. Hudson有沒有辦法控制人們從命令行配置?
- 5. 有沒有辦法配置neo4j shell來回顯命令
- 6. 在Bash的內置「讀取」命令中,有沒有辦法讓它接受空白作爲輸入
- 7. 有沒有辦法爲git命令默認設置一個標誌?
- 8. 有沒有辦法將一個AWS CLI命令的輸出作爲輸入流向另一個?
- 9. 爲什麼設置命令是空白
- 10. 作爲交易處理多個命令
- 11. 有沒有辦法將多個命令輸出複製到剪貼板?
- 12. 將代理/命令作爲參數傳遞給MVVM中的另一個命令
- 13. 有沒有辦法將SVG文件轉換爲HTML5的canvas兼容命令?
- 14. 將命令重命名爲不同的命名空間
- 15. LibGdx - 批處理沒有繪製最後的.draw命令
- 16. 有沒有辦法將代表命令綁定到圖像?
- 17. 有沒有辦法將參數傳遞給ant任務命令?
- 18. 有沒有辦法將命令本身寫入輸出文件?
- 19. 有沒有辦法將註釋放在unix命令行中?
- 20. 有沒有辦法將命令行參數讀入Gretl腳本?
- 21. 有沒有辦法將命令行參數傳遞給spec/rspec?
- 22. 錯誤 - 沒有爲命令對象設置命令文本
- 23. 沒有爲命令對象設置命令文本
- 24. 有沒有辦法爲vagrant provisioner使用puppet resource命令?
- 25. 有沒有辦法設置一個工作目錄「r和」 load命令
- 26. 是否有一個shell命令,將殺死所有的後臺處理尾
- 27. 有沒有辦法從Eclipse執行一個linux命令
- 28. 有沒有辦法讓JavaScript執行一個PHP命令?
- 29. 有沒有辦法將stdin重定向到windows終端(cmd.exe)中的「type」命令?
- 30. dbx元數據中有「AlterTable」命令?
這是關於dbx的SGI版本的dbx的Solaris/Sun/Oracle版本的問題嗎?我認爲有一種方法可以在Solaris Studio dbx中執行此操作,但我現在沒有辦法解決這個問題。您應該能夠使用谷歌搜索查找參考手冊。 –