0

When I use the gdb, it can't work as fllow:(gdb) break 73

Breakpoint 2 at 0x100000f35: file a.cpp, line 73.
(gdb) r
Starting program: /Users/caochenglong/Documents/pro/acm/nowcoder/a.o
[New Thread 0x180b of process 25344]
[New Thread 0x2503 of process 25344]
During startup program terminated with signal SIGTRAP, Trace/breakpoint trap.
(gdb) q

How to fix it? Thanks!

Innocent
  • 17
  • 5
  • How do you created executable ? I hope you did correctly. run first `g++ -g test.cpp` and then run `gdb a.out -q` and then do `run` inside `gdb` – Achal Mar 24 '18 at 10:32
  • Are you sure that `a.o` is an executable file and not an object file? – user7860670 Mar 24 '18 at 10:33
  • 1
    If you are on mac, then this is duplicate of https://stackoverflow.com/q/49001329/72178. – ks1322 Mar 24 '18 at 10:34

0 Answers0