I want to see below code in gdb

Please write your question in detail here.
I'm studying pwn based on the "Security Contest Challenge Book", but when using gdb, sometimes I can't see the code below.
The environment I am using is running Ubuntu using VB on windows10.

Error message
"-------- code ----------" "Display various information of current execution context" appears below and is displayed below it The code and stack fields that should be displayed are not displayed
Applicable source code

After downloading and executing the sample code of the book, it worked fine.
However, after a while, the situation was the same again, so I asked if the settings were wrong.

Supplemental information (FW/tool version etc.)

Please provide more detailed information here.