This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/16180] New: print iterator+1 = Attempt to take address of value not located in memory.
- From: "jan.kratochvil at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 17 Nov 2013 13:08:12 +0000
- Subject: [Bug c++/16180] New: print iterator+1 = Attempt to take address of value not located in memory.
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16180
Bug ID: 16180
Summary: print iterator+1 = Attempt to take address of value
not located in memory.
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: x86_64-unknown-linux-gnu
(gdb) b 8
(gdb) r
(gdb) p it
$1 = 1
(gdb) p it+1
Attempt to take address of value not located in memory.
(gdb) p it+longvar1
Attempt to take address of value not located in memory.
(gdb) p it.operator+(longvar1)
Attempt to take address of value not located in memory.
(gdb) p it.'operator+'(longvar1)
Attempt to take address of value not located in memory.
(gdb) _
GNU gdb (GDB) 7.6.50.20131109-cvs
#include <vector>
int main() {
std::vector<int> vec;
long longvar1(1);
vec.push_back(1);
vec.push_back(2);
for (std::vector<int>::iterator it=vec.begin();it!=vec.end();it=it+1)
++*it;
}
--
You are receiving this mail because:
You are on the CC list for the bug.