[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 16/20] mcdstub: function construct for resets added
From: |
Nicolas Eder |
Subject: |
[PATCH v3 16/20] mcdstub: function construct for resets added |
Date: |
Tue, 7 Nov 2023 14:03:19 +0100 |
---
include/mcdstub/mcdstub.h | 8 ++++++++
mcdstub/mcdstub.c | 18 ++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/include/mcdstub/mcdstub.h b/include/mcdstub/mcdstub.h
index 0375cf7311..000d832a39 100644
--- a/include/mcdstub/mcdstub.h
+++ b/include/mcdstub/mcdstub.h
@@ -672,6 +672,14 @@ void handle_query_regs_c(GArray *params, void *user_ctx);
*/
void handle_open_server(GArray *params, void *user_ctx);
+/**
+ * handle_reset() - Handler for performing resets.
+ *
+ * This function is currently not in use.
+ * @params: GArray with all TCP packet parameters.
+ */
+void handle_reset(GArray *params, void *user_ctx);
+
/**
* handle_query_state() - Handler for the state query.
*
diff --git a/mcdstub/mcdstub.c b/mcdstub/mcdstub.c
index 6313459bac..1a10bc6c98 100644
--- a/mcdstub/mcdstub.c
+++ b/mcdstub/mcdstub.c
@@ -511,6 +511,16 @@ int mcd_handle_packet(const char *line_buf)
cmd_parser = &close_core_cmd_desc;
}
break;
+ case TCP_CHAR_RESET:
+ {
+ static MCDCmdParseEntry reset_cmd_desc = {
+ .handler = handle_reset,
+ };
+ reset_cmd_desc.cmd = (char[2]) { TCP_CHAR_RESET, '\0' };
+ strcpy(reset_cmd_desc.schema, (char[2]) { ARG_SCHEMA_INT, '\0' });
+ cmd_parser = &reset_cmd_desc;
+ }
+ break;
default:
/* command not supported */
mcd_put_packet("");
@@ -1568,6 +1578,14 @@ void handle_query_regs_c(GArray *params, void *user_ctx)
mcd_put_strbuf();
}
+void handle_reset(GArray *params, void *user_ctx)
+{
+ /*
+ * int reset_id = get_param(params, 0)->data_int;
+ * TODO: implement resets
+ */
+}
+
void handle_query_state(GArray *params, void *user_ctx)
{
/*
--
2.34.1
- [PATCH v3 18/20] mcdstub: read/write to memory added: This also includes various helper functions in the QEMU memory code, (continued)
- [PATCH v3 18/20] mcdstub: read/write to memory added: This also includes various helper functions in the QEMU memory code, Nicolas Eder, 2023/11/07
- [PATCH v3 02/20] mcdstub gdbstub: new DebugClass and DebugState introduced. They are used to abstract the debugger details behind a QOM. This is currently used in the cpu_handle_guest_debug function, Nicolas Eder, 2023/11/07
- [PATCH v3 11/20] mcdstub: reset and trigger queries added, Nicolas Eder, 2023/11/07
- [PATCH v3 06/20] mcdstub: open/close server functions and trigger/reset data added. User for initial connection with an mcd client, Nicolas Eder, 2023/11/07
- [PATCH v3 12/20] mcdstub: missing parse_reg_xml function for parsing gdb register xml files added, Nicolas Eder, 2023/11/07
- [PATCH v3 13/20] mcdstub: added queries for memory spaces, register groups and registers, Nicolas Eder, 2023/11/07
- [PATCH v3 19/20] mcdstub: break/watchpoints added, Nicolas Eder, 2023/11/07
- [PATCH v3 14/20] mcdstub: missing handle_query_state function added, Nicolas Eder, 2023/11/07
- [PATCH v3 04/20] mcdstub: added header with defines specific to the mcd tcp packet communication, Nicolas Eder, 2023/11/07
- [PATCH v3 16/20] mcdstub: function construct for resets added,
Nicolas Eder <=
- [PATCH v3 15/20] mcdstub: added go, break and step functionality and all corresponding functions, Nicolas Eder, 2023/11/07
- [PATCH v3 03/20] gdbstub: moving code so that it can be easier accessed from outside the gdbstub: fromhex and tohex functions moved to a cutils header. GDBRegisterState moved to gdbstub.h, Nicolas Eder, 2023/11/07
- [PATCH v3 17/20] mcdstub: reading/writing registers added, Nicolas Eder, 2023/11/07
- Re: [PATCH v3 00/20] first version of mcdstub, Philippe Mathieu-Daudé, 2023/11/08
- Re: [PATCH v3 00/20] first version of mcdstub, Alex Bennée, 2023/11/29