From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11678 invoked by alias); 13 Feb 2015 10:30:09 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 11651 invoked by uid 48); 13 Feb 2015 10:30:08 -0000 From: "Claude at renegat dot net" To: gdb-prs@sourceware.org Subject: [Bug c++/17970] New: cannot call any function or method with "print" or "call" Date: Fri, 13 Feb 2015 15:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.8 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: Claude at renegat dot net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00230.txt.bz2 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 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.