@@ -369,25 +369,23 @@ class CommandObjectProcessAttach : public CommandObjectProcessLaunchOrAttach {
369
369
370
370
// Okay, we're done. Last step is to warn if the executable module has
371
371
// changed:
372
- char new_path[PATH_MAX];
373
372
ModuleSP new_exec_module_sp (target->GetExecutableModule ());
374
373
if (!old_exec_module_sp) {
375
374
// We might not have a module if we attached to a raw pid...
376
375
if (new_exec_module_sp) {
377
- new_exec_module_sp-> GetFileSpec (). GetPath (new_path, PATH_MAX);
378
- result. AppendMessageWithFormat ( " Executable module set to \" %s\" .\n " ,
379
- new_path );
376
+ result. AppendMessageWithFormat (
377
+ " Executable binary set to \" %s\" .\n " ,
378
+ new_exec_module_sp-> GetFileSpec (). GetPath (). c_str () );
380
379
}
380
+ } else if (!new_exec_module_sp) {
381
+ result.AppendWarningWithFormat (" No executable binary." );
381
382
} else if (old_exec_module_sp->GetFileSpec () !=
382
383
new_exec_module_sp->GetFileSpec ()) {
383
- char old_path[PATH_MAX];
384
-
385
- old_exec_module_sp->GetFileSpec ().GetPath (old_path, PATH_MAX);
386
- new_exec_module_sp->GetFileSpec ().GetPath (new_path, PATH_MAX);
387
384
388
385
result.AppendWarningWithFormat (
389
- " Executable module changed from \" %s\" to \" %s\" .\n " , old_path,
390
- new_path);
386
+ " Executable binary changed from \" %s\" to \" %s\" .\n " ,
387
+ old_exec_module_sp->GetFileSpec ().GetPath ().c_str (),
388
+ new_exec_module_sp->GetFileSpec ().GetPath ().c_str ());
391
389
}
392
390
393
391
if (!old_arch_spec.IsValid ()) {
0 commit comments