0

I can't understand why 'layout next' has stopped showing code. It worked for some time and i was happy with 'layout next' option but now i constantly see the error. Awkwardly enough i could find only one question relating that topic which doesn't seem to solve the problem. Any ideas how to bring this function back?

Maybe i should find some compilation flag to enable this?

EDIT:

Make sure you add -g flag on compilation and type run after 'layout next' window have appeared.

2 Answers2

2

No Source Available

The error means literally that: GDB doesn't know where the source for the current program location is.

There are several possible reasons:

  • you have not started the program yet
  • you built your program without debugging info (without -g flag)
  • you are stopped inside a system library
  • you moved the source to a different location after the program was built
Employed Russian
  • 199,314
  • 34
  • 295
  • 362
0

"you moved the source to a different location after the program was built",this works for me, thank you!

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 08 '23 at 20:03
  • Please don't add "thank you" as an answer. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation), you will be able to [vote up questions and answers](https://stackoverflow.com/help/privileges/vote-up) that you found helpful. - [From Review](/review/late-answers/34652810) – Chenmunka Jul 10 '23 at 22:25