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.

1
  • 1
    Don't comment your own question for no reaseon, instead edit your question. Commented Apr 24, 2020 at 14:08

2 Answers 2

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
Sign up to request clarification or add additional context in comments.

Comments

0

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

2 Comments

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.
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.