This revision was automatically updated to reflect the committed changes. Closed by commit rGf893b2939781: [lldb] [Host/{free,net}bsd] Fix process matching by name (authored by mgorny). Herald added a project: LLDB.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90454/new/ https://reviews.llvm.org/D90454 Files: lldb/source/Host/freebsd/Host.cpp lldb/source/Host/netbsd/HostNetBSD.cpp Index: lldb/source/Host/netbsd/HostNetBSD.cpp =================================================================== --- lldb/source/Host/netbsd/HostNetBSD.cpp +++ lldb/source/Host/netbsd/HostNetBSD.cpp @@ -200,6 +200,9 @@ return 0; } + ProcessInstanceInfoMatch match_info_noname{match_info}; + match_info_noname.SetNameMatchType(NameMatch::Ignore); + for (int i = 0; i < nproc; i++) { if (proc_kinfo[i].p_pid < 1) continue; /* not valid */ @@ -237,7 +240,7 @@ process_info.SetEffectiveUserID(proc_kinfo[i].p_uid); process_info.SetEffectiveGroupID(proc_kinfo[i].p_gid); // Make sure our info matches before we go fetch the name and cpu type - if (match_info.Matches(process_info) && + if (match_info_noname.Matches(process_info) && GetNetBSDProcessArgs(&match_info, process_info)) { GetNetBSDProcessCPUType(process_info); if (match_info.Matches(process_info)) Index: lldb/source/Host/freebsd/Host.cpp =================================================================== --- lldb/source/Host/freebsd/Host.cpp +++ lldb/source/Host/freebsd/Host.cpp @@ -175,6 +175,9 @@ const size_t actual_pid_count = (pid_data_size / sizeof(struct kinfo_proc)); + ProcessInstanceInfoMatch match_info_noname{match_info}; + match_info_noname.SetNameMatchType(NameMatch::Ignore); + for (size_t i = 0; i < actual_pid_count; i++) { const struct kinfo_proc &kinfo = kinfos[i]; @@ -212,7 +215,7 @@ process_info.SetEffectiveGroupID(kinfo.ki_svgid); // Make sure our info matches before we go fetch the name and cpu type - if (match_info.Matches(process_info) && + if (match_info_noname.Matches(process_info) && GetFreeBSDProcessArgs(&match_info, process_info)) { GetFreeBSDProcessCPUType(process_info); if (match_info.Matches(process_info))
Index: lldb/source/Host/netbsd/HostNetBSD.cpp =================================================================== --- lldb/source/Host/netbsd/HostNetBSD.cpp +++ lldb/source/Host/netbsd/HostNetBSD.cpp @@ -200,6 +200,9 @@ return 0; } + ProcessInstanceInfoMatch match_info_noname{match_info}; + match_info_noname.SetNameMatchType(NameMatch::Ignore); + for (int i = 0; i < nproc; i++) { if (proc_kinfo[i].p_pid < 1) continue; /* not valid */ @@ -237,7 +240,7 @@ process_info.SetEffectiveUserID(proc_kinfo[i].p_uid); process_info.SetEffectiveGroupID(proc_kinfo[i].p_gid); // Make sure our info matches before we go fetch the name and cpu type - if (match_info.Matches(process_info) && + if (match_info_noname.Matches(process_info) && GetNetBSDProcessArgs(&match_info, process_info)) { GetNetBSDProcessCPUType(process_info); if (match_info.Matches(process_info)) Index: lldb/source/Host/freebsd/Host.cpp =================================================================== --- lldb/source/Host/freebsd/Host.cpp +++ lldb/source/Host/freebsd/Host.cpp @@ -175,6 +175,9 @@ const size_t actual_pid_count = (pid_data_size / sizeof(struct kinfo_proc)); + ProcessInstanceInfoMatch match_info_noname{match_info}; + match_info_noname.SetNameMatchType(NameMatch::Ignore); + for (size_t i = 0; i < actual_pid_count; i++) { const struct kinfo_proc &kinfo = kinfos[i]; @@ -212,7 +215,7 @@ process_info.SetEffectiveGroupID(kinfo.ki_svgid); // Make sure our info matches before we go fetch the name and cpu type - if (match_info.Matches(process_info) && + if (match_info_noname.Matches(process_info) && GetFreeBSDProcessArgs(&match_info, process_info)) { GetFreeBSDProcessCPUType(process_info); if (match_info.Matches(process_info))
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits