qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH for 2.9] gdbstub: remove spurious tb_flush()


From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC PATCH for 2.9] gdbstub: remove spurious tb_flush() calls
Date: Tue, 6 Dec 2016 15:42:25 +0000

On 6 December 2016 at 15:00, Alex Bennée <address@hidden> wrote:
> These are (now) mostly harmless but not needed. The correct place to
> flush if you want to is in the TCG aware code and not in gdbstub.
> Currently flushes are triggered for cpu_single_step() and breakpoint
> manipulation.
>
> Signed-off-by: Alex Bennée <address@hidden>
> ---
>  gdbstub.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index de62d26..ea48415 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -1274,7 +1274,6 @@ static void gdb_vm_state_change(void *opaque, int 
> running, RunState state)
>              cpu->watchpoint_hit = NULL;
>              goto send_packet;
>          }
> -        tb_flush(cpu);
>          ret = GDB_SIGNAL_TRAP;
>          break;
>      case RUN_STATE_PAUSED:
> @@ -1513,7 +1512,6 @@ gdb_handlesig(CPUState *cpu, int sig)
>
>      /* disable single step if it was enabled */
>      cpu_single_step(cpu, 0);
> -    tb_flush(cpu);
>
>      if (sig != 0) {
>          snprintf(buf, sizeof(buf), "S%02x", target_signal_to_gdb(sig));
> --
> 2.10.2

I think these are right in principle but we should probably
try to exercise the gdbstub fairly thoroughly to convince
ourselves they weren't hiding some bug...

I also think that cpu_single_step() doing a flush is wrong:
we should have the singlestep flag in the tbflags instead.

thanks
-- PMM



reply via email to

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