qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] tcg: gdbstub: Fix missing breakpoint issue


From: Changbin Du
Subject: Re: [PATCH] tcg: gdbstub: Fix missing breakpoint issue
Date: Thu, 6 Feb 2020 02:33:06 +0000
User-agent: NeoMutt/20180716-508-7c9a6d

On Wed, Feb 05, 2020 at 11:03:23AM +0000, Richard Henderson wrote:
> On 1/24/20 2:17 AM, Changbin Du wrote:
> > When inserting breakpoints, we need to invalidate related TBs to apply
> > helper call. This is done by breakpoint_invalidate(). But many users
> > found the BPs sometimes never hit.
> > 
> > In system mode emulation, the BPs are global in guest but not particular
> > address space. The issue is that the current implementation only trys to
> > invalidate TB of paddr corresponding to the target vaddr in current MMU
> > context. Then some cached TBs continue running without BPs applied.
> > 
> > To fix this issue, we can just invalidate all TBs as what step mode does.
> > (For old version users, issuing a step command can workaround this problem.)
> > 
> > Signed-off-by: Changbin Du <address@hidden>
> > ---
> >  exec.c | 29 +----------------------------
> >  1 file changed, 1 insertion(+), 28 deletions(-)
> > 
> > diff --git a/exec.c b/exec.c
> > index 67e520d18e..9d9fd48519 100644
> > --- a/exec.c
> > +++ b/exec.c
> > @@ -997,36 +997,9 @@ static void breakpoint_invalidate(CPUState *cpu, 
> > target_ulong pc)
> >      tb_invalidate_phys_addr(pc);
> >  }
> >  #else
> > -void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs 
> > attrs)
> 
> You can't remove this function yet.
> You should have seen that xtensa-softmmu no longer builds.
> 
> I've cc'd you into Max Filippov's thread that addresses the same problem, and
> I'm going to apply his fix for now.
> 
> 
> r~
>
Got it, just go ahead with that one. thanks~

-- 
Cheers,
Changbin Du



reply via email to

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