本文整理汇总了C++中BreakPointInfoPtr::site方法的典型用法代码示例。如果您正苦于以下问题:C++ BreakPointInfoPtr::site方法的具体用法?C++ BreakPointInfoPtr::site怎么用?C++ BreakPointInfoPtr::site使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BreakPointInfoPtr
的用法示例。
在下文中一共展示了BreakPointInfoPtr::site方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: t_getcurrentlocation
Variant c_DebuggerClientCmdUser::t_getcurrentlocation() {
TRACE(5, "c_DebuggerClientCmdUser::t_getcurrentlocation\n");
BreakPointInfoPtr bpi = m_client->getCurrentLocation();
if (!bpi) return Array::Create();
ArrayInit ret(6);
ret.set(s_file, String(bpi->m_file));
ret.set(s_line, (int64_t)bpi->m_line1);
ret.set(s_namespace, String(bpi->getNamespace()));
ret.set(s_class, String(bpi->getClass()));
ret.set(s_function, String(bpi->getFunction()));
ret.set(s_text, String(bpi->site()));
return ret.create();
}
示例2: t_getcurrentlocation
Variant c_DebuggerClientCmdUser::t_getcurrentlocation() {
INSTANCE_METHOD_INJECTION_BUILTIN(DebuggerClientCmdUser, DebuggerClientCmdUser::getcurrentlocation);
BreakPointInfoPtr bpi = m_client->getCurrentLocation();
Array ret(Array::Create());
if (bpi) {
ret.set("file", String(bpi->m_file));
ret.set("line", (int64)bpi->m_line1);
ret.set("namespace", String(bpi->getNamespace()));
ret.set("class", String(bpi->getClass()));
ret.set("function", String(bpi->getFunction()));
ret.set("text", String(bpi->site()));
}
return ret;
}
示例3: processUpdate
bool CmdBreak::processUpdate(DebuggerClient *client) {
m_breakpoints = client->getBreakPoints();
if (m_breakpoints->empty()) {
client->error("There is no breakpoint to clear or toggle.");
client->tutorial(
"Use '[b]reak ?|[h]elp' to read how to set breakpoints. "
);
return true;
}
if (client->argCount() == 1) {
BreakPointInfoPtrVec *matched = client->getMatchedBreakPoints();
BreakPointInfoPtrVec *bps = client->getBreakPoints();
bool found = false;
for (unsigned int i = 0; i < matched->size(); i++) {
BreakPointInfoPtr bpm = (*matched)[i];
BreakPointInfoPtr bp;
int index = 0;
for (; index < (int)bps->size(); index++) {
if (bpm->same((*bps)[index])) {
bp = (*bps)[index];
break;
}
}
if (bp) {
const char *action;
if (hasClearArg(client)) {
action = "cleared";
bps->erase(bps->begin() + index);
} else if (hasEnableArg(client)) {
action = "updated";
bp->setState(BreakPointInfo::Always);
} else if (hasDisableArg(client)) {
action = "updated";
bp->setState(BreakPointInfo::Disabled);
} else {
assert(hasToggleArg(client));
action = "updated";
bp->toggle();
}
client->info("Breakpoint %d is %s %s", bp->index(),
action, bp->site().c_str());
found = true;
}
}
if (found) {
updateImpl(client);
return true;
}
client->error("There is no current breakpoint to clear or toggle.");
return true;
}
if (client->arg(2, "all")) {
if (hasClearArg(client)) {
m_breakpoints->clear();
updateImpl(client);
client->info("All breakpoints are cleared.");
return true;
}
for (unsigned int i = 0; i < m_breakpoints->size(); i++) {
BreakPointInfoPtr bpi = (*m_breakpoints)[i];
if (hasEnableArg(client)) {
bpi->setState(BreakPointInfo::Always);
}
else if (hasDisableArg(client)) {
bpi->setState(BreakPointInfo::Disabled);
}
else {
assert(hasToggleArg(client));
bpi->toggle();
}
}
updateImpl(client);
return processList(client);
}
string snum = client->argValue(2);
if (!DebuggerClient::IsValidNumber(snum)) {
client->error("'[b]reak [c]lear|[t]oggle' needs an {index} argument.");
client->tutorial(
"You will have to run '[b]reak [l]ist' first to see a list of valid "
"numbers or indices to specify."
);
return true;
}
int index = -1;
int num = atoi(snum.c_str());
for (unsigned int i = 0; i < m_breakpoints->size(); i++) {
if (m_breakpoints->at(i)->index() == num) {
index = i;
break;
}
}
if (index < 0) {
client->error("\"%s\" is not a valid breakpoint index. Choose one from "
//.........这里部分代码省略.........