summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Utility')
-rw-r--r--lldb/source/Utility/StringExtractor.cpp20
-rw-r--r--lldb/source/Utility/StringExtractor.h10
2 files changed, 15 insertions, 15 deletions
diff --git a/lldb/source/Utility/StringExtractor.cpp b/lldb/source/Utility/StringExtractor.cpp
index bbe01d240a3..2f4bcecda8f 100644
--- a/lldb/source/Utility/StringExtractor.cpp
+++ b/lldb/source/Utility/StringExtractor.cpp
@@ -134,7 +134,7 @@ StringExtractor::GetChar (char fail_value)
++m_index;
return ch;
}
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -157,7 +157,7 @@ StringExtractor::GetHexU8 (uint8_t fail_value, bool set_eof_on_fail)
}
}
if (set_eof_on_fail || m_index >= m_packet.size())
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -195,7 +195,7 @@ StringExtractor::GetHexMaxU32 (bool little_endian, uint32_t fail_value)
// Make sure we don't exceed the size of a uint32_t...
if (nibble_count >= (sizeof(uint32_t) * 2))
{
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -227,7 +227,7 @@ StringExtractor::GetHexMaxU32 (bool little_endian, uint32_t fail_value)
// Make sure we don't exceed the size of a uint32_t...
if (nibble_count >= (sizeof(uint32_t) * 2))
{
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -257,7 +257,7 @@ StringExtractor::GetHexMaxU64 (bool little_endian, uint64_t fail_value)
// Make sure we don't exceed the size of a uint64_t...
if (nibble_count >= (sizeof(uint64_t) * 2))
{
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -289,7 +289,7 @@ StringExtractor::GetHexMaxU64 (bool little_endian, uint64_t fail_value)
// Make sure we don't exceed the size of a uint64_t...
if (nibble_count >= (sizeof(uint64_t) * 2))
{
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -341,7 +341,7 @@ StringExtractor::GetHexWithFixedSize (uint32_t byte_size, bool little_endian, ui
// Little Endian
uint32_t shift_amount;
for (i = 0, shift_amount = 0;
- i < byte_size && m_index != UINT32_MAX;
+ i < byte_size && IsGood();
++i, shift_amount += 8)
{
result |= ((uint64_t)GetHexU8() << shift_amount);
@@ -350,14 +350,14 @@ StringExtractor::GetHexWithFixedSize (uint32_t byte_size, bool little_endian, ui
else
{
// Big Endian
- for (i = 0; i < byte_size && m_index != UINT32_MAX; ++i)
+ for (i = 0; i < byte_size && IsGood(); ++i)
{
result <<= 8;
result |= GetHexU8();
}
}
}
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return fail_value;
}
@@ -392,6 +392,6 @@ StringExtractor::GetNameColonValue (std::string &name, std::string &value)
}
}
}
- m_index = UINT32_MAX;
+ m_index = UINT64_MAX;
return false;
}
diff --git a/lldb/source/Utility/StringExtractor.h b/lldb/source/Utility/StringExtractor.h
index 73f0117d813..df4a97aedf5 100644
--- a/lldb/source/Utility/StringExtractor.h
+++ b/lldb/source/Utility/StringExtractor.h
@@ -45,10 +45,10 @@ public:
bool
IsGood() const
{
- return m_index != UINT32_MAX;
+ return m_index != UINT64_MAX;
}
- uint32_t
+ uint64_t
GetFilePos () const
{
return m_index;
@@ -79,7 +79,7 @@ public:
return m_packet.empty();
}
- uint32_t
+ size_t
GetBytesLeft ()
{
if (m_index < m_packet.size())
@@ -126,9 +126,9 @@ protected:
// For StringExtractor only
//------------------------------------------------------------------
std::string m_packet; // The string in which to extract data.
- uint32_t m_index; // When extracting data from a packet, this index
+ uint64_t m_index; // When extracting data from a packet, this index
// will march along as things get extracted. If set
- // to UINT32_MAX the end of the packet data was
+ // to UINT64_MAX the end of the packet data was
// reached when decoding information
};
OpenPOWER on IntegriCloud