[Lldb-commits] [PATCH] D145296: [lldb/Plugin] Add breakpoint setting support to ScriptedProcesses.
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 6 13:14:50 PST 2023
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcfe06f495beb: [lldb/Plugin] Add breakpoint setting support to ScriptedProcesses. (authored by mib).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145296/new/
https://reviews.llvm.org/D145296
Files:
lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
lldb/source/Plugins/Process/scripted/ScriptedProcess.h
Index: lldb/source/Plugins/Process/scripted/ScriptedProcess.h
===================================================================
--- lldb/source/Plugins/Process/scripted/ScriptedProcess.h
+++ lldb/source/Plugins/Process/scripted/ScriptedProcess.h
@@ -72,6 +72,8 @@
size_t DoWriteMemory(lldb::addr_t vm_addr, const void *buf, size_t size,
Status &error) override;
+ Status EnableBreakpointSite(BreakpointSite *bp_site) override;
+
ArchSpec GetArchitecture();
Status
Index: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
===================================================================
--- lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
+++ lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
@@ -267,6 +267,20 @@
return bytes_written;
}
+Status ScriptedProcess::EnableBreakpointSite(BreakpointSite *bp_site) {
+ assert(bp_site != nullptr);
+
+ if (bp_site->IsEnabled()) {
+ return {};
+ }
+
+ if (bp_site->HardwareRequired()) {
+ return Status("Scripted Processes don't support hardware breakpoints");
+ }
+
+ return EnableSoftwareBreakpoint(bp_site);
+}
+
ArchSpec ScriptedProcess::GetArchitecture() {
return GetTarget().GetArchitecture();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145296.502771.patch
Type: text/x-patch
Size: 1232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230306/c2276569/attachment-0001.bin>
More information about the lldb-commits
mailing list