Bug 68448 - Python Pretty Printers get disabled on libstdc++ reload by GDB
Summary: Python Pretty Printers get disabled on libstdc++ reload by GDB
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-19 20:18 UTC by Jan Kratochvil
Modified: 2015-11-20 19:12 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-11-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2015-11-19 20:18:59 UTC
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230621 138bc75d-0d04-0410-961f-82ee72b054a4

echo -e '#include <vector>\nint main(){std::vector<int> l;\nreturn 0;}'|g++ -g -Wall -x c++ -;gdb -q ./a.out -batch -ex 'b 3' -ex r -ex 'p l' -ex r -ex 'p l'

Actual:
[...]
$1 = std::vector of length 0, capacity 0
[...]
$2 = {<std::_Vector_base<int, std::allocator<int> >> = {_M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}

Expected:
[...]
$1 = std::vector of length 0, capacity 0
[...]
$2 = std::vector of length 0, capacity 0
Comment 1 Jan Kratochvil 2015-11-19 20:21:46 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1279406
Comment 2 Jan Kratochvil 2015-11-19 20:23:08 UTC
[patch] Python Pretty Printers get disabled on libstdc++ reload by GDB (PR libstdc++/68448)
https://gcc.gnu.org/ml/gcc-patches/2015-11/msg02418.html
Comment 3 Jonathan Wakely 2015-11-20 02:47:36 UTC
Thanks for figuring out the problem, this has been annoying me recently but I didn't know what caused it.

Please CC the patch to the libstdc++ list (I'm not subscribed to gcc-patches).

N.B. this reverts https://gcc.gnu.org/r215726 so we should look back at why that change was made.
Comment 4 jkratoch 2015-11-20 19:01:23 UTC
Author: jkratoch
Date: Fri Nov 20 19:00:51 2015
New Revision: 230669

URL: https://gcc.gnu.org/viewcvs?rev=230669&root=gcc&view=rev
Log:
	PR libstdc++/68448
	* python/hook.in: Call register_libstdcxx_printers.
	* python/libstdcxx/v6/__init__.py: Wrap it to
	register_libstdcxx_printers.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/python/hook.in
    trunk/libstdc++-v3/python/libstdcxx/v6/__init__.py
Comment 5 jkratoch 2015-11-20 19:10:48 UTC
Author: jkratoch
Date: Fri Nov 20 19:10:12 2015
New Revision: 230670

URL: https://gcc.gnu.org/viewcvs?rev=230670&root=gcc&view=rev
Log:
	PR libstdc++/68448
	* python/hook.in: Call register_libstdcxx_printers.
	* python/libstdcxx/v6/__init__.py: Wrap it to
	register_libstdcxx_printers.

Modified:
    branches/gcc-5-branch/libstdc++-v3/ChangeLog
    branches/gcc-5-branch/libstdc++-v3/python/hook.in
    branches/gcc-5-branch/libstdc++-v3/python/libstdcxx/v6/__init__.py
Comment 6 Jan Kratochvil 2015-11-20 19:12:13 UTC
Checked in trunk and 5.x.