Skip to content

Commit cfe7dc6

Browse files
committed
Fix review comments from David
1 parent 0cedff0 commit cfe7dc6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,13 +502,17 @@ NativeProcessWindows::OnDebugException(bool first_chance,
502502
if (FindSoftwareBreakpoint(exception_addr)) {
503503
LLDB_LOG(log, "Hit non-loader breakpoint at address {0:x}.",
504504
exception_addr);
505-
505+
// The current PC is AFTER the BP opcode, on all architectures.
506506
reg_ctx.SetPC(reg_ctx.GetPC() - GetSoftwareBreakpointPCOffset());
507507
StopThread(thread_id, StopReason::eStopReasonBreakpoint);
508508
SetState(eStateStopped, true);
509509
return ExceptionResult::MaskException;
510510
} else {
511511
const std::vector<ULONG_PTR> &args = record.GetExceptionArguments();
512+
// Check that the ExceptionInformation array of EXCEPTION_RECORD
513+
// contains at least two elements: the first is a read-write flag
514+
// indicating the type of data access operation (read or write) while
515+
// the second contains the virtual address of the accessed data.
512516
if (args.size() >= 2) {
513517
uint32_t hw_id = LLDB_INVALID_INDEX32;
514518
reg_ctx.GetWatchpointHitIndex(hw_id, args[1]);

lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ NativeRegisterContextWindows_arm64::NativeRegisterContextWindows_arm64(
148148
// breakpoints and watchpoints on Windows. The values set below are based
149149
// on tests conducted on Windows 11 with Snapdragon Elite X hardware.
150150
m_max_hwp_supported = 1;
151-
m_max_hbp_supported = 0;
152151
}
153152

154153
bool NativeRegisterContextWindows_arm64::IsGPR(uint32_t reg_index) const {

0 commit comments

Comments
 (0)