mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
Improve and modernize logging for Process::CompleteAttach() (#82717)
Target::SetArchitecture() does not necessarily set the triple that is being passed in, and will unconditionally log the real architecture to the log channel. By flipping the order between the log outputs, the resulting combined log makes a lot more sense to read.
This commit is contained in:
@@ -2937,14 +2937,11 @@ void Process::CompleteAttach() {
|
||||
DidAttach(process_arch);
|
||||
|
||||
if (process_arch.IsValid()) {
|
||||
LLDB_LOG(log,
|
||||
"Process::{0} replacing process architecture with DidAttach() "
|
||||
"architecture: \"{1}\"",
|
||||
__FUNCTION__, process_arch.GetTriple().getTriple());
|
||||
GetTarget().SetArchitecture(process_arch);
|
||||
if (log) {
|
||||
const char *triple_str = process_arch.GetTriple().getTriple().c_str();
|
||||
LLDB_LOGF(log,
|
||||
"Process::%s replacing process architecture with DidAttach() "
|
||||
"architecture: %s",
|
||||
__FUNCTION__, triple_str ? triple_str : "<null>");
|
||||
}
|
||||
}
|
||||
|
||||
// We just attached. If we have a platform, ask it for the process
|
||||
|
||||
Reference in New Issue
Block a user