GDB/CGDB shows only assembly

matanspada

New Member
Joined
Aug 29, 2022
Messages
7
Reaction score
0
Credits
61
When debugging with CGDB, it shows assembly + source code
and with GDB its shows only assembly.
What should I do to see only source code?

Currently I'm compiling with:
gcc -ansi -pedantic-errors -Wall -Wextra -g
 

Attachments

  • Screenshot from 2023-02-16 11-30-19.png
    Screenshot from 2023-02-16 11-30-19.png
    161.1 KB · Views: 87
Last edited:


Hmmm, that’s really unusual.
Whenever I’ve compiled C programs and debugged them in gdb or cgdb, I only see the source code for my files. And sometimes I’ll see assembly if step inside a call to something in a library that I don’t have the debugging symbols for.

What parameters are you passing to gdb/cgdb when you start them?
 
I am not sending any parameters.

There is one more thing worth noting.
I recently installed ZSH and oh-my-zsh.
Although before the installation I did not check if CGDB/GDB work normally.
 

Staff online


Top