Revert previous tweaks
authorYao Qi <yao@codesourcery.com>
Mon, 16 Dec 2013 13:13:36 +0000 (21:13 +0800)
committerYao Qi <yao@codesourcery.com>
Sun, 23 Feb 2014 03:44:28 +0000 (11:44 +0800)
As we migrate to the new to_xfer_partial interface, some of previous
tweaks become unnecessary, we don't have to check traceframe is
selected in each target implementation, so this patch below is
reverted.

  [PATCH] Send qXfer:traceframe-info:read when traceframe is selected.
  https://sourceware.org/ml/gdb-patches/2013-10/msg00752.html

Third, to_traceframe_info is only called when traceframe is selected,
that means it is only called when target is remote, tfile or ctf, so
this patch can be partially reverted,

  https://sourceware.org/ml/gdb-patches/2013-04/msg00000.html

gdb:

2014-02-23  Yao Qi  <yao@codesourcery.com>

Revert two patches:

2013-10-25  Yao Qi  <yao@codesourcery.com>

* remote.c (remote_traceframe_info): Return early if
traceframe is not selected.

2013-07-19  Yao Qi  <yao@codesourcery.com>

* target.c (update_current_target): Change the default action
of 'to_traceframe_info' from tcomplain to return_zero.
* target.h (struct target_ops) <to_traceframe_info>: Add more
comments.

gdb/ChangeLog
gdb/remote.c
gdb/target.h

index 326909fb5a4cbbfd5372ec8241e0b7deb8bb11d4..3b199ac9b6395e3be368730cea91066a3f6f6bfe 100644 (file)
@@ -1,3 +1,19 @@
+2014-02-23  Yao Qi  <yao@codesourcery.com>
+
+       Revert two patches:
+
+       2013-10-25  Yao Qi  <yao@codesourcery.com>
+
+       * remote.c (remote_traceframe_info): Return early if
+       traceframe is not selected.
+
+       2013-07-19  Yao Qi  <yao@codesourcery.com>
+
+       * target.c (update_current_target): Change the default action
+       of 'to_traceframe_info' from tcomplain to return_zero.
+       * target.h (struct target_ops) <to_traceframe_info>: Add more
+       comments.
+
 2014-02-23  Yao Qi  <yao@codesourcery.com>
 
        * valops.c (read_value_memory): Rewrite it.  Call
index dcf2e503acf352ad80d11f22a70f9f18fe19c206..de9dad1c58f35374fb9fc9f2a47989989a8ea971 100644 (file)
@@ -11058,11 +11058,6 @@ remote_traceframe_info (struct target_ops *self)
 {
   char *text;
 
-  /* If current traceframe is not selected, don't bother the remote
-     stub.  */
-  if (get_traceframe_number () < 0)
-    return NULL;
-
   text = target_read_stralloc (&current_target,
                               TARGET_OBJECT_TRACEFRAME_INFO, NULL);
   if (text != NULL)
index 2cc3c1356cf8409bf4de2999e8f863c66abe2d84..6cc13370759eeee9d02f5bae5bc6286d9ee3f80e 100644 (file)
@@ -974,20 +974,11 @@ struct target_ops
       TARGET_DEFAULT_NORETURN (tcomplain ());
 
     /* Return a traceframe info object describing the current
-       traceframe's contents.  If the target doesn't support
-       traceframe info, return NULL.  If the current traceframe is not
-       selected (the current traceframe number is -1), the target can
-       choose to return either NULL or an empty traceframe info.  If
-       NULL is returned, for example in remote target, GDB will read
-       from the live inferior.  If an empty traceframe info is
-       returned, for example in tfile target, which means the
-       traceframe info is available, but the requested memory is not
-       available in it.  GDB will try to see if the requested memory
-       is available in the read-only sections.  This method should not
-       cache data; higher layers take care of caching, invalidating,
-       and re-fetching when necessary.  */
+       traceframe's contents.  This method should not cache data;
+       higher layers take care of caching, invalidating, and
+       re-fetching when necessary.  */
     struct traceframe_info *(*to_traceframe_info) (struct target_ops *)
-      TARGET_DEFAULT_RETURN (NULL);
+       TARGET_DEFAULT_RETURN (tcomplain ());
 
     /* Ask the target to use or not to use agent according to USE.  Return 1
        successful, 0 otherwise.  */
This page took 0.036355 seconds and 4 git commands to generate.