aboutsummaryrefslogtreecommitdiffstats
path: root/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/Process/Utility/DynamicRegisterInfo.cpp')
-rw-r--r--source/Plugins/Process/Utility/DynamicRegisterInfo.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
index dc90b7ae02c3..3507ccf92065 100644
--- a/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
+++ b/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
@@ -115,7 +115,7 @@ DynamicRegisterInfo::SetRegisterInfo (const lldb_private::PythonDictionary &dict
RegisterInfo reg_info;
std::vector<uint32_t> value_regs;
std::vector<uint32_t> invalidate_regs;
- bzero (&reg_info, sizeof(reg_info));
+ memset(&reg_info, 0, sizeof(reg_info));
reg_info.name = ConstString (reg_info_dict.GetItemForKeyAsString(name_pystr)).GetCString();
if (reg_info.name == NULL)
@@ -323,7 +323,7 @@ DynamicRegisterInfo::SetRegisterInfo (const lldb_private::PythonDictionary &dict
reg_info.encoding = (Encoding)reg_info_dict.GetItemForKeyAsInteger (encoding_pystr, eEncodingUint);
const int64_t set = reg_info_dict.GetItemForKeyAsInteger(set_pystr, -1);
- if (set >= m_sets.size())
+ if (static_cast<size_t>(set) >= m_sets.size())
{
Clear();
return 0;
@@ -379,7 +379,7 @@ DynamicRegisterInfo::SetRegisterInfo (const lldb_private::PythonDictionary &dict
if (invalidate_reg_num)
{
const int64_t r = invalidate_reg_num.GetInteger();
- if (r != UINT64_MAX)
+ if (r != static_cast<int64_t>(UINT64_MAX))
m_invalidate_regs_map[i].push_back(r);
else
printf("error: 'invalidate-regs' list value wasn't a valid integer\n");
@@ -632,10 +632,11 @@ DynamicRegisterInfo::Dump () const
{
StreamFile s(stdout, false);
const size_t num_regs = m_regs.size();
- s.Printf("%p: DynamicRegisterInfo contains %zu registers:\n", this, num_regs);
+ s.Printf("%p: DynamicRegisterInfo contains %" PRIu64 " registers:\n",
+ static_cast<const void*>(this), static_cast<uint64_t>(num_regs));
for (size_t i=0; i<num_regs; ++i)
{
- s.Printf("[%3zu] name = %-10s", i, m_regs[i].name);
+ s.Printf("[%3" PRIu64 "] name = %-10s", (uint64_t)i, m_regs[i].name);
s.Printf(", size = %2u, offset = %4u, encoding = %u, format = %-10s",
m_regs[i].byte_size,
m_regs[i].byte_offset,
@@ -671,12 +672,13 @@ DynamicRegisterInfo::Dump () const
}
s.EOL();
}
-
+
const size_t num_sets = m_sets.size();
- s.Printf("%p: DynamicRegisterInfo contains %zu register sets:\n", this, num_sets);
+ s.Printf("%p: DynamicRegisterInfo contains %" PRIu64 " register sets:\n",
+ static_cast<const void*>(this), static_cast<uint64_t>(num_sets));
for (size_t i=0; i<num_sets; ++i)
{
- s.Printf("set[%zu] name = %s, regs = [", i, m_sets[i].name);
+ s.Printf("set[%" PRIu64 "] name = %s, regs = [", (uint64_t)i, m_sets[i].name);
for (size_t idx=0; idx<m_sets[i].num_registers; ++idx)
{
s.Printf("%s ", m_regs[m_sets[i].registers[idx]].name);