我正在Linux系统(内核4.15-Ubuntu 16.04)中运行C ++程序。当我想编译我的代码时,我收到与以下代码的第10行(“ for”循环)有关的信号11错误消息:
void ProfilerBlock::ReadStack(const trace::EventValue& event,
std::vector<std::string>* stack)
{
process_t pid = ProcessForEvent(event);
std::vector<std::string> symbolizedStack;
const auto* stackField =
value::ArrayValue::Cast(event.getEventField("stack"));
for (const auto& addressValue : *stackField)
{
uint64_t address = addressValue.AsULong();
symbols::Symbol symbol;
uint64_t offset = 0;
if (!_symbols.LookupSymbol(address, _images[pid], &symbol,
&offset))
symbol.set_name("Unknown Symbol");
if (boost::starts_with(symbol.name(), "lttng_profile"))
continue;
stack->push_back(symbol.name());
if (_dumpStacks)
std::cout << symbol.name() << " - " << address << std::endl;
}
if (_dumpStacks)
std::cout << std::endl;
}
有人对此有任何想法吗?