require_btrace_thread (void)
{
struct thread_info *tp;
- struct btrace_thread_info *btinfo;
DEBUG ("require");
btrace_fetch (tp);
- btinfo = &tp->btrace;
-
- if (btinfo->begin == NULL)
+ if (btrace_is_empty (tp))
error (_("No trace."));
return tp;
calls = 0;
btinfo = &tp->btrace;
- if (btinfo->begin != NULL)
+
+ if (!btrace_is_empty (tp))
{
struct btrace_call_iterator call;
struct btrace_insn_iterator insn;