FS#64681 - [gcc] gdb SyntaxWarning
Attached to Project:
Arch Linux
Opened by Vanda Hendrychova (vanda) - Friday, 29 November 2019, 12:02 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Monday, 11 May 2020, 07:27 GMT
Opened by Vanda Hendrychova (vanda) - Friday, 29 November 2019, 12:02 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Monday, 11 May 2020, 07:27 GMT
|
Details
Description:
gdb shows a python SyntaxWarning when trying to run a program. The problem only occurs when using g++, not gcc. Demo: ~ gdb a.out GNU gdb (GDB) 8.3.1 Copyright (C) 2019 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-pc-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 a.out... (gdb) r Starting program: /home/vanda/a.out /usr/lib/../share/gcc-9.2.0/python/libstdcxx/v6/xmethods.py:731: SyntaxWarning: list indices must be integers or slices, not str; perhaps you missed a comma? refcounts = ['_M_refcount']['_M_pi'] [Inferior 1 (process 154956) exited normally] Additional info: There's a bug report on Redhat Bugzilla already. I am just wondering why it has not been fixed in archlinux yet. (https://bugzilla.redhat.com/show_bug.cgi?id=1749578) Steps to reproduce: 1) $ g++ hello.cpp -ggdb 2) $ gdb a.out 3) (gdb) r |
This task depends upon
Closed by Bartłomiej Piotrowski (Barthalion)
Monday, 11 May 2020, 07:27 GMT
Reason for closing: Fixed
Additional comments about closing: 10.1.0-1
Monday, 11 May 2020, 07:27 GMT
Reason for closing: Fixed
Additional comments about closing: 10.1.0-1
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f026ef8ff25 in raise () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7f017e82e700 (LWP 23925))]
/usr/lib/../share/gcc-9.2.0/python/libstdcxx/v6/xmethods.py:731: SyntaxWarning: list indices must be integers or slices, not str; perhaps you missed a comma?
refcounts = ['_M_refcount']['_M_pi']
(gdb)
I am not seeing https://github.com/gcc-mirror/gcc/commit/14c154f9534b17d548a79dc3b13c0680ac2c4d96 as applied
So if the fedora package fixed your issue it would appear be a different issue with a different fix.
BTW, I'm sure https://github.com/gcc-mirror/gcc/commit/14c154f9534b17d548a79dc3b13c0680ac2c4d96 is fixing this issue because of the log message from GDB. The syntax error exists in xmethods.py and the patch is fixing it. Looks like it makes gdb unable to load any information from C++ backtrace.