How to debug using gdb?

后端 未结 5 1614
悲哀的现实
悲哀的现实 2020-11-22 01:16

I am trying to add a breakpoint in my program using

b {line number}

but I am always getting an error that says:

No symbol t         


        
5条回答
  •  忘掉有多难
    2020-11-22 01:59

    You need to tell gdb the name of your executable file, either when you run gdb or using the file command:

    $ gdb a.out
    

    or

    (gdb) file a.out
    

提交回复
热议问题