qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gdbstub: move update guest debug to accel ops


From: Mads Ynddal
Subject: Re: [PATCH] gdbstub: move update guest debug to accel ops
Date: Tue, 20 Dec 2022 11:45:56 +0100

> It will do. You could just call it update_guest_debug as it is an
> internal static function although I guess that makes grepping a bit of a
> pain.

I agree. It should preferably be something unique, to ease grep'ing.

> Is something being accidentally linked with linux-user and softmmu?

Good question. I'm not familiar enough with the code base to know.

I experimented with enabling/disabling linux-user when configuring, and it does
affect whether it compiles or not.

The following seems to fix it, and I can see the same approach is taken other
places in cpu.c. Would this be an acceptable solution?

diff --git a/cpu.c b/cpu.c
index 6effa5acc9..c9e8700691 100644
--- a/cpu.c
+++ b/cpu.c
@@ -386,6 +386,7 @@ void cpu_breakpoint_remove_all(CPUState *cpu, int mask)
 void cpu_single_step(CPUState *cpu, int enabled)
 {
     if (cpu->singlestep_enabled != enabled) {
+#if !defined(CONFIG_USER_ONLY)
         const AccelOpsClass *ops = cpus_get_accel();

         cpu->singlestep_enabled = enabled;
@@ -393,6 +394,7 @@ void cpu_single_step(CPUState *cpu, int enabled)
         if (ops->update_guest_debug) {
             ops->update_guest_debug(cpu, 0);
         }
+#endif

         trace_breakpoint_singlestep(cpu->cpu_index, enabled);
     }

—
Mads Ynddal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]