Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Veksler <veksler@il.ibm.com>
To: gdb@sources.redhat.com
Cc: veksler@il.ibm.com, "H . J . Lu" <hjl@lucon.org>,
	Andrew Cagney <ac131313@cygnus.com>
Subject: Re: gdb 5.2 removes the conditional breakpoints
Date: Wed, 10 Apr 2002 00:52:00 -0000	[thread overview]
Message-ID: <3CB3EF53.80608@il.ibm.com> (raw)

/References/: <20020322095020.A12445@lucon.org 
<http://sources.redhat.com/ml/gdb/2002-03/msg00196.html> > 
<3C9B76F5.6050809@cygnus.com 
<http://sources.redhat.com/ml/gdb/2002-03/msg00198.html> >


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 <nop>, 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 !!! ----


------------------------------------------------------------------------



             reply	other threads:[~2002-04-10  7:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-10  0:52 Michael Veksler [this message]
2002-04-17 16:57 ` H . J . Lu
2002-04-17 17:33   ` PATCH: Fix restarting breakpoint (Re: gdb 5.2 removes the conditional breakpoints) H . J . Lu
2002-04-17 17:34   ` gdb 5.2 removes the conditional breakpoints Andrew Cagney
2002-04-17 17:48     ` H . J . Lu
2002-04-17 20:20       ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2002-04-17 23:40 Michael Veksler
2002-04-18  3:11 ` Eli Zaretskii
2002-04-18  9:31   ` H . J . Lu
2002-04-18 10:22     ` Daniel Jacobowitz
2002-04-18 10:34       ` H . J . Lu
2002-04-18 10:41         ` Daniel Jacobowitz
2002-04-18  9:42   ` H . J . Lu
2002-03-22  9:50 H . J . Lu
2002-03-22 10:24 ` Andrew Cagney
2002-03-22 10:45   ` H . J . Lu
2002-03-22 10:27 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CB3EF53.80608@il.ibm.com \
    --to=veksler@il.ibm.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.com \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox