From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17672 invoked by alias); 24 Jul 2012 14:45:41 -0000 Received: (qmail 17653 invoked by uid 22791); 24 Jul 2012 14:45:38 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from imr4.ericy.com (HELO imr4.ericy.com) (198.24.6.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Jul 2012 14:45:23 +0000 Received: from eusaamw0711.eamcs.ericsson.se ([147.117.20.178]) by imr4.ericy.com (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id q6OEiqpX017363 for ; Tue, 24 Jul 2012 09:45:22 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.135]) by eusaamw0711.eamcs.ericsson.se ([147.117.20.178]) with mapi; Tue, 24 Jul 2012 10:45:12 -0400 From: Marc Khouzam To: "'gdb-patches@sourceware.org'" Date: Tue, 24 Jul 2012 14:45:00 -0000 Subject: [Patch] Cannot set pending bp if condition set explicitly Message-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00485.txt.bz2 Hi, If I set a condition explicitly on a pending breakpoint (using the 'condition' command), the breakpoint fails to install. I believe it is because the condition is marked as parsed, although, for a pending bp, this is not the case. Note that using the form b mydll:c:5 if j=3D=3D3 does work because the condition is not examined until the pending breakpoint is installed. This is not the case when using the 'condition' command. Broken session below. No regressions on Ubuntu 32bit. Is this ok for HEAD and 7_5? Thanks 2012-07-20 Marc Khouzam * breakpoint.c (set_breakpoint_condition): For pending breakpoints, mark condition as not parsed. ### Eclipse Workspace Patch 1.0 #P src Index: gdb/breakpoint.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.694 diff -u -r1.694 breakpoint.c --- gdb/breakpoint.c 19 Jul 2012 15:38:16 -0000 1.694 +++ gdb/breakpoint.c 23 Jul 2012 15:46:24 -0000 @@ -951,7 +951,12 @@ /* I don't know if it matters whether this is the string the user typed in or the decompiled expression. */ b->cond_string =3D xstrdup (arg); - b->condition_not_parsed =3D 0; + + /* For a pending breakoint, the condition is not parsed yet */ + if (b->loc =3D=3D NULL || b->loc->shlib_disabled) + b->condition_not_parsed =3D 1; + else=20=20 + b->condition_not_parsed =3D 0; =20 if (is_watchpoint (b)) { > gdb myapp.exe GNU gdb (GDB) 7.4.1 (gdb) b mydll.c:5 No source file named mydll.c. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (mydll.c:5) pending. (gdb) cond 1 j=3D=3D3 (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y mydll.c:5 stop only if j=3D=3D3 (gdb) r Starting program: /home/lmckhou/runtime-TestDSF/myapp/Debug/myapp.exe=20 Error in re-setting breakpoint 1: No source file named /home/lmckhou/runtim= e-TestDSF/myLinuxDll/src/mydll.c. 5 warning: Temporarily disabling breakpoints for unloaded shared library "/ho= me/lmckhou/runtime-TestDSF/myLinuxDll/Debug/libmyLinuxDll" [Inferior 1 (process 3438) exited normally] =3D> breakpoint was not installed and didn't hit