aboutsummaryrefslogtreecommitdiff
path: root/contrib/plugins/execlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/plugins/execlog.c')
-rw-r--r--contrib/plugins/execlog.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c
index d67d010..06ec76d 100644
--- a/contrib/plugins/execlog.c
+++ b/contrib/plugins/execlog.c
@@ -232,12 +232,15 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
*/
if (disas_assist && rmatches) {
check_regs_next = false;
- gchar *args = g_strstr_len(insn_disas, -1, " ");
- for (int n = 0; n < all_reg_names->len; n++) {
- gchar *reg = g_ptr_array_index(all_reg_names, n);
- if (g_strrstr(args, reg)) {
- check_regs_next = true;
- skip = false;
+ g_auto(GStrv) args = g_strsplit_set(insn_disas, " \t", 2);
+ if (args && args[1]) {
+ for (int n = 0; n < all_reg_names->len; n++) {
+ const gchar *reg = g_ptr_array_index(all_reg_names, n);
+ if (g_strrstr(args[1], reg)) {
+ check_regs_next = true;
+ skip = false;
+ break;
+ }
}
}
}