diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:03:47 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:04:23 +0000 |
| commit | 7fa27ce4a07f19b07799a767fc29416f3b625afb (patch) | |
| tree | 27825c83636c4de341eb09a74f49f5d38a15d165 /lldb/source/Expression/UtilityFunction.cpp | |
| parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
Diffstat (limited to 'lldb/source/Expression/UtilityFunction.cpp')
| -rw-r--r-- | lldb/source/Expression/UtilityFunction.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Expression/UtilityFunction.cpp b/lldb/source/Expression/UtilityFunction.cpp index 5d55d9a5c2c1..d317c1cd6c15 100644 --- a/lldb/source/Expression/UtilityFunction.cpp +++ b/lldb/source/Expression/UtilityFunction.cpp @@ -21,6 +21,7 @@ #include "lldb/Target/Target.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Log.h" +#include "lldb/Utility/State.h" #include "lldb/Utility/Stream.h" using namespace lldb_private; @@ -64,11 +65,13 @@ FunctionCaller *UtilityFunction::MakeFunctionCaller( error.SetErrorString("Can't make a function caller without a process."); return nullptr; } - // Since we might need to call allocate memory and maybe call code to make + // Since we might need to allocate memory and maybe call code to make // the caller, we need to be stopped. if (process_sp->GetState() != lldb::eStateStopped) { - error.SetErrorString("Can't make a function caller while the process is " - "running"); + error.SetErrorStringWithFormatv( + "Can't make a function caller while the process is {0}: the process " + "must be stopped to allocate memory.", + StateAsCString(process_sp->GetState())); return nullptr; } |
