[Bug 2106811] Re: Line info missing on multiarch build with MIPS
Fighter19
2106811 at bugs.launchpad.net
Fri Apr 11 12:14:23 UTC 2025
** Attachment added: "Executable file to reproduce the problem with"
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/2106811/+attachment/5871071/+files/a.out.xz
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/2106811
Title:
Line info missing on multiarch build with MIPS
Status in gdb package in Ubuntu:
New
Bug description:
Version: GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
File: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), statically linked, with debug_info, not stripped
Compiler used to create test file: gcc version 8.3.1 (Microchip XC32 Compiler v4.50)
While using gdb-multiarch with a MIPS ELF, created by Microchip's GCC fork (xc32),
line info only becomes available after having disassembled the function by function name.
(Address only won't work even though it correctly gets the scope of the function).
Line info however is already available with "normal" gdb.
Steps to reproduce:
Build a simple executable:
/opt/microchip/xc32/v4.50/bin/xc32-c++ -nostartfiles -nostdlib -g simple_main.c
Open file with gdb-multiarch:
gdb-multiarch ./a.out
Attempt to print line info:
info line *0x9d000020
Notice it doesn't work:
No line number information available for address 0x9d000020 <main+32>
Attempt to print line info by name:
info line main
See it works.
Reattempt to print line info by address:
Suddendly now it works.
GDB example output:
(gdb) info line *0x9d000020
No line number information available for address 0x9d000020 <main+32>
(gdb) info line main
Line 2 of "simple_main.c" starts at address 0x9d000000 <main(int, char**)> and ends at 0x9d000014 <main(int, char**)+20>.
(gdb) info line *0x9d000020
Line 5 of "simple_main.c" starts at address 0x9d000020 <main(int, char**)+32> and ends at 0x9d00002c <main(int, char**)+44>.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/2106811/+subscriptions
More information about the foundations-bugs
mailing list