贊助廠商

娛樂城推薦

首頁

刊登資訊

  • 刊登者:匿名
  • 時間:2021-06-05 05:10:08

尚未解答C/C++- GDB 使用start命令的中斷點?

C/C++- GDB 使用start命令的中斷點?

開發平台(Platform): (Ex: Win10, Linux, ...)
Ubuntu 20.04

編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
GNU gdb 7.6.1

額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)


問題(Question):
因為之前都是先放breakpoint在main,然後直接run。

最近開始使用start命令來跑,在官網上看start指令的效用為

The ‘start’ command does the equivalent of setting a temporary breakpoint
at the beginning of the main procedure and then invoking the ‘run’ command.

看起來跟我原先的用法相同,但我使用start作為開始後產生的中斷點卻無法在

info breakpoint中看到,有大大知道為甚麼嗎???

餵入的資料(Input):
gdb ./a.out
start

預期的正確結果(Expected Output):
Num Type Disp Enb Address What
1 breakpoint keep y 0x004045f9 in main at xc.c:1290

錯誤結果(Wrong Output):
No breakpoints or watchpoints.

程式碼(Code):(請善用置底文網頁, 記得排版,禁止使用圖檔)


補充說明(Supplement):
在這個網站找到相關說明
https://undo.io/resources/gdb-watchpoint/5-ways-reduce-debugging-hours/

Tip: Using the start command instead of the usual run command sets a
temporary breakpoint at main().


--

0個答案 C/C++- GDB 使用start命令的中斷點?

其他問題

友站連結