xref: /freebsd/contrib/llvm-project/lldb/bindings/python/python-swigsafecast.swig (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
14824e7fdSDimitry Andricnamespace lldb_private {
24824e7fdSDimitry Andricnamespace python {
34824e7fdSDimitry Andric
44824e7fdSDimitry AndricPythonObject ToSWIGHelper(void *obj, swig_type_info *info) {
54824e7fdSDimitry Andric  return {PyRefType::Owned, SWIG_NewPointerObj(obj, info, SWIG_POINTER_OWN)};
64824e7fdSDimitry Andric}
74824e7fdSDimitry Andric
806c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(std::unique_ptr<lldb::SBValue> value_sb) {
94824e7fdSDimitry Andric  return ToSWIGHelper(value_sb.release(), SWIGTYPE_p_lldb__SBValue);
104824e7fdSDimitry Andric}
114824e7fdSDimitry Andric
1206c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::ValueObjectSP value_sp) {
1306c3fb27SDimitry Andric  return ToSWIGWrapper(std::unique_ptr<lldb::SBValue>(new lldb::SBValue(value_sp)));
144824e7fdSDimitry Andric}
154824e7fdSDimitry Andric
1606c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::TargetSP target_sp) {
174824e7fdSDimitry Andric  return ToSWIGHelper(new lldb::SBTarget(std::move(target_sp)),
184824e7fdSDimitry Andric                      SWIGTYPE_p_lldb__SBTarget);
194824e7fdSDimitry Andric}
204824e7fdSDimitry Andric
2106c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::ProcessSP process_sp) {
224824e7fdSDimitry Andric  return ToSWIGHelper(new lldb::SBProcess(std::move(process_sp)),
234824e7fdSDimitry Andric                      SWIGTYPE_p_lldb__SBProcess);
244824e7fdSDimitry Andric}
254824e7fdSDimitry Andric
2606c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::ThreadPlanSP thread_plan_sp) {
274824e7fdSDimitry Andric  return ToSWIGHelper(new lldb::SBThreadPlan(std::move(thread_plan_sp)),
284824e7fdSDimitry Andric                      SWIGTYPE_p_lldb__SBThreadPlan);
294824e7fdSDimitry Andric}
304824e7fdSDimitry Andric
3106c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::BreakpointSP breakpoint_sp) {
324824e7fdSDimitry Andric  return ToSWIGHelper(new lldb::SBBreakpoint(std::move(breakpoint_sp)),
334824e7fdSDimitry Andric                      SWIGTYPE_p_lldb__SBBreakpoint);
344824e7fdSDimitry Andric}
354824e7fdSDimitry Andric
3606c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(const Status& status) {
37bdd1243dSDimitry Andric  return ToSWIGHelper(new lldb::SBError(status), SWIGTYPE_p_lldb__SBError);
38bdd1243dSDimitry Andric}
39bdd1243dSDimitry Andric
4006c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(std::unique_ptr<lldb::SBStructuredData> data_sb) {
410eae32dcSDimitry Andric  return ToSWIGHelper(data_sb.release(), SWIGTYPE_p_lldb__SBStructuredData);
420eae32dcSDimitry Andric}
430eae32dcSDimitry Andric
4406c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(const StructuredDataImpl &data_impl) {
4506c3fb27SDimitry Andric  return ToSWIGWrapper(std::unique_ptr<lldb::SBStructuredData>(new lldb::SBStructuredData(data_impl)));
460eae32dcSDimitry Andric}
470eae32dcSDimitry Andric
4806c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::ThreadSP thread_sp) {
490eae32dcSDimitry Andric  return ToSWIGHelper(new lldb::SBThread(std::move(thread_sp)),
500eae32dcSDimitry Andric                      SWIGTYPE_p_lldb__SBThread);
510eae32dcSDimitry Andric}
520eae32dcSDimitry Andric
5306c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::StackFrameSP frame_sp) {
540eae32dcSDimitry Andric  return ToSWIGHelper(new lldb::SBFrame(std::move(frame_sp)),
550eae32dcSDimitry Andric                      SWIGTYPE_p_lldb__SBFrame);
560eae32dcSDimitry Andric}
570eae32dcSDimitry Andric
5806c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::DebuggerSP debugger_sp) {
590eae32dcSDimitry Andric  return ToSWIGHelper(new lldb::SBDebugger(std::move(debugger_sp)),
600eae32dcSDimitry Andric                      SWIGTYPE_p_lldb__SBDebugger);
610eae32dcSDimitry Andric}
620eae32dcSDimitry Andric
6306c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::WatchpointSP watchpoint_sp) {
640eae32dcSDimitry Andric  return ToSWIGHelper(new lldb::SBWatchpoint(std::move(watchpoint_sp)),
650eae32dcSDimitry Andric                      SWIGTYPE_p_lldb__SBWatchpoint);
660eae32dcSDimitry Andric}
670eae32dcSDimitry Andric
6806c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::BreakpointLocationSP bp_loc_sp) {
690eae32dcSDimitry Andric  return ToSWIGHelper(new lldb::SBBreakpointLocation(std::move(bp_loc_sp)),
700eae32dcSDimitry Andric                      SWIGTYPE_p_lldb__SBBreakpointLocation);
710eae32dcSDimitry Andric}
720eae32dcSDimitry Andric
7306c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::ExecutionContextRefSP ctx_sp) {
740eae32dcSDimitry Andric  return ToSWIGHelper(new lldb::SBExecutionContext(std::move(ctx_sp)),
750eae32dcSDimitry Andric                      SWIGTYPE_p_lldb__SBExecutionContext);
760eae32dcSDimitry Andric}
770eae32dcSDimitry Andric
7806c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::TypeImplSP type_impl_sp) {
79bdd1243dSDimitry Andric  return ToSWIGHelper(new lldb::SBType(type_impl_sp), SWIGTYPE_p_lldb__SBType);
80bdd1243dSDimitry Andric}
81bdd1243dSDimitry Andric
8206c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(const TypeSummaryOptions &summary_options) {
830eae32dcSDimitry Andric  return ToSWIGHelper(new lldb::SBTypeSummaryOptions(summary_options),
840eae32dcSDimitry Andric                      SWIGTYPE_p_lldb__SBTypeSummaryOptions);
850eae32dcSDimitry Andric}
860eae32dcSDimitry Andric
8706c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(const SymbolContext &sym_ctx) {
880eae32dcSDimitry Andric  return ToSWIGHelper(new lldb::SBSymbolContext(sym_ctx),
890eae32dcSDimitry Andric                      SWIGTYPE_p_lldb__SBSymbolContext);
900eae32dcSDimitry Andric}
910eae32dcSDimitry Andric
9206c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::ProcessLaunchInfoSP launch_info_sp) {
9306c3fb27SDimitry Andric   return ToSWIGHelper(new lldb::ProcessLaunchInfoSP(std::move(launch_info_sp)),
9406c3fb27SDimitry Andric                       SWIGTYPE_p_lldb__SBLaunchInfo);
9506c3fb27SDimitry Andric }
9606c3fb27SDimitry Andric
9706c3fb27SDimitry Andric PythonObject SWIGBridge::ToSWIGWrapper(lldb::ProcessAttachInfoSP attach_info_sp) {
9806c3fb27SDimitry Andric   return ToSWIGHelper(new lldb::ProcessAttachInfoSP(std::move(attach_info_sp)),
9906c3fb27SDimitry Andric                       SWIGTYPE_p_lldb__SBAttachInfo);
10006c3fb27SDimitry Andric }
10106c3fb27SDimitry Andric
10206c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(lldb::DataExtractorSP data_sp) {
10306c3fb27SDimitry Andric  return ToSWIGHelper(new lldb::DataExtractorSP(std::move(data_sp)),
10406c3fb27SDimitry Andric                      SWIGTYPE_p_lldb__SBData);
10506c3fb27SDimitry Andric}
10606c3fb27SDimitry Andric
10704eeddc0SDimitry AndricScopedPythonObject<lldb::SBCommandReturnObject>
10806c3fb27SDimitry AndricSWIGBridge::ToSWIGWrapper(CommandReturnObject &cmd_retobj) {
10904eeddc0SDimitry Andric  return ScopedPythonObject<lldb::SBCommandReturnObject>(
11004eeddc0SDimitry Andric      new lldb::SBCommandReturnObject(cmd_retobj),
11104eeddc0SDimitry Andric      SWIGTYPE_p_lldb__SBCommandReturnObject);
11204eeddc0SDimitry Andric}
11304eeddc0SDimitry Andric
114*0fca6ea1SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(const Stream *s) {
115*0fca6ea1SDimitry Andric  return ToSWIGHelper(new lldb::SBStream(), SWIGTYPE_p_lldb__SBStream);
116*0fca6ea1SDimitry Andric}
117*0fca6ea1SDimitry Andric
118*0fca6ea1SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(std::shared_ptr<lldb::SBStream> stream_sb) {
119*0fca6ea1SDimitry Andric  return ToSWIGHelper(stream_sb.get(), SWIGTYPE_p_lldb__SBStream);
120*0fca6ea1SDimitry Andric}
121*0fca6ea1SDimitry Andric
122*0fca6ea1SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(Event *event) {
123*0fca6ea1SDimitry Andric  return ToSWIGHelper(new lldb::SBEvent(event), SWIGTYPE_p_lldb__SBEvent);
12404eeddc0SDimitry Andric}
12504eeddc0SDimitry Andric
12606c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(
12706c3fb27SDimitry Andric    std::unique_ptr<lldb::SBFileSpec> file_spec_sb) {
12806c3fb27SDimitry Andric  return ToSWIGHelper(file_spec_sb.release(), SWIGTYPE_p_lldb__SBFileSpec);
12906c3fb27SDimitry Andric}
13006c3fb27SDimitry Andric
13106c3fb27SDimitry AndricPythonObject SWIGBridge::ToSWIGWrapper(
13206c3fb27SDimitry Andric    std::unique_ptr<lldb::SBModuleSpec> module_spec_sb) {
13306c3fb27SDimitry Andric  return ToSWIGHelper(module_spec_sb.release(), SWIGTYPE_p_lldb__SBModuleSpec);
13406c3fb27SDimitry Andric}
13506c3fb27SDimitry Andric
1364824e7fdSDimitry Andric} // namespace python
1374824e7fdSDimitry Andric} // namespace lldb_private
138