예제 #1
0
struct btrace_target_info *
x86_linux_nat_target::enable_btrace (ptid_t ptid,
				     const struct btrace_config *conf)
{
  struct btrace_target_info *tinfo = nullptr;
  TRY
    {
      tinfo = linux_enable_btrace (ptid, conf);
    }
  CATCH (exception, RETURN_MASK_ERROR)
    {
      error (_("Could not enable branch tracing for %s: %s"),
	     target_pid_to_str (ptid), exception.message);
    }
예제 #2
0
파일: x86-linux-nat.c 프로젝트: msmania/gdb
static struct btrace_target_info *
x86_linux_enable_btrace (struct target_ops *self, ptid_t ptid,
                         const struct btrace_config *conf)
{
    struct btrace_target_info *tinfo;

    errno = 0;
    tinfo = linux_enable_btrace (ptid, conf);

    if (tinfo == NULL)
        error (_("Could not enable branch tracing for %s: %s."),
               target_pid_to_str (ptid), safe_strerror (errno));

    return tinfo;
}
예제 #3
0
static struct btrace_target_info *
amd64_linux_enable_btrace (struct target_ops *self, ptid_t ptid)
{
  struct btrace_target_info *tinfo;
  struct gdbarch *gdbarch;

  errno = 0;
  tinfo = linux_enable_btrace (ptid);

  if (tinfo == NULL)
    error (_("Could not enable branch tracing for %s: %s."),
	   target_pid_to_str (ptid), safe_strerror (errno));

  /* Fill in the size of a pointer in bits.  */
  gdbarch = target_thread_architecture (ptid);
  tinfo->ptr_bits = gdbarch_ptr_bit (gdbarch);

  return tinfo;
}