diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2025-03-04 22:24:33 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2025-03-10 10:30:01 +0000 |
commit | 903e870f2453731f9b44ce9734cfcb5509304677 (patch) | |
tree | dbd6836db42b497f83a102162cc91b1edde56db4 /plugins/api.c | |
parent | 8c15f6e435a15e90456d26ff26199861369c9d63 (diff) | |
download | qemu-903e870f2453731f9b44ce9734cfcb5509304677.zip qemu-903e870f2453731f9b44ce9734cfcb5509304677.tar.gz qemu-903e870f2453731f9b44ce9734cfcb5509304677.tar.bz2 |
plugins/api: split out binary path/start/end/entry code
To move the main api.c to a single build compilation object we need to
start splitting out user and system specific code. As we need to grob
around host headers we move these particular helpers into the *-user
mode directories.
The binary/start/end/entry helpers are all NOPs for system mode.
While using the plugin-api.c.inc trick means we build for both
linux-user and bsd-user the BSD user-mode command line is still
missing -plugin. This can be enabled once we have reliable check-tcg
tests working for the BSDs.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250304222439.2035603-27-alex.bennee@linaro.org>
Diffstat (limited to 'plugins/api.c')
-rw-r--r-- | plugins/api.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/plugins/api.c b/plugins/api.c index c3ba1e9..ffccd71 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -472,49 +472,6 @@ bool qemu_plugin_bool_parse(const char *name, const char *value, bool *ret) } /* - * Binary path, start and end locations - */ -const char *qemu_plugin_path_to_binary(void) -{ - char *path = NULL; -#ifdef CONFIG_USER_ONLY - TaskState *ts = get_task_state(current_cpu); - path = g_strdup(ts->bprm->filename); -#endif - return path; -} - -uint64_t qemu_plugin_start_code(void) -{ - uint64_t start = 0; -#ifdef CONFIG_USER_ONLY - TaskState *ts = get_task_state(current_cpu); - start = ts->info->start_code; -#endif - return start; -} - -uint64_t qemu_plugin_end_code(void) -{ - uint64_t end = 0; -#ifdef CONFIG_USER_ONLY - TaskState *ts = get_task_state(current_cpu); - end = ts->info->end_code; -#endif - return end; -} - -uint64_t qemu_plugin_entry_code(void) -{ - uint64_t entry = 0; -#ifdef CONFIG_USER_ONLY - TaskState *ts = get_task_state(current_cpu); - entry = ts->info->entry; -#endif - return entry; -} - -/* * Create register handles. * * We need to create a handle for each register so the plugin |