Split TRY_CATCH into TRY + CATCH
[deliverable/binutils-gdb.git] / gdb / target.c
index d2f0050ee101f5d057e355414dc2b6db5c0512f8..af94f48279abaa5291435537a918fd5fd7f4b035 100644 (file)
@@ -105,9 +105,6 @@ static char *default_pid_to_str (struct target_ops *ops, ptid_t ptid);
 static enum exec_direction_kind default_execution_direction
     (struct target_ops *self);
 
-static CORE_ADDR default_target_decr_pc_after_break (struct target_ops *ops,
-                                                    struct gdbarch *gdbarch);
-
 static struct target_ops debug_target;
 
 #include "target-delegates.c"
@@ -817,9 +814,8 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
   if (gdbarch_fetch_tls_load_module_address_p (target_gdbarch ()))
     {
       ptid_t ptid = inferior_ptid;
-      volatile struct gdb_exception ex;
 
-      TRY_CATCH (ex, RETURN_MASK_ALL)
+      TRY
        {
          CORE_ADDR lm_addr;
          
@@ -832,7 +828,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
        }
       /* If an error occurred, print TLS related messages here.  Otherwise,
          throw the error to some higher catcher.  */
-      if (ex.reason < 0)
+      CATCH (ex, RETURN_MASK_ALL)
        {
          int objfile_is_library = (objfile->flags & OBJF_SHARED);
 
@@ -881,6 +877,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
              break;
            }
        }
+      END_CATCH
     }
   /* It wouldn't be wrong here to try a gdbarch method, too; finding
      TLS is an ABI-specific thing.  But we don't do that yet.  */
@@ -3398,9 +3395,9 @@ target_supports_btrace (enum btrace_format format)
 /* See target.h.  */
 
 struct btrace_target_info *
-target_enable_btrace (ptid_t ptid)
+target_enable_btrace (ptid_t ptid, const struct btrace_config *conf)
 {
-  return current_target.to_enable_btrace (&current_target, ptid);
+  return current_target.to_enable_btrace (&current_target, ptid, conf);
 }
 
 /* See target.h.  */
@@ -3431,6 +3428,14 @@ target_read_btrace (struct btrace_data *btrace,
 
 /* See target.h.  */
 
+const struct btrace_config *
+target_btrace_conf (const struct btrace_target_info *btinfo)
+{
+  return current_target.to_btrace_conf (&current_target, btinfo);
+}
+
+/* See target.h.  */
+
 void
 target_stop_recording (void)
 {
@@ -3564,23 +3569,6 @@ target_get_tailcall_unwinder (void)
   return current_target.to_get_tailcall_unwinder (&current_target);
 }
 
-/* Default implementation of to_decr_pc_after_break.  */
-
-static CORE_ADDR
-default_target_decr_pc_after_break (struct target_ops *ops,
-                                   struct gdbarch *gdbarch)
-{
-  return gdbarch_decr_pc_after_break (gdbarch);
-}
-
-/* See target.h.  */
-
-CORE_ADDR
-target_decr_pc_after_break (struct gdbarch *gdbarch)
-{
-  return current_target.to_decr_pc_after_break (&current_target, gdbarch);
-}
-
 /* See target.h.  */
 
 void
This page took 0.030087 seconds and 4 git commands to generate.