This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/19436] New: C++11 ABI tag does not work


https://sourceware.org/bugzilla/show_bug.cgi?id=19436

            Bug ID: 19436
           Summary: C++11 ABI tag does not work
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: jan.kratochvil at redhat dot com
  Target Milestone: ---

It affects default configuration of latest stable release of GCC.



echo -e '#include <string>\nstd::string foovar;'|g++ -c -o 20.o -Wall -g -x c++
-;nm -C 20.o|grep -w foovar
0000000000000000 B foovar[abi:cxx11]
gdb -batch ./20.o -ex "p foovar" -ex "p 'foovar[abi:cxx11]'"

Actual results:
No symbol "foovar" in current context.
$1 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p
= 0x0 <__static_initialization_and_destruction_0(int, int)>}, _M_string_length
= 0, {_M_local_buf = '\000' <repeats 15 times>, _M_allocated_capacity = 0}}

Expected results:
$1 = ""
(I do not care what it should for the second print.)

One can use gcc -D_GLIBCXX_USE_CXX11_ABI=0 to get the old behavior.
One could also configure gcc for the old behavior with:
  --with-default-libstdcxx-abi=gcc4-compatible

GDB: b900245c3b92fc460a3f7fa17d14eb08f9ab4c76 7.10.50.20160107-git
FAIL: g++ (GCC) 5.3.1 20160107
FAIL: g++ (GCC) 6.0.0 20150530 (experimental)
I read it should affect already gcc-5.1 but I haven't verified that.

The pretty printing bug is probably in libstdc++ pretty printers, I do not make
that a subject of this PR.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]