Re: GDB can not read debug symbols
Orlando Arias <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Greetings,
As asked in IRC, here is some more debug information obtained from GDB
as the file is opened, a connection to the remote stub is established, a
breakpoint is set, execution is triggered and stepping inside main() is
attempted. These logs are provided as an attachment. I am not entirely
sure what I am looking at here, but it seems that GDB is not populating
line numbers for some of the compilation units, although the data is
available.
Any help would be appreciated. Thank you.
Cheers,
Orlando.
On 09/29/2015 05:36 PM, Orlando Arias wrote:
> Greetings,
>
> I am experimenting with the msp430-elf port of gdb (7.10) and it seems
> it is not reading debugging symbols gcc (5.2.0) is issuing.
>
> The test program is:
>
> #include <msp430.h>
>
> __attribute__((noreturn)) void main() {
> WDTCTL = WDTPW | WDTHOLD;
> P1DIR = 0xff;
> P1OUT = 0xff;
> while(1) {
> __delay_cycles(2500000);
> P1OUT ^= 0xff;
> }
> }
>
> And it is compiled with:
>
> $msp430-elf-gcc -g -O0 -mmcu=msp430f2013 test.c -o test.elf
>
> readelf reports:
>
> CU: ./test.c:
> File name Line number Starting address
> hello.c 5 0xf924
> hello.c 6 0xf924
>
> hello.c 7 0xf92a
>
> hello.c 8 0xf92e
>
> hello.c 12 0xf932
>
> hello.c 13 0xf94e
>
> hello.c 14 0xf95c
>
>
> When testing the program on hardware through mspdebug
>
> $ msp430-elf-gdb ./test.elf
> GNU gdb (GDB) 7.10
> Copyright (C) 2015 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "--host=x86_64-unknown-linux-gnu
> --target=msp430-elf".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from ./test.elf...done.
> (gdb) target remote :1234
> (gdb) break main
> Breakpoint 1 at 0xf924
> (gdb) cont
> Continuing.
>
> Breakpoint 1, 0x0000f924 in main ()
> (gdb) step
> Single stepping until exit from function main,
> which has no line number information.
>
> At this point, gdb singlesteps forever, unable to trace through the
> program. However, if compiling the program using
>
> $ msp430-elf-gcc -gstabs -O0 -mmcu=msp430f2013 test.c -o test.elf
>
> readelf no longer reports any line number information, but GDB works as
> intended. Attached is the linker script being used. Thank you.
>
> Cheers,
> Orlando.
>
gdb_readelf_dump
(text/plain, 22.9 KB)
$ msp430-elf-gdb ./test.elf
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=msp430-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./test.elf...sf->sym_new_init (test.elf)
sf->sym_init (test.elf)
sf->sym_offsets (test.elf, 0x2595ec0)
sf->sym_read (test.elf, 0x6)
qf->has_symbols (test.elf) = 0
sf->sym_read_psymbols (test.elf)
Building psymtabs of objfile /home/tron/src/workspace/msp430/test/test.elf ...
Reading .debug_info for /home/tron/src/workspace/msp430/test/test.elf
Reading comp unit at offset 0x0
Read die from .debug_info@0xb of /home/tron/src/workspace/msp430/test/test.elf:
Die: DW_TAG_compile_unit (abbrev 1, offset 0xb)
has children: FALSE
attributes:
DW_AT_stmt_list (DW_FORM_data4) constant: 0
DW_AT_ranges (DW_FORM_data4) constant: 0
DW_AT_name (DW_FORM_string) string: "../../../../../libgloss/msp430/crt0.S" (not canonicalized)
DW_AT_comp_dir (DW_FORM_string) string: "/home/tron/src/pkgbuilds/msp430-elf-newlib/src/newlib-2.2.0.20150824/newlib-build/msp430-elf/430/libgloss/msp430" (not canonicalized)
DW_AT_producer (DW_FORM_string) string: "GNU AS 2.25.1" (not canonicalized)
DW_AT_language (DW_FORM_data2) constant: 32769
Processing actual line 60: file 1, address 0xf810, is_stmt 1, discrim 0
Processing actual line 60: file 1, address 0xf814, is_stmt 1, discrim 0
Processing actual line 223: file 1, address 0xf81e, is_stmt 1, discrim 0
Processing actual line 224: file 1, address 0xf822, is_stmt 1, discrim 0
Processing actual line 225: file 1, address 0xf826, is_stmt 1, discrim 0
Processing actual line 226: file 1, address 0xf828, is_stmt 1, discrim 0
Processing actual line 231: file 1, address 0xf82c, is_stmt 1, discrim 0
Processing actual line 232: file 1, address 0xf830, is_stmt 1, discrim 0
Processing actual line 233: file 1, address 0xf834, is_stmt 1, discrim 0
Processing actual line 234: file 1, address 0xf836, is_stmt 1, discrim 0
Processing actual line 239: file 1, address 0xf83a, is_stmt 1, discrim 0
Processing actual line 240: file 1, address 0xf83e, is_stmt 1, discrim 0
Processing actual line 241: file 1, address 0xf842, is_stmt 1, discrim 0
Processing actual line 242: file 1, address 0xf846, is_stmt 1, discrim 0
Processing actual line 245: file 1, address 0xf84a, is_stmt 1, discrim 0
Processing actual line 246: file 1, address 0xf84c, is_stmt 1, discrim 0
Processing actual line 247: file 1, address 0xf84e, is_stmt 1, discrim 0
Processing actual line 248: file 1, address 0xf850, is_stmt 1, discrim 0
Processing actual line 249: file 1, address 0xf852, is_stmt 1, discrim 0
Processing actual line 250: file 1, address 0xf854, is_stmt 1, discrim 0
Processing actual line 253: file 1, address 0xf858, is_stmt 1, discrim 0
Processing actual line 253: file 1, address 0xf85a, is_stmt 1, discrim 0
Processing actual line 266: file 1, address 0xfa52, is_stmt 1, discrim 0
Processing actual line 266: file 1, address 0xfa56, is_stmt 1, discrim 0
Psymtab for comp unit @0x0: 0xf810 - 0xfa56, 0 global, 0 static syms
Reading comp unit at offset 0xbb
Read die from .debug_info@0xc6 of /home/tron/src/workspace/msp430/test/test.elf:
Die: DW_TAG_compile_unit (abbrev 1, offset 0xc6)
has children: FALSE
attributes:
DW_AT_producer (DW_FORM_strp) string: "GNU C11 5.2.0 -mmcu=msp430f2013 -g -O0" (not canonicalized)
DW_AT_language (DW_FORM_data1) constant: 12
DW_AT_name (DW_FORM_strp) string: "test.c" (not canonicalized)
DW_AT_comp_dir (DW_FORM_strp) string: "/home/tron/src/workspace/msp430/test" (not canonicalized)
DW_AT_low_pc (DW_FORM_addr) address: 0xf924
DW_AT_high_pc (DW_FORM_data4) constant: 60
DW_AT_stmt_list (DW_FORM_sec_offset) section offset: 222
Psymtab for comp unit @0xbb: 0xf924 - 0xf960, 1 global, 2 static syms
Reading comp unit at offset 0x13a
Read die from .debug_info@0x145 of /home/tron/src/workspace/msp430/test/test.elf:
Die: DW_TAG_compile_unit (abbrev 1, offset 0x145)
has children: FALSE
attributes:
DW_AT_stmt_list (DW_FORM_data4) constant: 362
DW_AT_low_pc (DW_FORM_addr) address: 0xf814
DW_AT_high_pc (DW_FORM_addr) address: 0xf81e
DW_AT_name (DW_FORM_string) string: "../../../../../libgloss/msp430/crt0.S" (not canonicalized)
DW_AT_comp_dir (DW_FORM_string) string: "/home/tron/src/pkgbuilds/msp430-elf-newlib/src/newlib-2.2.0.20150824/newlib-build/msp430-elf/430/libgloss/msp430" (not canonicalized)
DW_AT_producer (DW_FORM_string) string: "GNU AS 2.25.1" (not canonicalized)
DW_AT_language (DW_FORM_data2) constant: 32769
Processing actual line 194: file 1, address 0xf814, is_stmt 1, discrim 0
Processing actual line 196: file 1, address 0xf818, is_stmt 1, discrim 0
Processing actual line 197: file 1, address 0xf81a, is_stmt 1, discrim 0
Processing actual line 197: file 1, address 0xf81e, is_stmt 1, discrim 0
Psymtab for comp unit @0x13a: 0xf814 - 0xf81e, 0 global, 0 static syms
Reading comp unit at offset 0x1f5
Read die from .debug_info@0x200 of /home/tron/src/workspace/msp430/test/test.elf:
Die: DW_TAG_compile_unit (abbrev 1, offset 0x200)
has children: FALSE
attributes:
DW_AT_stmt_list (DW_FORM_data4) constant: 459
DW_AT_ranges (DW_FORM_data4) constant: 20
DW_AT_name (DW_FORM_string) string: "../../../../../libgloss/msp430/crtn.S" (not canonicalized)
DW_AT_comp_dir (DW_FORM_string) string: "/home/tron/src/pkgbuilds/msp430-elf-newlib/src/newlib-2.2.0.20150824/newlib-build/msp430-elf/430/libgloss/msp430" (not canonicalized)
DW_AT_producer (DW_FORM_string) string: "GNU AS 2.25.1" (not canonicalized)
DW_AT_language (DW_FORM_data2) constant: 32769
Processing actual line 18: file 1, address 0xfa48, is_stmt 1, discrim 0
Processing actual line 19: file 1, address 0xfa4c, is_stmt 1, discrim 0
Processing actual line 20: file 1, address 0xfa50, is_stmt 1, discrim 0
Processing actual line 20: file 1, address 0xfa52, is_stmt 1, discrim 0
Processing actual line 26: file 1, address 0xfa5a, is_stmt 1, discrim 0
Processing actual line 26: file 1, address 0xfa5c, is_stmt 1, discrim 0
Psymtab for comp unit @0x1f5: 0xfa48 - 0xfa5c, 0 global, 0 static syms
DWP file not found: /home/tron/src/workspace/msp430/test/test.elf.dwp
Type unit statistics:
0 TUs
0 uniq abbrev tables
0 symtabs from stmt_list entries
0 symtab sharers
0 type units without a stmt_list
0 all_type_units reallocs
Done building psymtabs of /home/tron/src/workspace/msp430/test/test.elf
qf->has_symbols (test.elf) = 1
done.
probes->sym_get_probes (test.elf) = 0x25ac560
probes->sym_get_probes (test.elf) = 0x25ac560
qf->lookup_symbol (test.elf, 0, "main", VAR_DOMAIN)
Reading comp unit at offset 0xbb
Read die from .debug_info@0xc6 of /home/tron/src/workspace/msp430/test/test.elf:
Die: DW_TAG_compile_unit (abbrev 1, offset 0xc6)
has children: FALSE
attributes:
DW_AT_producer (DW_FORM_strp) string: "GNU C11 5.2.0 -mmcu=msp430f2013 -g -O0" (not canonicalized)
DW_AT_language (DW_FORM_data1) constant: 12
DW_AT_name (DW_FORM_strp) string: "test.c" (not canonicalized)
DW_AT_comp_dir (DW_FORM_strp) string: "/home/tron/src/workspace/msp430/test" (not canonicalized)
DW_AT_low_pc (DW_FORM_addr) address: 0xf924
DW_AT_high_pc (DW_FORM_data4) constant: 60
DW_AT_stmt_list (DW_FORM_sec_offset) section offset: 222
Read die from .debug_info@0xe0 of /home/tron/src/workspace/msp430/test/test.elf:
Die: DW_TAG_base_type (abbrev 2, offset 0xe0)
parent at offset: 0xc6
has children: FALSE
attributes:
DW_AT_byte_size (DW_FORM_data1) constant: 2
DW_AT_encoding (DW_FORM_data1) constant: 7
DW_AT_name (DW_FORM_strp) string: "unsigned int" (not canonicalized)
Expanding one or more symtabs of objfile /home/tron/src/workspace/msp430/test/test.elf ...
Expanding symtab of CU at offset 0xbb
Done expanding CU at offset 0xbb
Done expanding symtabs of /home/tron/src/workspace/msp430/test/test.elf.
qf->lookup_symbol (...) = test.c
(gdb) target remote :1234
Remote debugging using :1234
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 1)
Reading comp unit at offset 0x0
Read die from .debug_info@0xb of /home/tron/src/workspace/msp430/test/test.elf:
Die: DW_TAG_compile_unit (abbrev 1, offset 0xb)
has children: FALSE
attributes:
DW_AT_stmt_list (DW_FORM_data4) constant: 0
DW_AT_ranges (DW_FORM_data4) constant: 0
DW_AT_name (DW_FORM_string) string: "../../../../../libgloss/msp430/crt0.S" (not canonicalized)
DW_AT_comp_dir (DW_FORM_string) string: "/home/tron/src/pkgbuilds/msp430-elf-newlib/src/newlib-2.2.0.20150824/newlib-build/msp430-elf/430/libgloss/msp430" (not canonicalized)
DW_AT_producer (DW_FORM_string) string: "GNU AS 2.25.1" (not canonicalized)
DW_AT_language (DW_FORM_data2) constant: 32769
Expanding one or more symtabs of objfile /home/tron/src/workspace/msp430/test/test.elf ...
Expanding symtab of CU at offset 0x0
Processing actual line 60: file 1, address 0xf810, is_stmt 1, discrim 0
Recording line 60, file crt0.S, address 0xf810
Processing actual line 60: file 1, address 0xf814, is_stmt 1, discrim 0
Finishing current line, file crt0.S, address 0xf814
Recording line 0, file crt0.S, address 0xf814
Processing actual line 223: file 1, address 0xf81e, is_stmt 1, discrim 0
Recording line 223, file crt0.S, address 0xf81e
Processing actual line 224: file 1, address 0xf822, is_stmt 1, discrim 0
Recording line 224, file crt0.S, address 0xf822
Processing actual line 225: file 1, address 0xf826, is_stmt 1, discrim 0
Recording line 225, file crt0.S, address 0xf826
Processing actual line 226: file 1, address 0xf828, is_stmt 1, discrim 0
Recording line 226, file crt0.S, address 0xf828
Processing actual line 231: file 1, address 0xf82c, is_stmt 1, discrim 0
Recording line 231, file crt0.S, address 0xf82c
Processing actual line 232: file 1, address 0xf830, is_stmt 1, discrim 0
Recording line 232, file crt0.S, address 0xf830
Processing actual line 233: file 1, address 0xf834, is_stmt 1, discrim 0
Recording line 233, file crt0.S, address 0xf834
Processing actual line 234: file 1, address 0xf836, is_stmt 1, discrim 0
Recording line 234, file crt0.S, address 0xf836
Processing actual line 239: file 1, address 0xf83a, is_stmt 1, discrim 0
Recording line 239, file crt0.S, address 0xf83a
Processing actual line 240: file 1, address 0xf83e, is_stmt 1, discrim 0
Recording line 240, file crt0.S, address 0xf83e
Processing actual line 241: file 1, address 0xf842, is_stmt 1, discrim 0
Recording line 241, file crt0.S, address 0xf842
Processing actual line 242: file 1, address 0xf846, is_stmt 1, discrim 0
Recording line 242, file crt0.S, address 0xf846
Processing actual line 245: file 1, address 0xf84a, is_stmt 1, discrim 0
Recording line 245, file crt0.S, address 0xf84a
Processing actual line 246: file 1, address 0xf84c, is_stmt 1, discrim 0
Recording line 246, file crt0.S, address 0xf84c
Processing actual line 247: file 1, address 0xf84e, is_stmt 1, discrim 0
Recording line 247, file crt0.S, address 0xf84e
Processing actual line 248: file 1, address 0xf850, is_stmt 1, discrim 0
Recording line 248, file crt0.S, address 0xf850
Processing actual line 249: file 1, address 0xf852, is_stmt 1, discrim 0
Recording line 249, file crt0.S, address 0xf852
Processing actual line 250: file 1, address 0xf854, is_stmt 1, discrim 0
Recording line 250, file crt0.S, address 0xf854
Processing actual line 253: file 1, address 0xf858, is_stmt 1, discrim 0
Recording line 253, file crt0.S, address 0xf858
Processing actual line 253: file 1, address 0xf85a, is_stmt 1, discrim 0
Finishing current line, file crt0.S, address 0xf85a
Recording line 0, file crt0.S, address 0xf85a
Processing actual line 266: file 1, address 0xfa52, is_stmt 1, discrim 0
Recording line 266, file crt0.S, address 0xfa52
Processing actual line 266: file 1, address 0xfa56, is_stmt 1, discrim 0
Finishing current line, file crt0.S, address 0xfa56
Recording line 0, file crt0.S, address 0xfa56
Done expanding CU at offset 0x0
Done expanding symtabs of /home/tron/src/workspace/msp430/test/test.elf.
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
__crt0_start () at ../../../../../libgloss/msp430/crt0.S:60
60 mov_ #__stack, R1
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
(gdb) break main
qf->expand_symtabs_matching (test.elf, 0x0, 0x5281d0, 0x0, ALL_DOMAIN, 0x7ffff16ab030)
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x2550270, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x2550270, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x2550270, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x2550270, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x2550270, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x2550270, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x2550270, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
Breakpoint 1 at 0xf924
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
(gdb) cont
Continuing.
qf->find_pc_sect_compunit_symtab (test.elf, 0x25aee88, 0xf810, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = ../../../../../libgloss/msp430/crt0.S
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
Breakpoint 1, 0x0000f924 in main ()
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
(gdb) step
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
Single stepping until exit from function main,
which has no line number information.
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf92a, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf92a, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf92a, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf92e, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf92e, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf92e, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf932, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf932, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf932, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf934, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
qf->find_pc_sect_compunit_symtab (test.elf, 0x25af1e8, 0xf924, 0x0, 0)
qf->find_pc_sect_compunit_symtab (...) = test.c
(gdb) maintenance info symtabs
{ objfile /home/tron/src/workspace/msp430/test/test.elf ((struct objfile *) 0x2547a60)
{ ((struct compunit_symtab *) 0x25d3ec0)
debugformat DWARF 2
producer GNU AS 2.25.1
dirname /home/tron/src/pkgbuilds/msp430-elf-newlib/src/newlib-2.2.0.20150824/newlib-build/msp430-elf/430/libgloss/msp430
blockvector ((struct blockvector *) 0x25d4070)
{ symtab ../../../../../libgloss/msp430/crt0.S ((struct symtab *) 0x25d3f40)
fullname /home/tron/src/pkgbuilds/msp430-elf-newlib/src/newlib-2.2.0.20150824/libgloss/msp430/crt0.S
linetable ((struct linetable *) 0x25d4120)
}
}
{ ((struct compunit_symtab *) 0x2550ba0)
debugformat DWARF 2
producer GNU C11 5.2.0 -mmcu=msp430f2013 -g -O0
dirname /home/tron/src/workspace/msp430/test
blockvector ((struct blockvector *) 0x25d3e60)
{ symtab test.c ((struct symtab *) 0x2550c20)
fullname (null)
linetable ((struct linetable *) 0x0)
}
{ symtab /usr/msp430-elf/include/msp430f2013.h ((struct symtab *) 0x2550c60)
fullname (null)
linetable ((struct linetable *) 0x0)
}
}
}
$ readelf --debug-dump=decodedline test.elf
Decoded dump of debug contents of section .debug_line:
CU: ../../../../../libgloss/msp430/crt0.S:
File name Line number Starting address
crt0.S 60 0xf810
crt0.S 223 0xf81e
crt0.S 224 0xf822
crt0.S 225 0xf826
crt0.S 226 0xf828
crt0.S 231 0xf82c
crt0.S 232 0xf830
crt0.S 233 0xf834
crt0.S 234 0xf836
crt0.S 239 0xf83a
crt0.S 240 0xf83e
crt0.S 241 0xf842
crt0.S 242 0xf846
crt0.S 245 0xf84a
crt0.S 246 0xf84c
crt0.S 247 0xf84e
crt0.S 248 0xf850
crt0.S 249 0xf852
crt0.S 250 0xf854
crt0.S 253 0xf858
crt0.S 266 0xfa52
CU: ./test.c:
File name Line number Starting address
test.c 5 0xf924
test.c 6 0xf924
test.c 7 0xf92a
test.c 8 0xf92e
test.c 12 0xf932
test.c 13 0xf94e
test.c 14 0xf95c
CU: ../../../../../libgloss/msp430/crt0.S:
File name Line number Starting address
crt0.S 194 0xf814
crt0.S 196 0xf818
crt0.S 197 0xf81a
CU: ../../../../../libgloss/msp430/crtn.S:
File name Line number Starting address
crtn.S 18 0xfa48
crtn.S 19 0xfa4c
crtn.S 20 0xfa50
crtn.S 26 0xfa5a
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWDBuOAAoJEKwbU4ENrwN1YwEQAK7qCnZuXgqgcizUHohoQMoT 96I1sMyWDj5cnssCiFb1GU5AEPBPLZ14xRx0K3o2y4z8VfP3yqeWv5tNxI2X5sOw MFKnJo3yOVlkvhjuPmKyjAlAaR2ivWTC3Xx75EgJb5cM8uSUmdf6q7/IrZMtAVKR VrngkjtIhuyuJY5bWuE/Z0Djj32iBn5r5u3vDi5fSc2GuJHLBTB70rEbqiHSzp78 2aLIXmiUZqNPpA4heNezQ19hwFM3tfHzCT03Uw/piT6M02GPlHBugT3dBh4n5EZ1 sZmwbFgb23VXpE4rTNirC623um2qVJ+5JAhPuvje2l3aEwsECRgmGSoLzZFQTAn6 xQC2RCz9BpY7qNmlkvJE9OnQ1BDa1R19ZuDe0mFODF7KOPRJoH5IFeMYeJX6SrGB vWoQcXgbQGQok0RCePEk/i7eNEwnNvrR1vLeJA6NmWPSc79G7rv0uBFBaT6UN84D uSNRDqJBt5Se7vXt2FTw9RLxi8Lvz/NlIFV51PS3CbZCuAfLCcvMSIsAAlKuSE4g d97znzDGo6QKdBS9jNnxNto8xC/dXn0tiaBFC09j3eUDwviWr6d7lJRbES2g5QRc 5QY46Ko2qy/WKq2K75WbuM1QC8pL7wkeBe5TpIVs5WA3okhXFfmKt85S0OD7hXMz omeKkUqNrd8gO+/s+dQh =ehq9 -----END PGP SIGNATURE-----