Git sucks!
[deliverable/binutils-gdb.git] / gdb / record-btrace.c
index ae2befff2ac06d794c8b95d31f89d4c8fb932d8b..bcac1652a3d8419cacc6b8b57a7e08ef2da93587 100644 (file)
@@ -398,7 +398,8 @@ record_btrace_insn_history (struct target_ops *self, int size, int flags)
 /* The to_insn_history_range method of target record-btrace.  */
 
 static void
-record_btrace_insn_history_range (ULONGEST from, ULONGEST to, int flags)
+record_btrace_insn_history_range (struct target_ops *self,
+                                 ULONGEST from, ULONGEST to, int flags)
 {
   struct btrace_thread_info *btinfo;
   struct btrace_insn_history *history;
@@ -450,7 +451,8 @@ record_btrace_insn_history_range (ULONGEST from, ULONGEST to, int flags)
 /* The to_insn_history_from method of target record-btrace.  */
 
 static void
-record_btrace_insn_history_from (ULONGEST from, int size, int flags)
+record_btrace_insn_history_from (struct target_ops *self,
+                                ULONGEST from, int size, int flags)
 {
   ULONGEST begin, end, context;
 
@@ -477,7 +479,7 @@ record_btrace_insn_history_from (ULONGEST from, int size, int flags)
        end = ULONGEST_MAX;
     }
 
-  record_btrace_insn_history_range (begin, end, flags);
+  record_btrace_insn_history_range (self, begin, end, flags);
 }
 
 /* Print the instruction number range for a function call history line.  */
@@ -548,7 +550,7 @@ btrace_get_bfun_name (const struct btrace_function *bfun)
   if (sym != NULL)
     return SYMBOL_PRINT_NAME (sym);
   else if (msym != NULL)
-    return SYMBOL_PRINT_NAME (msym);
+    return MSYMBOL_PRINT_NAME (msym);
   else
     return "??";
 }
@@ -592,7 +594,7 @@ btrace_call_history (struct ui_out *uiout,
       if (sym != NULL)
        ui_out_field_string (uiout, "function", SYMBOL_PRINT_NAME (sym));
       else if (msym != NULL)
-       ui_out_field_string (uiout, "function", SYMBOL_PRINT_NAME (msym));
+       ui_out_field_string (uiout, "function", MSYMBOL_PRINT_NAME (msym));
       else if (!ui_out_is_mi_like_p (uiout))
        ui_out_field_string (uiout, "function", "??");
 
@@ -615,7 +617,7 @@ btrace_call_history (struct ui_out *uiout,
 /* The to_call_history method of target record-btrace.  */
 
 static void
-record_btrace_call_history (int size, int flags)
+record_btrace_call_history (struct target_ops *self, int size, int flags)
 {
   struct btrace_thread_info *btinfo;
   struct btrace_call_history *history;
@@ -704,7 +706,8 @@ record_btrace_call_history (int size, int flags)
 /* The to_call_history_range method of target record-btrace.  */
 
 static void
-record_btrace_call_history_range (ULONGEST from, ULONGEST to, int flags)
+record_btrace_call_history_range (struct target_ops *self,
+                                 ULONGEST from, ULONGEST to, int flags)
 {
   struct btrace_thread_info *btinfo;
   struct btrace_call_history *history;
@@ -756,7 +759,8 @@ record_btrace_call_history_range (ULONGEST from, ULONGEST to, int flags)
 /* The to_call_history_from method of target record-btrace.  */
 
 static void
-record_btrace_call_history_from (ULONGEST from, int size, int flags)
+record_btrace_call_history_from (struct target_ops *self,
+                                ULONGEST from, int size, int flags)
 {
   ULONGEST begin, end, context;
 
@@ -783,7 +787,7 @@ record_btrace_call_history_from (ULONGEST from, int size, int flags)
        end = ULONGEST_MAX;
     }
 
-  record_btrace_call_history_range (begin, end, flags);
+  record_btrace_call_history_range (self, begin, end, flags);
 }
 
 /* The to_record_is_replaying method of target record-btrace.  */
@@ -823,7 +827,7 @@ record_btrace_xfer_partial (struct target_ops *ops, enum target_object object,
            if (writebuf != NULL)
              {
                *xfered_len = len;
-               return TARGET_XFER_E_UNAVAILABLE;
+               return TARGET_XFER_UNAVAILABLE;
              }
 
            /* We allow reading readonly memory.  */
@@ -842,7 +846,7 @@ record_btrace_xfer_partial (struct target_ops *ops, enum target_object object,
              }
 
            *xfered_len = len;
-           return TARGET_XFER_E_UNAVAILABLE;
+           return TARGET_XFER_UNAVAILABLE;
          }
        }
     }
@@ -854,7 +858,7 @@ record_btrace_xfer_partial (struct target_ops *ops, enum target_object object,
                                   offset, len, xfered_len);
 
   *xfered_len = len;
-  return TARGET_XFER_E_UNAVAILABLE;
+  return TARGET_XFER_UNAVAILABLE;
 }
 
 /* The to_insert_breakpoint method of target record-btrace.  */
@@ -1303,6 +1307,22 @@ const struct frame_unwind record_btrace_tailcall_frame_unwind =
   record_btrace_frame_dealloc_cache
 };
 
+/* Implement the to_get_unwinder method.  */
+
+static const struct frame_unwind *
+record_btrace_to_get_unwinder (struct target_ops *self)
+{
+  return &record_btrace_frame_unwind;
+}
+
+/* Implement the to_get_tailcall_unwinder method.  */
+
+static const struct frame_unwind *
+record_btrace_to_get_tailcall_unwinder (struct target_ops *self)
+{
+  return &record_btrace_tailcall_frame_unwind;
+}
+
 /* Indicate that TP should be resumed according to FLAG.  */
 
 static void
@@ -1733,7 +1753,7 @@ record_btrace_decr_pc_after_break (struct target_ops *ops,
   if (record_btrace_is_replaying (ops))
     return 0;
 
-  return forward_target_decr_pc_after_break (ops->beneath, gdbarch);
+  return ops->beneath->to_decr_pc_after_break (ops->beneath, gdbarch);
 }
 
 /* The to_find_new_threads method of target record-btrace.  */
@@ -1873,7 +1893,6 @@ init_record_btrace_ops (void)
   ops->to_disconnect = record_disconnect;
   ops->to_mourn_inferior = record_mourn_inferior;
   ops->to_kill = record_kill;
-  ops->to_create_inferior = find_default_create_inferior;
   ops->to_stop_recording = record_btrace_stop_recording;
   ops->to_info_record = record_btrace_info;
   ops->to_insn_history = record_btrace_insn_history;
@@ -1889,8 +1908,8 @@ init_record_btrace_ops (void)
   ops->to_fetch_registers = record_btrace_fetch_registers;
   ops->to_store_registers = record_btrace_store_registers;
   ops->to_prepare_to_store = record_btrace_prepare_to_store;
-  ops->to_get_unwinder = &record_btrace_frame_unwind;
-  ops->to_get_tailcall_unwinder = &record_btrace_tailcall_frame_unwind;
+  ops->to_get_unwinder = &record_btrace_to_get_unwinder;
+  ops->to_get_tailcall_unwinder = &record_btrace_to_get_tailcall_unwinder;
   ops->to_resume = record_btrace_resume;
   ops->to_wait = record_btrace_wait;
   ops->to_find_new_threads = record_btrace_find_new_threads;
This page took 0.029292 seconds and 4 git commands to generate.