Beispiel #1
0
void CmdInstrument::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_type);
  thrift.write(m_enabled);
  ASSERT(m_instPoints);
  InstPointInfo::SendImpl(*m_instPoints, thrift);
}
void DebuggerCommand::sendImpl(DebuggerThriftBuffer &thrift) {
  TRACE(2, "DebuggerCommand::sendImpl\n");
  thrift.write((int32_t)m_type);
  thrift.write(m_class);
  thrift.write(m_body);
  thrift.write(m_version);
}
Beispiel #3
0
void CmdMachine::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_sandboxes);
  thrift.write(m_rpcConfig);
  thrift.write(m_force);
  thrift.write(m_succeed);
}
Beispiel #4
0
// Always called from send and implements specific
// logic for serializing a list command to send via Thrift.
void CmdList::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_file);
  thrift.write(m_line1);
  thrift.write(m_line2);
  thrift.write(m_code);
}
Beispiel #5
0
void CmdEval::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_output);
  thrift.write(m_frame);
  thrift.write(m_bypassAccessCheck);
  if (this->m_version == 2) thrift.write(m_failed);
}
void CmdInternalTesting::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_arg);
  // Write less data on purpose, to get the server to choke on deserialization
  if ((m_arg != "shortcmd")) {
    thrift.write(m_unused);
  }
}
Beispiel #7
0
void CmdWhere::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  {
    String sdata;
    DebuggerWireHelpers::WireSerialize(m_stacktrace, sdata);
    thrift.write(sdata);
  }
  thrift.write(m_stackArgs);
}
Beispiel #8
0
void CmdVariable::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_frame);
  {
    String sdata;
    DebuggerWireHelpers::WireSerialize(m_variables, sdata);
    thrift.write(sdata);
  }
  thrift.write(m_global);
}
Beispiel #9
0
void InstPointInfo::sendImpl(DebuggerThriftBuffer &thrift) {
  TRACE(2, "InstPointInfo::sendImpl\n");
  thrift.write(m_locType);
  thrift.write(m_valid);
  thrift.write(m_file);
  thrift.write(m_line);
  thrift.write(m_func);
  thrift.write(m_desc);
  thrift.write(m_code);
}
Beispiel #10
0
void CmdPrint::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  if (m_printLevel > 0) {
    g_context->setDebuggerPrintLevel(m_printLevel);
  }
  thrift.write(m_ret);
  if (m_printLevel > 0) {
    g_context->setDebuggerPrintLevel(-1);
  }
  thrift.write(m_output);
  thrift.write(m_frame);
  thrift.write(m_bypassAccessCheck);
  thrift.write(m_printLevel);
}
Beispiel #11
0
void InstPointInfo::SendImpl(const InstPointInfoPtrVec& ips,
                             DebuggerThriftBuffer &thrift) {
  TRACE(2, "InstPointInfo::SendImpl\n");
  int16_t size = ips.size();
  thrift.write(size);
  for (int i = 0; i < size; i++) {
    ips[i]->sendImpl(thrift);
  }
}
Beispiel #12
0
void CmdVariable::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_frame);
  {
    String sdata;
    DebuggerWireHelpers::WireSerialize(m_variables, sdata);
    thrift.write(sdata);
  }
  thrift.write(m_global);
  if (m_version == 2) {
    thrift.write(m_formatMaxLen);
    thrift.write(m_varName);
    thrift.write(m_filter);
  }
}
Beispiel #13
0
void CmdPrint::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  if (m_printLevel > 0) {
    g_context->setDebuggerPrintLevel(m_printLevel);
  }
  {
    String sdata;
    DebuggerWireHelpers::WireSerialize(m_ret, sdata);
    thrift.write(sdata);
  }
  if (m_printLevel > 0) {
    g_context->setDebuggerPrintLevel(-1);
  }
  thrift.write(m_output);
  thrift.write(m_frame);
  thrift.write(m_bypassAccessCheck);
  thrift.write(m_printLevel);
  thrift.write(m_noBreak);
}
Beispiel #14
0
void CmdShell::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_args);
  thrift.write(m_out);
}
void CmdFlowControl::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_count);
}
Beispiel #16
0
void CmdThread::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_out);
  thrift.write(m_threads);
}
Beispiel #17
0
void CmdRun::sendImpl(DebuggerThriftBuffer &thrift) {
  TRACE(2, "CmdRun::sendImpl\n");
  DebuggerCommand::sendImpl(thrift);
  thrift.write(*m_args);
}
Beispiel #18
0
void CmdExample::sendImpl(DebuggerThriftBuffer &thrift) {
  CmdExtended::sendImpl(thrift);
  thrift.write(m_input);
  thrift.write(m_output);
}
Beispiel #19
0
void CmdSignal::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_signum);
}
Beispiel #20
0
void CmdExtension::sendImpl(DebuggerThriftBuffer &thrift) {
  CmdExtended::sendImpl(thrift);
  thrift.write(m_args);
  thrift.write(m_out);
  thrift.write(m_err);
}
Beispiel #21
0
void CmdVariable::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_frame);
  thrift.write(m_variables);
  thrift.write(m_global);
}
Beispiel #22
0
void CmdGlobal::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_globals);
}
void CmdInterrupt::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_interrupt);
  thrift.write(m_program);
  thrift.write(m_errorMsg);
  thrift.write(m_threadId);
  thrift.write(m_pendingJump);
  if (m_site) {
    thrift.write(true);
    thrift.write(m_site->getFile());
    thrift.write(m_site->getLine0());
    thrift.write(m_site->getChar0());
    thrift.write(m_site->getLine1());
    thrift.write(m_site->getChar1());
    thrift.write(m_site->getNamespace());
    thrift.write(m_site->getClass());
    thrift.write(m_site->getFunction());
    Variant e = m_site->getException();
    if (e.isNull()) {
      thrift.write("");
    } else if (e.isObject()) {
      thrift.write(e.toObject()->o_getClassName());
    } else {
      String ex(BreakPointInfo::ErrorClassName);
      thrift.write(ex);
    }
    thrift.write(e.toString());
  } else {
    thrift.write(false);
  }
  BreakPointInfo::SendImpl(m_matched, thrift);
}
Beispiel #24
0
void CmdRun::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(*m_args);
}
Beispiel #25
0
void CmdInterrupt::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  assert(m_interrupt != ExceptionHandler); // Server-side only.
  thrift.write(m_interrupt);
  thrift.write(m_program);
  thrift.write(m_errorMsg);
  thrift.write(m_threadId);
  // Used to be m_pendingJump, but that's been removed. Write false until
  // we rev the protocol.
  thrift.write(false);
  if (m_site) {
    thrift.write(true);
    thrift.write(m_site->getFile());
    thrift.write(m_site->getLine0());
    thrift.write(m_site->getChar0());
    thrift.write(m_site->getLine1());
    thrift.write(m_site->getChar1());
    thrift.write(m_site->getNamespace());
    thrift.write(m_site->getClass());
    thrift.write(m_site->getFunction());
    Variant e = m_site->getError();
    if (e.isNull()) {
      thrift.write("");
    } else if (e.isObject()) {
      thrift.write(e.toObject()->getClassName());
    } else {
      String ex(BreakPointInfo::ErrorClassName);
      thrift.write(ex);
    }
    thrift.write(e.toString());
  } else {
    thrift.write(false);
  }
  BreakPointInfo::SendImpl(0, m_matched, thrift);
}
Beispiel #26
0
void CmdUser::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_cmd);
}
Beispiel #27
0
void DebuggerCommand::sendImpl(DebuggerThriftBuffer &thrift) {
  thrift.write((int32)m_type);
  thrift.write(m_class);
  thrift.write(m_body);
  thrift.write(m_version);
}
Beispiel #28
0
void CmdWhere::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_stacktrace);
}
void CmdHeaptrace::sendImpl(DebuggerThriftBuffer &thrift) {
  DebuggerCommand::sendImpl(thrift);
  thrift.write(m_accum.typesMap);
  thrift.write(m_accum.sizeMap);
  thrift.write(m_accum.adjacencyList);
}
Beispiel #30
0
void CmdEval::sendImpl(DebuggerThriftBuffer &thrift) {
    DebuggerCommand::sendImpl(thrift);
    thrift.write(m_output);
    thrift.write(m_frame);
    thrift.write(m_bypassAccessCheck);
}