MI/CLI breakpoint handling code duplication
Vladimir Prus
ghost@cs.msu.su
Thu Nov 8 10:26:00 GMT 2007
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.
-------------- 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/20071108/c310a8b1/attachment.bin>
More information about the Gdb-patches
mailing list