GDB ignores my breakpoints

后端 未结 3 1122
小鲜肉
小鲜肉 2021-01-17 17:36

My test case is so simple that I must be doing something very stupid. I wrote a simple source file test.c:

#include

int main(int         


        
3条回答
  •  难免孤独
    2021-01-17 18:13

    I had this same problem. It was intermittent and drove me nuts. Then I found I did a dumb thing. I had been running the program from the command line, and it had a bunch of arguments.

    So, I copied the command line with the mouse-copy-paste buffer.

    Then started: gdb Program

    Then did: break man

    Then did: -PASTE-FROM-MOUSE-

    It never stopped, until I realized that I had pasted too much of the command line: "--option=c ... |& tee LOG"

    It looked like an intermittent problem, until I realized it was a brain bug. Hope this helps someone. The command line redirect - did something in GDB, no clue what (other than ignore breakpoints).

提交回复
热议问题