Skip to content

Commit aaeb653

Browse files
committed
Address review comments
1 parent 7bb11d6 commit aaeb653

File tree

12 files changed

+398
-336
lines changed

12 files changed

+398
-336
lines changed

lldb/bindings/python/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
9696
${lldb_python_target_dir}
9797
"utils"
9898
FILES "${LLDB_SOURCE_DIR}/examples/python/in_call_stack.py"
99+
"${LLDB_SOURCE_DIR}/examples/python/parsed_cmd.py"
99100
"${LLDB_SOURCE_DIR}/examples/python/symbolication.py"
100-
"${LLDB_SOURCE_DIR}/examples/python/parsed_cmd.py")
101+
)
101102

102103
create_python_package(
103104
${swig_target}

lldb/bindings/python/python-wrapper.swig

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,12 @@ PythonObject lldb_private::python::SWIGBridge::LLDBSwigPythonCreateScriptedThrea
287287
}
288288

289289
bool lldb_private::python::SWIGBridge::LLDBSWIGPythonCallThreadPlan(
290-
void *implementor, const char *method_name, lldb_private::Event *event,
290+
void *implementer, const char *method_name, lldb_private::Event *event,
291291
bool &got_error) {
292292
got_error = false;
293293

294294
PyErr_Cleaner py_err_cleaner(false);
295-
PythonObject self(PyRefType::Borrowed, static_cast<PyObject *>(implementor));
295+
PythonObject self(PyRefType::Borrowed, static_cast<PyObject *>(implementer));
296296
auto pfunc = self.ResolveName<PythonCallable>(method_name);
297297

298298
if (!pfunc.IsAllocated())
@@ -325,12 +325,12 @@ bool lldb_private::python::SWIGBridge::LLDBSWIGPythonCallThreadPlan(
325325
}
326326

327327
bool lldb_private::python::SWIGBridge::LLDBSWIGPythonCallThreadPlan(
328-
void *implementor, const char *method_name, lldb_private::Stream *stream,
328+
void *implementer, const char *method_name, lldb_private::Stream *stream,
329329
bool &got_error) {
330330
got_error = false;
331331

332332
PyErr_Cleaner py_err_cleaner(false);
333-
PythonObject self(PyRefType::Borrowed, static_cast<PyObject *>(implementor));
333+
PythonObject self(PyRefType::Borrowed, static_cast<PyObject *>(implementer));
334334
auto pfunc = self.ResolveName<PythonCallable>(method_name);
335335

336336
if (!pfunc.IsAllocated())
@@ -845,16 +845,6 @@ bool lldb_private::python::SWIGBridge::LLDBSwigPythonCallParsedCommandObject(
845845
return false;
846846

847847
auto cmd_retobj_arg = SWIGBridge::ToSWIGWrapper(cmd_retobj);
848-
849-
// FIXME:
850-
// I wanted to do something like:
851-
// size_t num_elem = args.size();
852-
// PythonList my_list(num_elem);
853-
// for (const char *elem : args)
854-
// my_list.append(PythonString(elem);
855-
//
856-
// and then pass my_list to the pfunc, but that crashes somewhere
857-
// deep in Python for reasons that aren't clear to me.
858848

859849
pfunc(SWIGBridge::ToSWIGWrapper(std::move(debugger)), SWIGBridge::ToSWIGWrapper(args_impl),
860850
SWIGBridge::ToSWIGWrapper(exe_ctx_ref_sp), cmd_retobj_arg.obj());

0 commit comments

Comments
 (0)