This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/16866] New: Gdb does not show actual STL types on AIX 5.2/5.3
- From: "krzysztof.treyderowski at lhsystems dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 22 Apr 2014 09:38:36 +0000
- Subject: [Bug c++/16866] New: Gdb does not show actual STL types on AIX 5.2/5.3
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16866
Bug ID: 16866
Summary: Gdb does not show actual STL types on AIX 5.2/5.3
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: krzysztof.treyderowski at lhsystems dot com
GDB compiled with python enabled feature. Version 7.7 compiled with gcc 4.4.5
(on 4.7.2 same result).
Compilation unit:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string str = "some string";
cout << "str = " << str << endl;
vector<double> vect;
vect.push_back(1.0);
vect.push_back(5.5);
vect.push_back(10.5);
cout << "ending ..." << endl;
return 0;
}
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Compiled with -g or -ggdb3 (same result for both settings).
Result of debugging:
~/GDB/bin/bin/gdb ./main
GNU gdb (GDB) 7.7
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 "powerpc-ibm-aix5.2.0.0".
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 ./main..
(gdb) break 19
Breakpoint 1 at 0x10000690: file main.cc, line 19.
(gdb) run
Starting program: /u/U297980/main
str = some string
ending ...
Breakpoint 1, main () at main.cc:19
19 return 0;
(gdb) print str
$1 = {static npos = <error reading variable: No global symbol "_ZNSs4nposE".>0,
_M_dataplus = {<allocator> = {<new_allocator> = {<No data fields>}, <No data
fields>}, _M_p = 0x20000e44 "some string"}}
(gdb) print vect
$2 = {<_Vector_base> = {_M_impl = {<allocator> = {<new_allocator> = {<No data
fields>}, <No data fields>}, _M_start = 0x20000e88, _M_finish = 0x20000ea0,
_M_end_of_storage = 0x20000ea8}}, <No data fields>}
(gdb)
In comparison with debugging on Debian Linux (GCC 4.7.2, GDB 7.4.1-debian):
(gdb) print str
$1 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p
= 0x804c014 "some string"}}
(gdb) print vect
$2 = {<std::_Vector_base<double, std::allocator<double> >> = {_M_impl =
{<std::allocator<double>> = {<__gnu_cxx::new_allocator<double>> = {<No data
fields>}, <No data fields>}, _M_start = 0x804c050,
_M_finish = 0x804c068, _M_end_of_storage = 0x804c070}}, <No data fields>}
Difference: allocator exact type is different.
Main reason why I'm filing this bug is that on AIX5.2/5.3, gdb with
python-enabled pretty printers does not work. I suspect, that these pretty
printers do not work because of above problem.
--
You are receiving this mail because:
You are on the CC list for the bug.