convert to_get_tib_address
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 21:15:55 +0000 (14:15 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:47:59 +0000 (07:47 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
to_get_tib_address.
* target.h (struct target_ops) <to_get_tib_address>: Use
TARGET_DEFAULT_NORETURN.

gdb/ChangeLog
gdb/target-delegates.c
gdb/target.c
gdb/target.h

index 8deed48..782b46a 100644 (file)
@@ -2,6 +2,14 @@
 
        * target-delegates.c: Rebuild.
        * target.c (update_current_target): Don't inherit or default
+       to_get_tib_address.
+       * target.h (struct target_ops) <to_get_tib_address>: Use
+       TARGET_DEFAULT_NORETURN.
+
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target-delegates.c: Rebuild.
+       * target.c (update_current_target): Don't inherit or default
        to_set_trace_notes.
        * target.h (struct target_ops) <to_set_trace_notes>: Use
        TARGET_DEFAULT_RETURN.
index 562ccfd..ba89740 100644 (file)
@@ -921,6 +921,19 @@ tdefault_set_trace_notes (struct target_ops *self, const char *arg1, const char
 }
 
 static int
+delegate_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2)
+{
+  self = self->beneath;
+  return self->to_get_tib_address (self, arg1, arg2);
+}
+
+static int
+tdefault_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2)
+{
+  tcomplain ();
+}
+
+static int
 delegate_supports_btrace (struct target_ops *self)
 {
   self = self->beneath;
@@ -1092,6 +1105,8 @@ install_delegators (struct target_ops *ops)
     ops->to_set_trace_buffer_size = delegate_set_trace_buffer_size;
   if (ops->to_set_trace_notes == NULL)
     ops->to_set_trace_notes = delegate_set_trace_notes;
+  if (ops->to_get_tib_address == NULL)
+    ops->to_get_tib_address = delegate_get_tib_address;
   if (ops->to_supports_btrace == NULL)
     ops->to_supports_btrace = delegate_supports_btrace;
 }
@@ -1177,5 +1192,6 @@ install_dummy_methods (struct target_ops *ops)
   ops->to_set_circular_trace_buffer = tdefault_set_circular_trace_buffer;
   ops->to_set_trace_buffer_size = tdefault_set_trace_buffer_size;
   ops->to_set_trace_notes = tdefault_set_trace_notes;
+  ops->to_get_tib_address = tdefault_get_tib_address;
   ops->to_supports_btrace = tdefault_supports_btrace;
 }
index e0b5efb..eb6d2bd 100644 (file)
@@ -708,7 +708,7 @@ update_current_target (void)
       /* Do not inherit to_set_circular_trace_buffer.  */
       /* Do not inherit to_set_trace_buffer_size.  */
       /* Do not inherit to_set_trace_notes.  */
-      INHERIT (to_get_tib_address, t);
+      /* Do not inherit to_get_tib_address.  */
       INHERIT (to_set_permissions, t);
       INHERIT (to_static_tracepoint_marker_at, t);
       INHERIT (to_static_tracepoint_markers_by_strid, t);
@@ -750,9 +750,6 @@ update_current_target (void)
            (void (*) (struct target_ops *, ptid_t))
            target_ignore);
   current_target.to_read_description = NULL;
-  de_fault (to_get_tib_address,
-           (int (*) (struct target_ops *, ptid_t, CORE_ADDR *))
-           tcomplain);
   de_fault (to_set_permissions,
            (void (*) (struct target_ops *))
            target_ignore);
index a82a2dd..7bc6d32 100644 (file)
@@ -927,7 +927,8 @@ struct target_ops
     /* Return the address of the start of the Thread Information Block
        a Windows OS specific feature.  */
     int (*to_get_tib_address) (struct target_ops *,
-                              ptid_t ptid, CORE_ADDR *addr);
+                              ptid_t ptid, CORE_ADDR *addr)
+      TARGET_DEFAULT_NORETURN (tcomplain ());
 
     /* Send the new settings of write permission variables.  */
     void (*to_set_permissions) (struct target_ops *);