[lldb] Improve breakpoint management for interactive scripted process
This patch improves breakpoint management when doing interactive scripted process debugging. In other to know which process set a breakpoint, we need to do some book keeping on the multiplexer scripted process. When initializing the multiplexer, we will first copy breakpoints that are already set on the driving target. Everytime we launch or resume, we should copy breakpoints from the multiplexer to the driving process. When creating a breakpoint from a child process, it needs to be set both on the multiplexer and on the driving process. We also tag the created breakpoint with the name and pid of the originator process. This patch also implements all the requirement to achieve proper breakpoint management. That involves: - Adding python interator for breakpoints and watchpoints in SBTarget - Add a new `ScriptedProcess.create_breakpoint` python method Differential Revision: https://reviews.llvm.org/D148548 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
1 parent
6cf668016e
commit
e31d0c20e4
16 files changed
+242
-4
No files matched your search
@@ -110,6 +110,22 @@ StructuredData::DictionarySP ScriptedProcessPythonInterface::GetThreadsInfo() {
|
||||
return dict;
|
||||
}
|
||||
|
||||
bool ScriptedProcessPythonInterface::CreateBreakpoint(lldb::addr_t addr,
|
||||
Status &error) {
|
||||
Status py_error;
|
||||
StructuredData::ObjectSP obj =
|
||||
Dispatch("create_breakpoint", py_error, addr, error);
|
||||
|
||||
// If there was an error on the python call, surface it to the user.
|
||||
if (py_error.Fail())
|
||||
error = py_error;
|
||||
|
||||
if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error))
|
||||
return {};
|
||||
|
||||
return obj->GetBooleanValue();
|
||||
}
|
||||
|
||||
lldb::DataExtractorSP ScriptedProcessPythonInterface::ReadMemoryAtAddress(
|
||||
lldb::addr_t address, size_t size, Status &error) {
|
||||
Status py_error;
|
||||
|
||||
Reference in new issue
Block a user