mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
Add some more tests for breakpoint serialization.
Serialize breakpoint names & the hardware_requested attributes. Also added a few missing affordances to SBBreakpoint whose absence writing the tests pointed out. <rdar://problem/12611863> llvm-svn: 282036
This commit is contained in:
@@ -448,6 +448,31 @@ size_t SBBreakpoint::GetNumLocations() const {
|
||||
return num_locs;
|
||||
}
|
||||
|
||||
void SBBreakpoint::SetCommandLineCommands(SBStringList &commands) {
|
||||
if (!m_opaque_sp)
|
||||
return;
|
||||
if (commands.GetSize() == 0)
|
||||
return;
|
||||
|
||||
std::lock_guard<std::recursive_mutex> guard(
|
||||
m_opaque_sp->GetTarget().GetAPIMutex());
|
||||
std::unique_ptr<BreakpointOptions::CommandData> cmd_data_up(
|
||||
new BreakpointOptions::CommandData(*commands));
|
||||
|
||||
m_opaque_sp->GetOptions()->SetCommandDataCallback(cmd_data_up);
|
||||
}
|
||||
|
||||
bool SBBreakpoint::GetCommandLineCommands(SBStringList &commands) {
|
||||
if (!m_opaque_sp)
|
||||
return false;
|
||||
StringList command_list;
|
||||
bool has_commands =
|
||||
m_opaque_sp->GetOptions()->GetCommandLineCallbacks(command_list);
|
||||
if (has_commands)
|
||||
commands.AppendList(command_list);
|
||||
return has_commands;
|
||||
}
|
||||
|
||||
bool SBBreakpoint::GetDescription(SBStream &s) {
|
||||
return GetDescription(s, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user