This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/17970] New: cannot call any function or method with "print" or "call"
- From: "Claude at renegat dot net" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 13 Feb 2015 10:30:06 +0000
- Subject: [Bug c++/17970] New: cannot call any function or method with "print" or "call"
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17970
Bug ID: 17970
Summary: cannot call any function or method with "print" or
"call"
Product: gdb
Version: 7.8
Status: NEW
Severity: critical
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: Claude at renegat dot net
Steps to reproduce
foo.cpp contains:
#include <iostream>
int main()
{
const char foo[] = "foo";
std::cout << "foo=" << foo << std::endl;
}
Then:
$ g++ -D_DEBUG -g -o foo foo.cpp
$ gdb --args ./foo
(gdb) b foo.cpp:6
(gdb) r
Starting program: /tmp/foo
Breakpoint 1, main () at foo.cpp:6
6 std::cout << "foo=" << foo << std::endl;
(gdb) p strlen(foo)
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
The program being debugged exited while in a function called from GDB.
Evaluation of the expression containing the function
(strlen) will be abandoned.
This occurs for *any* function or method call.
$ gdb --version
GNU gdb (Ubuntu 7.8-1ubuntu4) 7.8.0.20141001-cvs
$ uname -a
Linux pegasus 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:06:37 UTC 2015
x86_64 x86_64 x86_64 GNU/Linux
--
You are receiving this mail because:
You are on the CC list for the bug.