[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write
|
From: |
Peter Maydell |
|
Subject: |
Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write |
|
Date: |
Tue, 22 Mar 2022 19:32:45 +0000 |
On Tue, 22 Mar 2022 at 18:59, Philippe Mathieu-Daudé
<philippe.mathieu.daude@gmail.com> wrote:
> On 22/3/22 16:56, Peter Maydell wrote:
> > This works, but I worry a bit that it might have unexpected
> > side effects, and setting globals (even if thread-local) to
> > cause side-effects elsewhere isn't ideal...
>
> Yeah, gdbstub is like a JTAG probe, CPU accessors/views shouldn't be
> involved. Having current_cpu==NULL seems the correct behavior.
>
> There was a thread few years ago about an issue similar to this one.
> IIRC it was about how to have qtest commands select a different address
> space instead of the 'current cpu' one.
>
> I wonder why target_memory_rw_debug() involves CPU at all. Maybe it is
> simply not using the correct API?
gdb lets you look at specific threads (CPUs). When you're
looking at a given CPU you want that CPU's view of the world.
Most importantly, you want the virtual-to-physical mapping
that that CPU currently has set up...
-- PMM
- [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Bin Meng, 2022/03/22
- [PATCH 2/2] monitor/misc: Set current_cpu for memory dump, Bin Meng, 2022/03/22
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Peter Maydell, 2022/03/22
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Philippe Mathieu-Daudé, 2022/03/22
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write,
Peter Maydell <=
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Bin Meng, 2022/03/23
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Alex Bennée, 2022/03/24
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Peter Maydell, 2022/03/24
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Bin Meng, 2022/03/27
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Peter Maydell, 2022/03/28
- Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write, Bin Meng, 2022/03/29