aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 50695af..e605abd 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -369,25 +369,23 @@ protected:
// Okay, we're done. Last step is to warn if the executable module has
// changed:
- char new_path[PATH_MAX];
ModuleSP new_exec_module_sp(target->GetExecutableModule());
if (!old_exec_module_sp) {
// We might not have a module if we attached to a raw pid...
if (new_exec_module_sp) {
- new_exec_module_sp->GetFileSpec().GetPath(new_path, PATH_MAX);
- result.AppendMessageWithFormat("Executable module set to \"%s\".\n",
- new_path);
+ result.AppendMessageWithFormat(
+ "Executable binary set to \"%s\".\n",
+ new_exec_module_sp->GetFileSpec().GetPath().c_str());
}
+ } else if (!new_exec_module_sp) {
+ result.AppendWarningWithFormat("No executable binary.");
} else if (old_exec_module_sp->GetFileSpec() !=
new_exec_module_sp->GetFileSpec()) {
- char old_path[PATH_MAX];
-
- old_exec_module_sp->GetFileSpec().GetPath(old_path, PATH_MAX);
- new_exec_module_sp->GetFileSpec().GetPath(new_path, PATH_MAX);
result.AppendWarningWithFormat(
- "Executable module changed from \"%s\" to \"%s\".\n", old_path,
- new_path);
+ "Executable binary changed from \"%s\" to \"%s\".\n",
+ old_exec_module_sp->GetFileSpec().GetPath().c_str(),
+ new_exec_module_sp->GetFileSpec().GetPath().c_str());
}
if (!old_arch_spec.IsValid()) {