PatriosTheGreat updated this revision to Diff 428880. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125325/new/
https://reviews.llvm.org/D125325 Files: lldb/bindings/interface/SBProcess.i lldb/include/lldb/API/SBProcess.h lldb/source/API/SBProcess.cpp Index: lldb/source/API/SBProcess.cpp =================================================================== --- lldb/source/API/SBProcess.cpp +++ lldb/source/API/SBProcess.cpp @@ -1138,6 +1138,12 @@ lldb::SBError SBProcess::SaveCore(const char *file_name) { LLDB_INSTRUMENT_VA(this, file_name); + return SaveCore(file_name, ""); +} + +lldb::SBError SBProcess::SaveCore(const char *file_name, + const char *flavor) { + LLDB_INSTRUMENT_VA(this, file_name, flavor); lldb::SBError error; ProcessSP process_sp(GetSP()); @@ -1156,7 +1162,8 @@ FileSpec core_file(file_name); SaveCoreStyle core_style = SaveCoreStyle::eSaveCoreFull; - error.ref() = PluginManager::SaveCore(process_sp, core_file, core_style, ""); + error.ref() = PluginManager::SaveCore(process_sp, core_file, core_style, + flavor); return error; } Index: lldb/include/lldb/API/SBProcess.h =================================================================== --- lldb/include/lldb/API/SBProcess.h +++ lldb/include/lldb/API/SBProcess.h @@ -337,7 +337,18 @@ bool IsInstrumentationRuntimePresent(InstrumentationRuntimeType type); - /// Save the state of the process in a core file (or mini dump on Windows). + /// Save the state of the process in a core file. + /// + /// \param[in] file_name - The name of the file to save the core file to. + /// + /// \param[in] flavor - Specify the flavor of a core file plug-in to save. + /// Currently supported flavors include "mach-o" and "minidump" + lldb::SBError SaveCore(const char *file_name, const char *flavor); + + /// Save the state of the process with the a flavor that matches the + /// current process' main executable (if supported). + /// + /// \param[in] file_name - The name of the file to save the core file to. lldb::SBError SaveCore(const char *file_name); /// Query the address load_addr and store the details of the memory Index: lldb/bindings/interface/SBProcess.i =================================================================== --- lldb/bindings/interface/SBProcess.i +++ lldb/bindings/interface/SBProcess.i @@ -397,6 +397,9 @@ bool IsInstrumentationRuntimePresent(lldb::InstrumentationRuntimeType type); + lldb::SBError + SaveCore(const char *file_name, const char *flavor); + lldb::SBError SaveCore(const char *file_name);
Index: lldb/source/API/SBProcess.cpp =================================================================== --- lldb/source/API/SBProcess.cpp +++ lldb/source/API/SBProcess.cpp @@ -1138,6 +1138,12 @@ lldb::SBError SBProcess::SaveCore(const char *file_name) { LLDB_INSTRUMENT_VA(this, file_name); + return SaveCore(file_name, ""); +} + +lldb::SBError SBProcess::SaveCore(const char *file_name, + const char *flavor) { + LLDB_INSTRUMENT_VA(this, file_name, flavor); lldb::SBError error; ProcessSP process_sp(GetSP()); @@ -1156,7 +1162,8 @@ FileSpec core_file(file_name); SaveCoreStyle core_style = SaveCoreStyle::eSaveCoreFull; - error.ref() = PluginManager::SaveCore(process_sp, core_file, core_style, ""); + error.ref() = PluginManager::SaveCore(process_sp, core_file, core_style, + flavor); return error; } Index: lldb/include/lldb/API/SBProcess.h =================================================================== --- lldb/include/lldb/API/SBProcess.h +++ lldb/include/lldb/API/SBProcess.h @@ -337,7 +337,18 @@ bool IsInstrumentationRuntimePresent(InstrumentationRuntimeType type); - /// Save the state of the process in a core file (or mini dump on Windows). + /// Save the state of the process in a core file. + /// + /// \param[in] file_name - The name of the file to save the core file to. + /// + /// \param[in] flavor - Specify the flavor of a core file plug-in to save. + /// Currently supported flavors include "mach-o" and "minidump" + lldb::SBError SaveCore(const char *file_name, const char *flavor); + + /// Save the state of the process with the a flavor that matches the + /// current process' main executable (if supported). + /// + /// \param[in] file_name - The name of the file to save the core file to. lldb::SBError SaveCore(const char *file_name); /// Query the address load_addr and store the details of the memory Index: lldb/bindings/interface/SBProcess.i =================================================================== --- lldb/bindings/interface/SBProcess.i +++ lldb/bindings/interface/SBProcess.i @@ -397,6 +397,9 @@ bool IsInstrumentationRuntimePresent(lldb::InstrumentationRuntimeType type); + lldb::SBError + SaveCore(const char *file_name, const char *flavor); + lldb::SBError SaveCore(const char *file_name);
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits