Skip to content

Commit dc97ca6

Browse files
committed
Make breakpoint stop reason more accurate
1 parent 7af0265 commit dc97ca6

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,34 +1014,6 @@ void DAP::SetThreadFormat(llvm::StringRef format) {
10141014
}
10151015
}
10161016

1017-
InstructionBreakpoint *
1018-
DAP::GetInstructionBreakpoint(const lldb::break_id_t bp_id) {
1019-
for (auto &bp : instruction_breakpoints) {
1020-
if (bp.second.bp.GetID() == bp_id)
1021-
return &bp.second;
1022-
}
1023-
return nullptr;
1024-
}
1025-
1026-
InstructionBreakpoint *
1027-
DAP::GetInstructionBPFromStopReason(lldb::SBThread &thread) {
1028-
const auto num = thread.GetStopReasonDataCount();
1029-
InstructionBreakpoint *inst_bp = nullptr;
1030-
for (size_t i = 0; i < num; i += 2) {
1031-
// thread.GetStopReasonDataAtIndex(i) will return the bp ID and
1032-
// thread.GetStopReasonDataAtIndex(i+1) will return the location
1033-
// within that breakpoint. We only care about the bp ID so we can
1034-
// see if this is an instruction breakpoint that is getting hit.
1035-
lldb::break_id_t bp_id = thread.GetStopReasonDataAtIndex(i);
1036-
inst_bp = GetInstructionBreakpoint(bp_id);
1037-
// If any breakpoint is not an instruction breakpoint, then stop and
1038-
// report this as a normal breakpoint
1039-
if (inst_bp == nullptr)
1040-
return nullptr;
1041-
}
1042-
return inst_bp;
1043-
}
1044-
10451017
lldb::SBValueList *Variables::GetTopLevelScope(int64_t variablesReference) {
10461018
switch (variablesReference) {
10471019
case VARREF_LOCALS:

lldb/tools/lldb-dap/DAP.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ struct DAP {
233233
/// @}
234234

235235
ExceptionBreakpoint *GetExceptionBreakpoint(const std::string &filter);
236-
ExceptionBreakpoint *GetExceptionBreakpoint(const lldb::break_id_t bp_id);
237236

238237
/// Redirect stdout and stderr fo the IDE's console output.
239238
///
@@ -445,18 +444,6 @@ struct DAP {
445444
}
446445
return nullptr;
447446
}
448-
449-
FunctionBreakpoint *GetFunctionBPFromStopReason(lldb::SBThread &thread);
450-
451-
FunctionBreakpoint *GetFunctionBreakPoint(const lldb::break_id_t bp_id);
452-
453-
void WaitWorkerThreadsToExit();
454-
455-
private:
456-
// Send the JSON in "json_str" to the "out" stream. Correctly send the
457-
// "Content-Length:" field followed by the length, followed by the raw
458-
// JSON bytes.
459-
void SendJSON(const std::string &json_str);
460447
};
461448

462449
} // namespace lldb_dap

0 commit comments

Comments
 (0)