summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2015-10-13 23:41:19 +0000
committerTodd Fiala <todd.fiala@gmail.com>2015-10-13 23:41:19 +0000
commit7df337f85c78e64c3fb2d36c859212e8d06f7725 (patch)
tree15a3679c4ff89174f81de59b3e73546575d3e5a8 /lldb/source/Target/Process.cpp
parenta59fcbae4ff25ed039728ac66af0fcf625fa22d4 (diff)
downloadbcm5719-llvm-7df337f85c78e64c3fb2d36c859212e8d06f7725.tar.gz
bcm5719-llvm-7df337f85c78e64c3fb2d36c859212e8d06f7725.zip
ArchSpec: fix unintentional promotion of unspecified unknowns to specified unknowns
* ArchSpec::MergeFrom() would erroneously promote an unspecified unknown to a specified unknown when both the ArchSpec and the merged in ArchSpec were both unspecified unknowns. This no longer happens, which fixes issues with global module cache lookup in some situations. * Added ArchSpec::DumpTriple(Stream&) that now properly prints unspecified unknowns as '*' and specified unknows as 'unknown'. This makes it trivial to tell the difference between the two. Converted printing code over ot using DumpTriple() rather than building from scratch. * Fixed up a couple places that were not guaranteeing that an unspecified unknown was recorded as such. llvm-svn: 250253
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 8863fd04fc7..cf3090664b9 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -316,8 +316,12 @@ ProcessInstanceInfo::Dump (Stream &s, Platform *platform) const
}
}
- if (m_arch.IsValid())
- s.Printf (" arch = %s\n", m_arch.GetTriple().str().c_str());
+ if (m_arch.IsValid())
+ {
+ s.Printf (" arch = ");
+ m_arch.DumpTriple(s);
+ s.EOL();
+ }
if (m_uid != UINT32_MAX)
{
@@ -370,7 +374,10 @@ ProcessInstanceInfo::DumpAsTableRow (Stream &s, Platform *platform, bool show_ar
const char *cstr;
s.Printf ("%-6" PRIu64 " %-6" PRIu64 " ", m_pid, m_parent_pid);
-
+ StreamString arch_strm;
+ if (m_arch.IsValid())
+ m_arch.DumpTriple(arch_strm);
+
if (verbose)
{
cstr = platform->GetUserName (m_uid);
@@ -396,13 +403,14 @@ ProcessInstanceInfo::DumpAsTableRow (Stream &s, Platform *platform, bool show_ar
s.Printf ("%-10s ", cstr);
else
s.Printf ("%-10u ", m_egid);
- s.Printf ("%-24s ", m_arch.IsValid() ? m_arch.GetTriple().str().c_str() : "");
+
+ s.Printf ("%-24s ", arch_strm.GetString().c_str());
}
else
{
s.Printf ("%-10s %-24s ",
platform->GetUserName (m_euid),
- m_arch.IsValid() ? m_arch.GetTriple().str().c_str() : "");
+ arch_strm.GetString().c_str());
}
if (verbose || show_args)
OpenPOWER on IntegriCloud