Control: reassign -1 gcc-14
On Friday, January 16 2015, Mathieu Malaterre wrote:
Control: found -1 7.7.1+dfsg-5
Still present in jessie:
$ wget "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=d2.c;att=1;bug=730630"
$ gcc -o demo -g d2.c
$ gdb ./demo
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 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 "x86_64-linux-gnu".
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 ./demo...done.
(gdb) b main
Breakpoint 1 at 0x4004d0: file d2.c, line 16.
(gdb) r
Starting program: /tmp/demo
Breakpoint 1, main (argc=1, argv=0x7fffffffe918) at d2.c:16
(gdb) list
Line number 16 out of range; d2.c has 11 lines.
GDB's output nowadays is better:
--8<---------------cut here---------------start------------->8---
(gdb) r
Starting program: /root/demo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, main (argc=1, argv=0x7fffffffec28) at d2.c:16
(gdb) list
End of the file was already reached, use "list ." to list the current location again
--8<---------------cut here---------------end--------------->8---
Still, one can see that GDB thinks the breakpoint hit on line 16, which
is wrong. But GDB is only following what DWARF is telling it:
--8<---------------cut here---------------start------------->8---
<2><6a>: Abbrev Number: 5 (DW_TAG_variable)
<6b> DW_AT_name : v
<6d> DW_AT_decl_file : 1
<6e> DW_AT_decl_line : 16
<6f> DW_AT_decl_column : 7
<70> DW_AT_type : <0x78>
<74> DW_AT_location : 2 byte block: 91 6c (DW_OP_fbreg: -20) --8<---------------cut here---------------end--------------->8---
GCC is the one emitting bogus DW_AT_decl_line information here.
Therefore, I'm reassigning this bug to GCC.
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/
--=-=-Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEI3pUsQKHKL8A7zH00Ot2KGX8XjYFAmiG2hEACgkQ0Ot2KGX8 XjZ0fw/9GoC58ivxGAqyo1HsKOaQFedWch3kygDlEU0tur4ZiEplMlnN8/Py4Cmd Jigzs8bwzK+A1ud6h47u33qJHj8u9RGApMdYe8OXPW89gkHCc7mRPGZM/dymYJ5W lA2a1zpBUoJRo7Q4yW44G3jHv10H5agjsUTt6KeKutjd7wyxFh3yDFWKYGvkmaXP s3UUUh/VHtupo/D+/SQOiMH6SsRurG16KtNpTkqt/SzLSUXPLmi851JHGuKpPOmb MlEKvSLMB/HwnNC9COUIXt0qpZYGJCzE24Y3y69LMdc+zeU2t6rsuVm21NH1nfZ3 kQYW8p8xC+KgKskBZ1rHaqSQf1qESyg1kbDtqAJ685HEBTWEN+yTIhTeElB0lDdh S/rWzjueIoa17EU5bdadza5A8XJ71aRvQvugD2PgEDEju1+LvkBMf3oypDx4KWck h6zSTaU1zf7ryl8owXBGjy7927pAClGYrT7dsbfZ1L+JonwoBcXwj2YkV2GxR7eS hmCwUIhcBXpSGReCVdveYgXHuKJa5W+mHWdvQ55F1zTi70UeuxsUJq1Pa9QEcbsS FXwmJtSNLcLUtjTWUo7VxpA/ZCO6sBg/FGBy6hqik4h6HVzU9VlR2XoPB2x3pBQ5 eW3AEG8GoDSiyQ+j/nzENebNcR5jRG5HGmKdz1lISuBdHzxNxP