[Lldb-commits] [PATCH] D96939: [lldb] Add a note to the core file loading error message that mentions archives

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 17 23:59:36 PST 2021


teemperor created this revision.
teemperor added a reviewer: LLDB.
teemperor added a project: LLDB.
Herald added a subscriber: JDevlieghere.
teemperor requested review of this revision.

Core files are frequently compressed in some compressed archive and users aren't aware that LLDB can't
extract the core file for them. Because of this there is usually one question every day on why
LLDB is giving them a cryptic error message when they open their compressed core file:

  error: Unable to find process plug-in for core file '/tmp/core.gz

This just adds a note that compressed core files need to be decompressed first before LLDB can do anything
with them.


https://reviews.llvm.org/D96939

Files:
  lldb/source/Commands/CommandObjectTarget.cpp


Index: lldb/source/Commands/CommandObjectTarget.cpp
===================================================================
--- lldb/source/Commands/CommandObjectTarget.cpp
+++ lldb/source/Commands/CommandObjectTarget.cpp
@@ -427,6 +427,10 @@
           result.AppendErrorWithFormatv(
               "Unable to find process plug-in for core file '{0}'\n",
               core_file.GetPath());
+          result.AppendMessage(
+              "Note: If the passed file is a compressed file archive containing"
+              " a core file, you first need to manually extract the core file "
+              " from the archive before trying to load it.\n");
           result.SetStatus(eReturnStatusFailed);
         }
       } else {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96939.324543.patch
Type: text/x-patch
Size: 727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210218/4656d235/attachment-0001.bin>


More information about the lldb-commits mailing list