Public bug reported: 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>. ** Affects: gdb (Ubuntu) Importance: Undecided Status: New ** Attachment added: "simple_main.c" https://bugs.launchpad.net/bugs/2106811/+attachment/5871050/+files/simple_main.c -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, 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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp