Re: [patch] delete a range of display numbers

Tom Tromey
2011-02-18T15:14:26Z

>>>>> "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?
I can do the moving.

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.

Tom