|
| From: | Akihiko Odaki |
| Subject: | Re: [PULL 16/22] gdbstub: expose api to find registers |
| Date: | Wed, 17 Jan 2024 16:50:15 +0900 |
| User-agent: | Mozilla Thunderbird |
On 2024/01/16 19:48, Alex Bennée wrote:
Expose an internal API to QEMU to return all the registers for a vCPU. The list containing the details required to called gdb_read_register(). Based-on: <20231025093128.33116-15-akihiko.odaki@daynix.com> Cc: Akihiko Odaki <akihiko.odaki@daynix.com> Message-Id: <20240103173349.398526-38-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
I'm not for to pull this, "[PULL 17/22] plugins: add an API to read registers", and "[PULL 19/22] contrib/plugins: extend execlog to track register changes" in the current state. I have only commented the API aspect of these patches, but looking at them now, I see something wrong with their implementations. I'll add comments to respective patches.
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index da9ddfe54c5..7bddea8259e 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -111,6 +111,53 @@ void gdb_feature_builder_end(const GDBFeatureBuilder *builder); */ const GDBFeature *gdb_find_static_feature(const char *xmlname);+/**+ * gdb_find_feature() - Find a feature associated with a CPU. + * @cpu: The CPU associated with the feature. + * @name: The feature's name. + * + * Return: The feature's number. + */ +int gdb_find_feature(CPUState *cpu, const char *name);
This function is not used.
+ +/** + * gdb_find_feature_register() - Find a register associated with a CPU. + * @cpu: The CPU associated with the register. + * @feature: The feature's number returned by gdb_find_feature(). + * @name: The register's name. + * + * Return: The register's number. + */ +int gdb_find_feature_register(CPUState *cpu, int feature, const char *name);
This function is also no longer needed. Regards, Akihiko Odaki
| [Prev in Thread] | Current Thread | [Next in Thread] |