[all-commits] [llvm/llvm-project] eaeb8d: [LLDB] add arch-specific watchpoint behavior defau...
Jason Molenda via All-commits
all-commits at lists.llvm.org
Tue Feb 14 11:35:57 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eaeb8ddd4a9d3799470479a532e721d017f22a70
https://github.com/llvm/llvm-project/commit/eaeb8ddd4a9d3799470479a532e721d017f22a70
Author: Jason Molenda <jason at molenda.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M lldb/include/lldb/Target/Process.h
M lldb/source/API/SBProcess.cpp
M lldb/source/Commands/CommandObjectWatchpoint.cpp
M lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
M lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
M lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.h
M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
M lldb/source/Target/Process.cpp
M lldb/source/Target/StopInfo.cpp
M lldb/source/Target/Target.cpp
Log Message:
-----------
[LLDB] add arch-specific watchpoint behavior defaults to lldb
lldb was originally designed to get the watchpoint exception behavior
from the gdb remote serial protocol stub -- exceptions are either
received before the instruction executes, or after the instruction
has executed. This behavior was reported via two lldb extensions
to gdb RSP, so generic remote stubs like gdbserver or a JTAG stub,
would not tell lldb which behavior was correct, and it would default
to "exceptions are received after the instruction has executed".
Two architectures hard coded their correct "exceptions before
instruction" behavior, to work around this issue.
Most architectures have a fixed behavior of watchpoint exceptions,
and we can center that information in lldb. We can allow a remote
stub to override the default behavior via our packet extensions
if it's needed on a specific target.
This patch also separates the fetching of the number of watchpoints
from whether exceptions are before/after the insn. Currently if
lldb couldn't fetch the number of watchpoints (not really needed), it
also wouldn't get when exceptions are received, and watchpoint
handling would fail. lldb doesn't actually use the number of
watchpoints for anything beyond printing it to the user.
Differential Revision: https://reviews.llvm.org/D143215
rdar://101426626
More information about the All-commits
mailing list