Michael137 created this revision.
Michael137 added reviewers: jingham, JDevlieghere.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

eviously, using `memory history` command on an executable
which wasn't compiled with ASAN would yield following error:

  (lldb) mem hist 0x0
  error: no available memory history provider

Looking at the help message for this command didn't really
make this error message any clearer.

This patch changes the `help memory history` description to
at least mention how a history provider could be set up.

After the patch:

  (lldb) help mem hist
  Print recorded stack traces for allocation/deallocation events associated 
with an address.
  This command requires a memory history provider plugin to be present. For 
example, compile the debuggee with address sanitizer.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140102

Files:
  lldb/source/Commands/CommandObjectMemory.cpp


Index: lldb/source/Commands/CommandObjectMemory.cpp
===================================================================
--- lldb/source/Commands/CommandObjectMemory.cpp
+++ lldb/source/Commands/CommandObjectMemory.cpp
@@ -1578,7 +1578,11 @@
       : CommandObjectParsed(interpreter, "memory history",
                             "Print recorded stack traces for "
                             "allocation/deallocation events "
-                            "associated with an address.",
+                            "associated with an address."
+                            "\n"
+                            "This command requires a memory history "
+                            "provider plugin to be present. For example, "
+                            "compile the debuggee with address sanitizer.",
                             nullptr,
                             eCommandRequiresTarget | eCommandRequiresProcess |
                                 eCommandProcessMustBePaused |


Index: lldb/source/Commands/CommandObjectMemory.cpp
===================================================================
--- lldb/source/Commands/CommandObjectMemory.cpp
+++ lldb/source/Commands/CommandObjectMemory.cpp
@@ -1578,7 +1578,11 @@
       : CommandObjectParsed(interpreter, "memory history",
                             "Print recorded stack traces for "
                             "allocation/deallocation events "
-                            "associated with an address.",
+                            "associated with an address."
+                            "\n"
+                            "This command requires a memory history "
+                            "provider plugin to be present. For example, "
+                            "compile the debuggee with address sanitizer.",
                             nullptr,
                             eCommandRequiresTarget | eCommandRequiresProcess |
                                 eCommandProcessMustBePaused |
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to