This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] deleting breakpoints inside of 'commands' (again)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]