This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Debugging with multiple sections in assembly files.


Hi,

The attached tar contains source and a Makefile for two test programs.
One program includes an assembly file with two functions in the default
.text section, and the other contains a file with one function in .text
and another in a section 'foo'. With the first program gdb is able to
find the source for the assembly functions, for the other it is not:

(gdb) info line bar
Line 3 of "test_nosections.S" starts at address 0x400490 <bar> and ends
at 0x400491 <bling>.
---
(gdb) info line bar
No line number information available for address 0x400490 <bar>

The problem appears to be that in the case of the multi section asm file
gcc doesn't emit DW_AT_low_pc and DW_AT_high_pc for the assembly file
compile unit (try 'make dwarf.diff') because they don't make much sense
in that case. This means that gdb doesn't load the dwarf symbols for
that file and hence can't find source line information (as shown by
running 'info sources' before and after 'info line bar' -- try 'make
all').

Is this a known issue? Can it be fixed easily?

I tested with fairly recent gdb and gcc, but not latest HEAD versions.

Thanks,

Robert

Attachment: asm_gdb.tar.gz
Description: asm_gdb.tar.gz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]