This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] deleting breakpoints inside of 'commands' (again)
- To: Michael Snyder <msnyder at cygnus dot com>
- Subject: Re: [RFA] deleting breakpoints inside of 'commands' (again)
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Thu, 08 Nov 2001 09:32:18 -0500
- CC: Don Howard <dhoward at redhat dot com>, gdb-patches at sources dot redhat dot com
- Organization: Red Hat Canada
- References: <Pine.LNX.4.33.0111060938060.2672-100000@theotherone> <3BE830E5.FADE101D@cygnus.com>
Michael Snyder wrote:
>
> > Also, I'd like to trim the strncmp checks to the shortest match:
> >
> > if (strncmp (cmd->line, "del", 3) == 0 || /* delete */
> > strncmp (cmd->line, "cl", 2) == 0) /* clear */
> >
> > Is there any problem with that?
>
> I'm not sure -- what if a user-defined command matches that?
In this case the copy will be made when it could not be necessary.
But this is not that bad as nothing will break. Not copying when
necessary is what would break things.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9