From owner-freebsd-bugs@freebsd.org Sat Oct 22 01:41:11 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 572C5C1B69C for ; Sat, 22 Oct 2016 01:41:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C43FA71 for ; Sat, 22 Oct 2016 01:41:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u9M1fBj8099256 for ; Sat, 22 Oct 2016 01:41:11 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 213696] gdb ignores breakpoints Date: Sat, 22 Oct 2016 01:41:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: gmarthe@inbos.com.au X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2016 01:41:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213696 Bug ID: 213696 Summary: gdb ignores breakpoints Product: Base System Version: 11.0-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: gmarthe@inbos.com.au CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org Hello, On FreeBSD 11-Release, gdb breakpoints do not seem to work. The following program: #include #include int main (int argc, char **argv) { fprintf (stderr, "hello bsd\n"); fprintf (stderr, "bye bsd\n"); } compiled as follows: cc -g -O0 gm2.c -o gm2 $ gdb gm2 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) break main Breakpoint 1 at 0x4007a9: file gm2.c, line 5. (gdb) run Starting program: /usr/home/gmarthe/c/gm2=20 hello bsd bye bsd Program exited normally. You can't do that without a process to debug. (gdb) quit I have the same results on FreeBSD-CURRENT, to be expected as that is the s= ame version of gdb. I'm new to BSD and so maybe I'm missing something here. I would expect thi= s to run as it does under Linux - see below: $ gdb gm2 GNU gdb (Debian 7.11.1-2) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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 "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from gm2...done. (gdb) break main Breakpoint 1 at 0x400545: file gm2.c, line 5. (gdb) run Starting program: /tmp/gm2=20 Breakpoint 1, main (argc=3D1, argv=3D0x7fffffffe5e8) at gm2.c:5 5 fprintf (stderr, "hello bsd\n"); (gdb) --=20 You are receiving this mail because: You are the assignee for the bug.=