From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4552 invoked by alias); 10 Apr 2002 07:52:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4447 invoked from network); 10 Apr 2002 07:52:00 -0000 Received: from unknown (HELO d12lmsgate.de.ibm.com) (195.212.91.199) by sources.redhat.com with SMTP; 10 Apr 2002 07:52:00 -0000 Received: from d12relay01.de.ibm.com (d12relay01.de.ibm.com [9.165.215.22]) by d12lmsgate.de.ibm.com (1.0.0) with ESMTP id JAA28712; Wed, 10 Apr 2002 09:51:51 +0200 Received: from il.ibm.com (ps73-34.haifa.ibm.com [9.148.12.51]) by d12relay01.de.ibm.com (8.11.1m3/NCO/VER6.00) with ESMTP id g3A7poK78052; Wed, 10 Apr 2002 09:51:50 +0200 Message-ID: <3CB3EF53.80608@il.ibm.com> Date: Wed, 10 Apr 2002 00:52:00 -0000 From: Michael Veksler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9) Gecko/20020311 X-Accept-Language: en, pdf, he MIME-Version: 1.0 To: gdb@sources.redhat.com CC: veksler@il.ibm.com, "H . J . Lu" , Andrew Cagney Subject: Re: gdb 5.2 removes the conditional breakpoints Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00148.txt.bz2 /References/: <20020322095020.A12445@lucon.org > <3C9B76F5.6050809@cygnus.com > On Fri, Mar 22, 2002 at 01:24:53PM -0500, Andrew Cagney wrote: > > When I do > > > > (gdb) b 100 > > (gdb) cond 1 i == 3 > > (gdb) r > > (gdb) r > > > > gdb 5.2 will remove the conditional breakpoints on Linux/x86 after I > > restart the debug session. Am I the only one who sees it? > > It would be very helpful if you could illustrate this problem by > submitting a real testcase. That way people can run it and check > before/after effects on various platforms and GDB releases. > Here are the instructions for reproducing this annoying problem: // Debugged source: typedef int operation(int val); int f(operation * op, int value) { return op(value); } int nop(int val) { return val; } int main() { return f(nop, 5); } // End source Compile it on Linux using gcc 3.0.4 or redhat's 2.96 (did not test it on other versions). (gdb) b main (gdb) r Breakpoint 1, main () at t.c:15 15 return f(nop, 5); (gdb) s f (op=0x8048448 , value=5) at t.c:5 5 return op(value); (gdb) b Breakpoint 2 at 0x8048432: file t.c, line 5. (gdb) cond 2 op(value) == value (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: ..... Breakpoint 1, main () at t.c:15 15 return f(nop, 5); (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x0804845a in main at t.c:15 breakpoint already hit 1 time (gdb) q ----- Breakpoint 2 lost !!! ---- ------------------------------------------------------------------------