[RFA] Use data cache for stack accesses

Pedro Alves pedro@codesourcery.com
Wed Jul 8 20:51:00 GMT 2009


On Wednesday 08 July 2009 21:08:00, Jacob Potter write:
> --- a/gdb/thread.c
> +++ b/gdb/thread.c
> @@ -848,6 +848,9 @@ switch_to_thread (ptid_t ptid)
>    if (ptid_equal (ptid, inferior_ptid))
>      return;
>  
> +  if (ptid_get_pid (ptid) != ptid_get_pid (inferior_ptid))
> +    dcache_invalidate (target_dcache);
> +

I'm not sure this would be 100% multi-address space safe.

Do we not have places where we switch inferior_ptid temporarily
before calling reading memory, with save_inferior_ptid, without
going through the high level switch_to_thread ?

What if we do this within dcache itself, similarly
to get_thread_regcache?  That would be probably in memory_xfer_partial.

-- 
Pedro Alves



More information about the Gdb-patches mailing list