Debugging with gdb not showing line numbers

Revision en2, by weakestOsuPlayer_244, 2020-08-18 11:02:06

Hello everyone. I was trying to learn how GDB works and learn about debugging.

While trying to set breakpoint on main function I saw that it's not displaying the line number in decimal.

So I looked up a bit and found that one needs to include the -g flag while compiling the cpp file.

I did that and yet it doesn't show the line numbers in decimal. (Thereafter I tried to search this up but couldn't get the issue resolved)

My GDB version is 7.6.1 (probably latest for windows)

/predownloaded/8d/0a/8d0a5948c9858daaff1dd4d3a1b5e5b7242ff2dd.jpg

If someone can help me out with this it would be much appreciated.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English weakestOsuPlayer_244 2020-08-18 12:56:41 125
en3 English weakestOsuPlayer_244 2020-08-18 11:05:29 86
en2 English weakestOsuPlayer_244 2020-08-18 11:02:06 270 (published)
en1 English weakestOsuPlayer_244 2020-08-18 10:59:53 402 Initial revision (saved to drafts)