* target.c (memory_xfer_partial): Don't use the stack cache if
authorPedro Alves <palves@redhat.com>
Fri, 12 Mar 2010 03:54:45 +0000 (03:54 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 12 Mar 2010 03:54:45 +0000 (03:54 +0000)
inspecting trace frames.
* tracepoint.c (finish_tfind_command): Invalidate the target
dcache.

gdb/ChangeLog
gdb/target.c
gdb/tracepoint.c

index 9053217cb15abb2275205cca4f0f7a9612f76dc6..4bc4d4faed7667e9fdaa56e52a0df386e4d4622e 100644 (file)
@@ -1,3 +1,10 @@
+2010-03-12  Pedro Alves  <pedro@codesourcery.com>
+
+       * target.c (memory_xfer_partial): Don't use the stack cache if
+       inspecting trace frames.
+       * tracepoint.c (finish_tfind_command): Invalidate the target
+       dcache.
+
 2010-03-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * solib-svr4.c (LM_ADDR_CHECK) <info_verbose>: Use printf_unfiltered
index 5f7a2e729afd6751677878d62b40ba7d2f88eea0..f253ee0713c9b34b76fe01215cdc1212464ceefd 100644 (file)
@@ -43,6 +43,7 @@
 #include "solib.h"
 #include "exec.h"
 #include "inline-frame.h"
+#include "tracepoint.h"
 
 static void target_info (char *, int);
 
@@ -1292,6 +1293,10 @@ memory_xfer_partial (struct target_ops *ops, enum target_object object,
     inf = NULL;
 
   if (inf != NULL
+      /* The dcache reads whole cache lines; that doesn't play well
+        with reading from a trace buffer, because reading outside of
+        the collected memory range fails.  */
+      && get_traceframe_number () == -1
       && (region->attrib.cache
          || (stack_cache_enabled_p && object == TARGET_OBJECT_STACK_MEMORY)))
     {
index d248db4c305f073062b58976292a2a77ada392de..e1679fadb6b470719eda2ad5d69a74ac28a9a041 100644 (file)
@@ -1757,6 +1757,7 @@ finish_tfind_command (enum trace_find_type type, int num,
 
   reinit_frame_cache ();
   registers_changed ();
+  target_dcache_invalidate ();
   set_traceframe_num (target_frameno);
   set_tracepoint_num (tp ? tp->number : target_tracept);
   if (target_frameno == -1)