7 Aug 2012 09:14
[RFC] Autoload-breakpoints new version [7/9] autoload breakpoint sync function
Hui Zhu <hui_zhu <at> mentor.com>
2012-08-07 07:14:40 GMT
2012-08-07 07:14:40 GMT
This patch add the sync function to autoload-breakpoints. All this function is depend on the notification (include the extend that prev patch add). Following is a introduce of sync process: 1) When the remote target wants to send a sync packet to GDB, it will send a notification to GDB. 2) GDB handle_notification will get this packet. Handler will get the status of GDB from argument flags. When GDB in NOTIFICATION_ASYNC and NOTIFICATION_RECV_FOREVER, handle this packet because change the breakpoints will not affect anything. If GDB is in other status, the breakpoints cannot be changed because GDB just want to change them with itself. So just drop this packet. 3) In the remote target part, after it send the notification. It will wait the reply packet from GDB. If the packet is the notification packet, handle it as the reply from GDB. If not, the packet that sent to GDB is dropped. Then the target need handle this packet as it is. Thanks, Hui 2012-08-07 Hui Zhu <hui_zhu <at> mentor.com> * breakpoint.c (breakpoint_add_command_line_next): New variable. (breakpoint_add_command_line, breakpoint_add_command, handle_autoload_breakpoint_cmd_to_breakpoints, parse_autoload_breakpoint_definition_to_breakpoints): New function. * remote.c (inside_autoload_breakpoint_handler): New variable. (handle_notification): Handle QBDP packet. (remote_insert_breakpoint, remote_remove_breakpoint, remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Check inside_autoload_breakpoint_handler.(Continue reading)
RSS Feed