1
votes

When you debug C/C++ code in gdb, you can for example use list command to see source file you are debugging. But if you introduce assembly function(s) and try to list source, gdb does not see it. "Info sources" also sees only C files.

I know I can disassemble the code, but I'd like to see source with comments and so on. I have checked the object file corresponding to assembly source and the name of source file isn't even recorded there (it is for C files).

Is this behavior by design? Am I missing some flags?

1

1 Answers

4
votes

Just as compilers require a flag to have debugging info produced, so do assemblers. Not knowing what assembler you are using, I couldn't say just what flag(s) you'd need.