Re: [patch] delete a range of display numbers

Pedro Alves
2011-02-18T15:55:26Z

On Friday 18 February 2011 15:14:04, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
>
> Pedro> The "delete" breakpoint command accepts ranges as
> Pedro> well, and even has code that handles convenience
> Pedro> variables mixed with the numbers. I think we should
> Pedro> reuse that instead of re-adding code that parses ranges.
> Pedro> Might as well make the "delete display" command
> Pedro> implementation look more like the "delete" command
> Pedro> implementation. Here's a quick cut at it.
>
> I've been thinking of starting a cli/cli-utils.c file and putting shared
> CLI parsing code there. This seems like a good candidate, WDYT?

Yeah. Sounds good.

> I can do the moving.

Thanks.

>
> Pedro> if (p == NULL)
> Pedro> - /* Empty line means refer to the last breakpoint. */
> Pedro> - return breakpoint_count;
> Pedro> + return 0;
>
> I was surprised that this didn't imply any other changes, but I looked
> at a bunch of calls into this code and I couldn't see anything.

Yeah, sorry I should have said I also looked and couldn't find
where's that being used. It look like a dead path at this point.
I'll do a testrun with a gdb_assert in place to be a bit more sure.

--
Pedro Alves