| 1 | namespace lldb_private { |
| 2 | namespace python { |
| 3 | |
| 4 | PythonObject ToSWIGHelper(void *obj, swig_type_info *info) { |
| 5 | return {PyRefType::Owned, SWIG_NewPointerObj(obj, info, SWIG_POINTER_OWN)}; |
| 6 | } |
| 7 | |
| 8 | PythonObject SWIGBridge::ToSWIGWrapper(std::unique_ptr<lldb::SBValue> value_sb) { |
| 9 | return ToSWIGHelper(obj: value_sb.release(), SWIGTYPE_p_lldb__SBValue); |
| 10 | } |
| 11 | |
| 12 | PythonObject SWIGBridge::ToSWIGWrapper(std::unique_ptr<lldb::SBCommandReturnObject> result_up) { |
| 13 | return ToSWIGHelper(obj: result_up.release(), SWIGTYPE_p_lldb__SBCommandReturnObject); |
| 14 | } |
| 15 | |
| 16 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::ValueObjectSP value_sp) { |
| 17 | return ToSWIGWrapper(value_sb: std::unique_ptr<lldb::SBValue>(new lldb::SBValue(value_sp))); |
| 18 | } |
| 19 | |
| 20 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::TargetSP target_sp) { |
| 21 | return ToSWIGHelper(obj: new lldb::SBTarget(std::move(target_sp)), |
| 22 | SWIGTYPE_p_lldb__SBTarget); |
| 23 | } |
| 24 | |
| 25 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::ProcessSP process_sp) { |
| 26 | return ToSWIGHelper(obj: new lldb::SBProcess(std::move(process_sp)), |
| 27 | SWIGTYPE_p_lldb__SBProcess); |
| 28 | } |
| 29 | |
| 30 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::ModuleSP module_sp) { |
| 31 | return ToSWIGHelper(obj: new lldb::SBModule(std::move(module_sp)), |
| 32 | SWIGTYPE_p_lldb__SBModule); |
| 33 | } |
| 34 | |
| 35 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::ThreadPlanSP thread_plan_sp) { |
| 36 | return ToSWIGHelper(obj: new lldb::SBThreadPlan(std::move(thread_plan_sp)), |
| 37 | SWIGTYPE_p_lldb__SBThreadPlan); |
| 38 | } |
| 39 | |
| 40 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::BreakpointSP breakpoint_sp) { |
| 41 | return ToSWIGHelper(obj: new lldb::SBBreakpoint(std::move(breakpoint_sp)), |
| 42 | SWIGTYPE_p_lldb__SBBreakpoint); |
| 43 | } |
| 44 | |
| 45 | PythonObject SWIGBridge::ToSWIGWrapper(Status&& status) { |
| 46 | return ToSWIGHelper(obj: new lldb::SBError(std::move(status)), SWIGTYPE_p_lldb__SBError); |
| 47 | } |
| 48 | |
| 49 | PythonObject SWIGBridge::ToSWIGWrapper(std::unique_ptr<lldb::SBStructuredData> data_sb) { |
| 50 | return ToSWIGHelper(obj: data_sb.release(), SWIGTYPE_p_lldb__SBStructuredData); |
| 51 | } |
| 52 | |
| 53 | PythonObject SWIGBridge::ToSWIGWrapper(const StructuredDataImpl &data_impl) { |
| 54 | return ToSWIGWrapper(data_sb: std::unique_ptr<lldb::SBStructuredData>(new lldb::SBStructuredData(data_impl))); |
| 55 | } |
| 56 | |
| 57 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::ThreadSP thread_sp) { |
| 58 | return ToSWIGHelper(obj: new lldb::SBThread(std::move(thread_sp)), |
| 59 | SWIGTYPE_p_lldb__SBThread); |
| 60 | } |
| 61 | |
| 62 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::StackFrameSP frame_sp) { |
| 63 | return ToSWIGHelper(obj: new lldb::SBFrame(std::move(frame_sp)), |
| 64 | SWIGTYPE_p_lldb__SBFrame); |
| 65 | } |
| 66 | |
| 67 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::DebuggerSP debugger_sp) { |
| 68 | return ToSWIGHelper(obj: new lldb::SBDebugger(std::move(debugger_sp)), |
| 69 | SWIGTYPE_p_lldb__SBDebugger); |
| 70 | } |
| 71 | |
| 72 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::WatchpointSP watchpoint_sp) { |
| 73 | return ToSWIGHelper(obj: new lldb::SBWatchpoint(std::move(watchpoint_sp)), |
| 74 | SWIGTYPE_p_lldb__SBWatchpoint); |
| 75 | } |
| 76 | |
| 77 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::BreakpointLocationSP bp_loc_sp) { |
| 78 | return ToSWIGHelper(obj: new lldb::SBBreakpointLocation(std::move(bp_loc_sp)), |
| 79 | SWIGTYPE_p_lldb__SBBreakpointLocation); |
| 80 | } |
| 81 | |
| 82 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::ExecutionContextRefSP ctx_sp) { |
| 83 | return ToSWIGHelper(obj: new lldb::SBExecutionContext(std::move(ctx_sp)), |
| 84 | SWIGTYPE_p_lldb__SBExecutionContext); |
| 85 | } |
| 86 | |
| 87 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::TypeImplSP type_impl_sp) { |
| 88 | return ToSWIGHelper(obj: new lldb::SBType(type_impl_sp), SWIGTYPE_p_lldb__SBType); |
| 89 | } |
| 90 | |
| 91 | PythonObject SWIGBridge::ToSWIGWrapper(const TypeSummaryOptions &summary_options) { |
| 92 | return ToSWIGHelper(obj: new lldb::SBTypeSummaryOptions(summary_options), |
| 93 | SWIGTYPE_p_lldb__SBTypeSummaryOptions); |
| 94 | } |
| 95 | |
| 96 | PythonObject SWIGBridge::ToSWIGWrapper(const SymbolContext &sym_ctx) { |
| 97 | return ToSWIGHelper(obj: new lldb::SBSymbolContext(sym_ctx), |
| 98 | SWIGTYPE_p_lldb__SBSymbolContext); |
| 99 | } |
| 100 | |
| 101 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::ProcessLaunchInfoSP launch_info_sp) { |
| 102 | return ToSWIGHelper(obj: new lldb::ProcessLaunchInfoSP(std::move(launch_info_sp)), |
| 103 | SWIGTYPE_p_lldb__SBLaunchInfo); |
| 104 | } |
| 105 | |
| 106 | PythonObject SWIGBridge::ToSWIGWrapper(lldb::ProcessAttachInfoSP attach_info_sp) { |
| 107 | return ToSWIGHelper(obj: new lldb::ProcessAttachInfoSP(std::move(attach_info_sp)), |
| 108 | SWIGTYPE_p_lldb__SBAttachInfo); |
| 109 | } |
| 110 | |
| 111 | PythonObject SWIGBridge::(lldb::DataExtractorSP data_sp) { |
| 112 | return ToSWIGHelper(obj: new lldb::DataExtractorSP(std::move(data_sp)), |
| 113 | SWIGTYPE_p_lldb__SBData); |
| 114 | } |
| 115 | |
| 116 | ScopedPythonObject<lldb::SBCommandReturnObject> |
| 117 | SWIGBridge::ToSWIGWrapper(CommandReturnObject &cmd_retobj) { |
| 118 | return ScopedPythonObject<lldb::SBCommandReturnObject>( |
| 119 | new lldb::SBCommandReturnObject(cmd_retobj), |
| 120 | SWIGTYPE_p_lldb__SBCommandReturnObject); |
| 121 | } |
| 122 | |
| 123 | PythonObject SWIGBridge::ToSWIGWrapper(const Stream *s) { |
| 124 | return ToSWIGHelper(obj: new lldb::SBStream(), SWIGTYPE_p_lldb__SBStream); |
| 125 | } |
| 126 | |
| 127 | PythonObject SWIGBridge::ToSWIGWrapper(std::shared_ptr<lldb::SBStream> stream_sb) { |
| 128 | return ToSWIGHelper(obj: stream_sb.get(), SWIGTYPE_p_lldb__SBStream); |
| 129 | } |
| 130 | |
| 131 | PythonObject SWIGBridge::ToSWIGWrapper(Event *event) { |
| 132 | return ToSWIGHelper(obj: new lldb::SBEvent(event), SWIGTYPE_p_lldb__SBEvent); |
| 133 | } |
| 134 | |
| 135 | PythonObject SWIGBridge::ToSWIGWrapper( |
| 136 | std::unique_ptr<lldb::SBFileSpec> file_spec_sb) { |
| 137 | return ToSWIGHelper(obj: file_spec_sb.release(), SWIGTYPE_p_lldb__SBFileSpec); |
| 138 | } |
| 139 | |
| 140 | PythonObject SWIGBridge::ToSWIGWrapper( |
| 141 | std::unique_ptr<lldb::SBModuleSpec> module_spec_sb) { |
| 142 | return ToSWIGHelper(obj: module_spec_sb.release(), SWIGTYPE_p_lldb__SBModuleSpec); |
| 143 | } |
| 144 | |
| 145 | } // namespace python |
| 146 | } // namespace lldb_private |
| 147 | |