[Lldb-commits] [lldb] [LLDB] Extract process arguments from core dump for Linux (PR #185338)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 10 03:45:17 PDT 2026


================
@@ -433,6 +433,12 @@ class CommandObjectTargetCreate : public CommandObjectParsed {
             result.AppendMessageWithFormatv(
                 "Core file '{0}' ({1}) was loaded.\n", core_file.GetPath(),
                 target_sp->GetArchitecture().GetArchitectureName());
+            Args args = process_sp->GetCoreFileCommandString();
+            std::string cmd;
+            args.GetCommandString(cmd);
+            if (!cmd.empty())
+              result.AppendMessageWithFormatv("Core was generated by `{0}`.\n",
----------------
DavidSpickett wrote:

Formatv will add a newline for you so you can leave that out.

I would consider using `''` quotes instead, just to match the formatting of:
```
Core file '/home/jjasmine/Developer/igalia/llvm-project/core_dump.core' (x86_64) was loaded.
```
Doesn't really matter what quotes we use but that tips it towards `''` for me.

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


More information about the lldb-commits mailing list