if (errcode < 0)
{
if (errcode != -pte_eos)
- warning (_("Failed to synchronize onto the Intel(R) Processor "
+ warning (_("Failed to synchronize onto the Intel Processor "
"Trace stream: %s."), pt_errstr (pt_errcode (errcode)));
break;
}
pt_insn_get_offset (decoder, &offset);
- warning (_("Failed to decode Intel(R) Processor Trace near trace "
+ warning (_("Failed to decode Intel Processor Trace near trace "
"offset 0x%" PRIx64 " near recorded PC 0x%" PRIx64 ": %s."),
offset, insn.ip, pt_errstr (pt_errcode (errcode)));
const struct pt_asid *asid, uint64_t pc,
void *context)
{
- int errcode;
+ int result, errcode;
+ result = (int) size;
TRY
{
errcode = target_read_code ((CORE_ADDR) pc, buffer, size);
if (errcode != 0)
- return -pte_nomap;
+ result = -pte_nomap;
}
CATCH (error, RETURN_MASK_ERROR)
{
- return -pte_nomap;
+ result = -pte_nomap;
}
END_CATCH
- return size;
+ return result;
}
/* Translate the vendor from one enum to another. */
btrace_add_pc (tp);
}
-/* Compute the function branch trace from Intel(R) Processor Trace. */
+/* Compute the function branch trace from Intel Processor Trace
+ format. */
static void
btrace_compute_ftrace_pt (struct thread_info *tp,
errcode = pt_cpu_errata (&config.errata, &config.cpu);
if (errcode < 0)
- error (_("Failed to configure the Intel(R) Processor Trace decoder: %s."),
+ error (_("Failed to configure the Intel Processor Trace decoder: %s."),
pt_errstr (pt_errcode (errcode)));
decoder = pt_insn_alloc_decoder (&config);
if (decoder == NULL)
- error (_("Failed to allocate the Intel(R) Processor Trace decoder."));
+ error (_("Failed to allocate the Intel Processor Trace decoder."));
TRY
{
image = pt_insn_get_image(decoder);
if (image == NULL)
- error (_("Failed to configure the Intel(R) Processor Trace decoder."));
+ error (_("Failed to configure the Intel Processor Trace decoder."));
errcode = pt_image_set_callback(image, btrace_pt_readmem_callback, NULL);
if (errcode < 0)
- error (_("Failed to configure the Intel(R) Processor Trace decoder: "
+ error (_("Failed to configure the Intel Processor Trace decoder: "
"%s."), pt_errstr (pt_errcode (errcode)));
ftrace_add_pt (decoder, &btinfo->begin, &btinfo->end, &level,
#if !defined (HAVE_LIBIPT)
if (conf->format == BTRACE_FORMAT_PT)
- error (_("GDB does not support Intel(R) Processor Trace."));
+ error (_("GDB does not support Intel Processor Trace."));
#endif /* !defined (HAVE_LIBIPT) */
if (!target_supports_btrace (conf->format))
error (_("Target does not support branch tracing."));
- DEBUG ("enable thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+ DEBUG ("enable thread %s (%s)", print_thread_id (tp),
+ target_pid_to_str (tp->ptid));
tp->btrace.target = target_enable_btrace (tp->ptid, conf);
if (btp->target == NULL)
return;
- DEBUG ("disable thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+ DEBUG ("disable thread %s (%s)", print_thread_id (tp),
+ target_pid_to_str (tp->ptid));
target_disable_btrace (btp->target);
btp->target = NULL;
if (btp->target == NULL)
return;
- DEBUG ("teardown thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+ DEBUG ("teardown thread %s (%s)", print_thread_id (tp),
+ target_pid_to_str (tp->ptid));
target_teardown_btrace (btp->target);
btp->target = NULL;
struct cleanup *cleanup;
int errcode;
- DEBUG ("fetch thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+ DEBUG ("fetch thread %s (%s)", print_thread_id (tp),
+ target_pid_to_str (tp->ptid));
btinfo = &tp->btrace;
tinfo = btinfo->target;
struct btrace_thread_info *btinfo;
struct btrace_function *it, *trash;
- DEBUG ("clear thread %d (%s)", tp->num, target_pid_to_str (tp->ptid));
+ DEBUG ("clear thread %s (%s)", print_thread_id (tp),
+ target_pid_to_str (tp->ptid));
/* Make sure btrace frames that may hold a pointer into the branch
trace data are destroyed. */
}
if (errcode != -pte_eos)
- warning (_("Failed to synchronize onto the Intel(R) Processor Trace "
+ warning (_("Failed to synchronize onto the Intel Processor Trace "
"stream: %s."), pt_errstr (pt_errcode (errcode)));
}
errcode = pt_cpu_errata (&config.errata, &config.cpu);
if (errcode < 0)
- error (_("Failed to configure the Intel(R) Processor Trace decoder: %s."),
+ error (_("Failed to configure the Intel Processor Trace decoder: %s."),
pt_errstr (pt_errcode (errcode)));
decoder = pt_pkt_alloc_decoder (&config);
if (decoder == NULL)
- error (_("Failed to allocate the Intel(R) Processor Trace decoder."));
+ error (_("Failed to allocate the Intel Processor Trace decoder."));
TRY
{
0, &maintenance_set_cmdlist);
add_prefix_cmd ("pt", class_maintenance, maint_btrace_pt_set_cmd, _("\
-Set Intel(R) Processor Trace specific variables."),
+Set Intel Processor Trace specific variables."),
&maint_btrace_pt_set_cmdlist, "maintenance set btrace pt ",
0, &maint_btrace_set_cmdlist);
0, &maintenance_show_cmdlist);
add_prefix_cmd ("pt", class_maintenance, maint_btrace_pt_show_cmd, _("\
-Show Intel(R) Processor Trace specific variables."),
+Show Intel Processor Trace specific variables."),
&maint_btrace_pt_show_cmdlist, "maintenance show btrace pt ",
0, &maint_btrace_show_cmdlist);