gdb: how to print the current line or find the current line number?

后端 未结 5 1694
渐次进展
渐次进展 2020-12-23 02:56

list commands prints a set of lines, but I need one single line, where I am and where an error has probably occurred.

5条回答
  •  梦毁少年i
    2020-12-23 03:12

    I do get the same information while debugging. Though not while I am checking the stacktrace. Most probably you would have used the optimization flag I think. Check this link - something related.

    Try compiling with -g3 remove any optimization flag. Then it might work. HTH!

提交回复
热议问题