This is the main part of a change to add breakpoint save and restore to lldb.

Still to come:
1) SB API's
2) Testcases
3) Loose ends:
   a) serialize Thread options
   b) serialize Exception resolvers
4) "break list --file" should list breakpoints contained in a file and
   "break read -f 1 3 5" should then read in only those breakpoints.

<rdar://problem/12611863>

llvm-svn: 281273
This commit is contained in:
Jim Ingham
2016-09-12 23:10:56 +00:00
parent 9db7948e90
commit e14dc26857
23 changed files with 1861 additions and 257 deletions

View File

@@ -420,7 +420,7 @@ void ScriptInterpreterPython::IOHandlerInputComplete(IOHandler &io_handler,
if (GenerateBreakpointCommandCallbackData(data_ap->user_source,
data_ap->script_source)
.Success()) {
BatonSP baton_sp(
BreakpointOptions::CommandBatonSP baton_sp(
new BreakpointOptions::CommandBaton(data_ap.release()));
bp_options->SetCallback(
ScriptInterpreterPython::BreakpointCallbackFunction, baton_sp);
@@ -1050,11 +1050,11 @@ bool ScriptInterpreterPython::ExecuteOneLineWithReturn(
}
case eScriptReturnTypeCharStrOrNone: // char* or NULL if py_return ==
// Py_None
{
const char format[3] = "z";
success = PyArg_Parse(py_return.get(), format, (char **)ret_value);
break;
}
{
const char format[3] = "z";
success = PyArg_Parse(py_return.get(), format, (char **)ret_value);
break;
}
case eScriptReturnTypeBool: {
const char format[2] = "b";
success = PyArg_Parse(py_return.get(), format, (bool *)ret_value);
@@ -1251,7 +1251,8 @@ Error ScriptInterpreterPython::SetBreakpointCommandCallback(
Error error = GenerateBreakpointCommandCallbackData(data_ap->user_source,
data_ap->script_source);
if (error.Success()) {
BatonSP baton_sp(new BreakpointOptions::CommandBaton(data_ap.release()));
BreakpointOptions::CommandBatonSP baton_sp(
new BreakpointOptions::CommandBaton(data_ap.release()));
bp_options->SetCallback(ScriptInterpreterPython::BreakpointCallbackFunction,
baton_sp);
return error;