Re: [PATCH 1/6] PR gdb/16575: stale breakpoint instructions in the code cache

Yao Qi
2014-03-04T04:02:10Z

On 02/26/2014 04:32 AM, Pedro Alves wrote:
> The dcache works at the raw memory level. We need to update it
> whenever memory is written, no matter what kind of target memory
> object was originally passed down by the caller. The issue is that
> the dcache update code isn't reached when a caller explicitly writes
> raw memory. Breakpoint insertion/removal is one such case --
> mem-break.c uses target_write_read_memory/target_write_raw_memory.
>
> The fix is to move the dcache update code from memory_xfer_partial_1
> to raw_memory_xfer_partial so that it's always reachable.

I went through this patch, and it looks right to me. When I wrote code
cache code, I remember that there may be something about the interaction
between breakpoint and code cache, but I forgot to dig it deeper.
Thanks for fixing it.

--
Yao (é½å°§)