[Lldb-commits] [lldb] [LLDB][SaveCore] Add SBCoreDumpOptions Object, and SBProcess::SaveCore() overload (PR #98403)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 10 22:57:53 PDT 2024


================
@@ -1222,7 +1223,17 @@ lldb::SBError SBProcess::SaveCore(const char *file_name) {
 lldb::SBError SBProcess::SaveCore(const char *file_name,
                                   const char *flavor,
                                   SaveCoreStyle core_style) {
-  LLDB_INSTRUMENT_VA(this, file_name, flavor, core_style);
+  SBCoreDumpOptions options(file_name);
----------------
clayborg wrote:

I would default construct the SBCoreDumpOptions and then call:
```
options.SetOutputFile(file_name);
```
If a user wants to make a command line tool that uses this API, they will need to default construct a `SBCoreDumpOptions` object and fill things in as needed. If we require a filename up front, then that ruins the ability to use the `SBCoreDumpOptions` class effectively.

https://github.com/llvm/llvm-project/pull/98403


More information about the lldb-commits mailing list