Index: source/Commands/CommandObjectProcess.cpp =================================================================== --- source/Commands/CommandObjectProcess.cpp +++ source/Commands/CommandObjectProcess.cpp @@ -211,6 +211,16 @@ if (target_settings_argv0) { + // On FreeBSD, rtld will convert argv0 of an execve() to an + // absolute path with partial resolution of symbolic links and + // associate that name with the link_map entry for the executable. + // Resolve the executable path now to assure accurate identification + // in the DYLDRendezvous class. + char real_exe_path[PATH_MAX]; + FileSpec real_exe_file (target_settings_argv0, true); + real_exe_file.GetPath(real_exe_path, PATH_MAX); + target->SetArg0(real_exe_path); + target_settings_argv0 = target->GetArg0(); m_options.launch_info.GetArguments().AppendArgument (target_settings_argv0); m_options.launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), false); } Index: source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp =================================================================== --- source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp +++ source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp @@ -63,7 +63,12 @@ { Module *exe_mod = m_process->GetTarget().GetExecutableModulePointer(); if (exe_mod) + { exe_mod->GetFileSpec().GetPath(m_exe_path, PATH_MAX); + // On FreeBSD, rtld has associated a conicalized absolute pathname + // for the executable in the process's link_map data. + FileSpec(m_exe_path, true).GetPath(m_exe_path, PATH_MAX); + } } }