MI/CLI breakpoint handling code duplication

Vladimir Prus ghost@cs.msu.su
Fri Dec 14 14:08:00 GMT 2007


On Thursday 08 November 2007 13:25:59 Vladimir Prus wrote:
> 
> The code paths handling break insertion in MI and CLI
> feature undue code duplication. This patch makes extract
> the body of break_command_1 into separate function, makes
> it slightly more flexibile, and as result, both MI and CLI
> code paths merely forward to the new function.
> No regressions on x86, OK?
> 
> - Volodya
> 
> 	* breakpoint.c (break_command_really): New, copied
> 	from break_command_1. New parameters COND_STRING, THREAD
> 	PARSE_CONDITITION_AND_THREAD and PENDING_BREAK_SUPPORT.
> 	The previous FLAG parameter split into TEMPFLAG and
> 	HARDWAREFLAG.
> 	When PARSE_CONDITION_AND_THREAD is not set, duplicate
> 	the passed condition string.
> 	(struct captured_breakpoint_args): Remove
> 	(do_captured_breakpoint): Remove.
> 	(break_command_1): Relay to break_command_really.
> 	(gdb_breakpoint): Relay to break_command_really.

Ping? This patch is pure refactoring which is basis for
the 'pending breakpoint in MI' patch. Given that the patch
is not supposed to change any behaviour and causes no regression,
I'd hope it should be easy to review :-)

I reattach the patch in case the original email is already lost.

- Volodya

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pending_mi_2_code_duplication.diff
Type: text/x-diff
Size: 8422 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20071214/cfdefb4f/attachment.bin>


More information about the Gdb-patches mailing list