hintonda updated this revision to Diff 122730.
hintonda added a comment.
- Address comments.
https://reviews.llvm.org/D39578
Files:
source/Core/RegisterValue.cpp
source/Core/Value.cpp
Index: source/Core/Value.cpp
===================================================================
--- source/Core/Value.cpp
+++ source/Core/Value.cpp
@@ -142,6 +142,9 @@
}
size_t Value::AppendDataToHostBuffer(const Value &rhs) {
+ if (this == &rhs)
+ return 0;
+
size_t curr_size = m_data_buffer.GetByteSize();
Status error;
switch (rhs.GetValueType()) {
Index: source/Core/RegisterValue.cpp
===================================================================
--- source/Core/RegisterValue.cpp
+++ source/Core/RegisterValue.cpp
@@ -539,6 +539,9 @@
}
bool RegisterValue::CopyValue(const RegisterValue &rhs) {
+ if (this == &rhs)
+ return rhs.m_type == eTypeInvalid ? false : true;
+
m_type = rhs.m_type;
switch (m_type) {
case eTypeInvalid:
Index: source/Core/Value.cpp
===================================================================
--- source/Core/Value.cpp
+++ source/Core/Value.cpp
@@ -142,6 +142,9 @@
}
size_t Value::AppendDataToHostBuffer(const Value &rhs) {
+ if (this == &rhs)
+ return 0;
+
size_t curr_size = m_data_buffer.GetByteSize();
Status error;
switch (rhs.GetValueType()) {
Index: source/Core/RegisterValue.cpp
===================================================================
--- source/Core/RegisterValue.cpp
+++ source/Core/RegisterValue.cpp
@@ -539,6 +539,9 @@
}
bool RegisterValue::CopyValue(const RegisterValue &rhs) {
+ if (this == &rhs)
+ return rhs.m_type == eTypeInvalid ? false : true;
+
m_type = rhs.m_type;
switch (m_type) {
case eTypeInvalid:
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits