/* Select target systems and architectures at runtime for GDB.
- Copyright (C) 1990-2014 Free Software Foundation, Inc.
+ Copyright (C) 1990-2015 Free Software Foundation, Inc.
Contributed by Cygnus Support.
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"
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;
}
/* 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);
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. */
return TARGET_XFER_E_IO;
if (!ptid_equal (inferior_ptid, null_ptid))
- inf = find_inferior_pid (ptid_get_pid (inferior_ptid));
+ inf = find_inferior_ptid (inferior_ptid);
else
inf = NULL;
struct inferior *inf;
/* Fall-back to the "main" address space of the inferior. */
- inf = find_inferior_pid (ptid_get_pid (ptid));
+ inf = find_inferior_ptid (ptid);
if (inf == NULL || inf->aspace == NULL)
internal_error (__FILE__, __LINE__,
/* See target.h. */
+int
+target_supports_btrace (enum btrace_format format)
+{
+ return current_target.to_supports_btrace (¤t_target, 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 (¤t_target, ptid);
+ return current_target.to_enable_btrace (¤t_target, ptid, conf);
}
/* See target.h. */
/* See target.h. */
enum btrace_error
-target_read_btrace (VEC (btrace_block_s) **btrace,
+target_read_btrace (struct btrace_data *btrace,
struct btrace_target_info *btinfo,
enum btrace_read_type type)
{
/* See target.h. */
+const struct btrace_config *
+target_btrace_conf (const struct btrace_target_info *btinfo)
+{
+ return current_target.to_btrace_conf (¤t_target, btinfo);
+}
+
+/* See target.h. */
+
void
target_stop_recording (void)
{
return current_target.to_get_tailcall_unwinder (¤t_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 (¤t_target, gdbarch);
-}
-
/* See target.h. */
void