2009-08-31 Michael Snyder * remote.c (PACKET_bc, PACKET_bs): New enums. (remote_protocol_features): Add ReverseStep, ReverseContinue. (remote_resume): Check for reverse capability. (_initialize_remote): Add packet config for "bs" and "bc" packets. Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.370 diff -u -p -r1.370 remote.c --- remote.c 18 Aug 2009 16:17:16 -0000 1.370 +++ remote.c 31 Aug 2009 19:55:21 -0000 @@ -1000,6 +1000,8 @@ enum { PACKET_qXfer_siginfo_write, PACKET_qAttached, PACKET_ConditionalTracepoints, + PACKET_bc, + PACKET_bs, PACKET_MAX }; @@ -3051,6 +3053,10 @@ static struct protocol_feature remote_pr PACKET_qXfer_siginfo_write }, { "ConditionalTracepoints", PACKET_DISABLE, remote_cond_tracepoint_feature, PACKET_ConditionalTracepoints }, + { "ReverseContinue", PACKET_DISABLE, remote_supported_packet, + PACKET_bc }, + { "ReverseStep", PACKET_DISABLE, remote_supported_packet, + PACKET_bs }, }; static void @@ -3818,6 +3824,14 @@ remote_resume (struct target_ops *ops, if (info_verbose && siggnal != TARGET_SIGNAL_0) warning (" - Can't pass signal %d to target in reverse: ignored.\n", siggnal); + + if (step && + remote_protocol_packets[PACKET_bs].support == PACKET_DISABLE) + error ("Remote reverse-step not supported."); + if (!step && + remote_protocol_packets[PACKET_bc].support == PACKET_DISABLE) + error ("Remote reverse-continue not supported."); + strcpy (buf, step ? "bs" : "bc"); } else if (siggnal != TARGET_SIGNAL_0) @@ -9165,6 +9179,12 @@ Show the maximum size of the address (in "qGetTLSAddr", "get-thread-local-storage-address", 0); + add_packet_config_cmd (&remote_protocol_packets[PACKET_bc], + "bc", "reverse-continue", 0); + + add_packet_config_cmd (&remote_protocol_packets[PACKET_bs], + "bs", "reverse-step", 0); + add_packet_config_cmd (&remote_protocol_packets[PACKET_qSupported], "qSupported", "supported-packets", 0);