mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 20:10:50 +08:00
Add the ability to deserialize only breakpoints matching a given name.
Also tests for this and the ThreadSpec serialization. llvm-svn: 282207
This commit is contained in:
@@ -1128,6 +1128,13 @@ bool SBTarget::DeleteAllBreakpoints() {
|
||||
|
||||
lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
|
||||
SBBreakpointList &new_bps) {
|
||||
SBStringList empty_name_list;
|
||||
return BreakpointsCreateFromFile(source_file, empty_name_list, new_bps);
|
||||
}
|
||||
|
||||
lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
|
||||
SBStringList &matching_names,
|
||||
SBBreakpointList &new_bps) {
|
||||
SBError sberr;
|
||||
TargetSP target_sp(GetSP());
|
||||
if (!target_sp) {
|
||||
@@ -1138,7 +1145,14 @@ lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
|
||||
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
|
||||
|
||||
BreakpointIDList bp_ids;
|
||||
sberr.ref() = target_sp->CreateBreakpointsFromFile(source_file.ref(), bp_ids);
|
||||
|
||||
std::vector<std::string> name_vector;
|
||||
size_t num_names = matching_names.GetSize();
|
||||
for (size_t i = 0; i < num_names; i++)
|
||||
name_vector.push_back(matching_names.GetStringAtIndex(i));
|
||||
|
||||
sberr.ref() = target_sp->CreateBreakpointsFromFile(source_file.ref(),
|
||||
name_vector, bp_ids);
|
||||
if (sberr.Fail())
|
||||
return sberr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user