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); } }
void CmdInstrument::PrintInstPoints(DebuggerClient *client) { InstPointInfoPtrVec* ips = client->getInstPoints(); int size = ips->size(); client->print("%d instrumentation points", size); for (int i = 0; i < size; i++) { InstPointInfoPtr ipi = (*ips)[i]; if (ipi->m_locType == InstPointInfo::LocFileLine) { client->print(" %d\t%s\t%s\tfile:\t%s:%d", i, ipi->m_valid ? "valid" : "invalid", ipi->m_desc.c_str(), ipi->m_file.c_str(), ipi->m_line); } else if (ipi->m_locType == InstPointInfo::LocFuncEntry) { client->print(" %d\t%s\t%s\tfunc entry:\t%s", i, ipi->m_valid ? "valid" : "invalid", ipi->m_desc.c_str(), ipi->m_func.c_str()); } } }
void CmdInstrument::setClientOutput(DebuggerClient *client) { // Output all instrumentation point info client->setOutputType(DebuggerClient::OTValues); Array values; InstPointInfoPtrVec* ips = client->getInstPoints(); for (unsigned int i = 0; i < ips->size(); i++) { InstPointInfoPtr ipi = (*ips)[i]; Array instpoint; instpoint.set("valid", ipi->m_valid); instpoint.set("desc", ipi->m_desc); if (ipi->m_locType == InstPointInfo::LocFileLine) { instpoint.set("type", "file_line"); instpoint.set("file", ipi->m_file); instpoint.set("line", ipi->m_line); } else if (ipi->m_locType == InstPointInfo::LocFuncEntry) { instpoint.set("type", "func_entry"); instpoint.set("func", ipi->m_func); } values.append(instpoint); } client->setOTValues(values); }