[Lldb-commits] [lldb] r312453 - [Core/Value] Remove dead code that hasn't been touched in years. NFC.

2017-09-03 Thread Davide Italiano via lldb-commits
Author: davide
Date: Sun Sep  3 12:24:58 2017
New Revision: 312453

URL: http://llvm.org/viewvc/llvm-project?rev=312453&view=rev
Log:
[Core/Value] Remove dead code that hasn't been touched in years. NFC.

Modified:
lldb/trunk/source/Core/Value.cpp

Modified: lldb/trunk/source/Core/Value.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=312453&r1=312452&r2=312453&view=diff
==
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Sun Sep  3 12:24:58 2017
@@ -379,31 +379,6 @@ Status Value::GetValueAsData(ExecutionCo
 } else
   address = LLDB_INVALID_ADDRESS;
   }
-  //else
-  //{
-  //ModuleSP exe_module_sp
-  //(target->GetExecutableModule());
-  //if (exe_module_sp)
-  //{
-  //address =
-  //
m_value.ULongLong(LLDB_INVALID_ADDRESS);
-  //if (address != LLDB_INVALID_ADDRESS)
-  //{
-  //if
-  //
(exe_module_sp->ResolveFileAddress(address,
-  //file_so_addr))
-  //{
-  //
data.SetByteOrder(target->GetArchitecture().GetByteOrder());
-  //
data.SetAddressByteSize(target->GetArchitecture().GetAddressByteSize());
-  //address_type = 
eAddressTypeFile;
-  //}
-  //else
-  //{
-  //address = LLDB_INVALID_ADDRESS;
-  //}
-  //}
-  //}
-  //}
 } else {
   error.SetErrorString("can't read load address (invalid process)");
 }


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r312454 - [Interpreter] Simplify else after return. NFCI.

2017-09-03 Thread Davide Italiano via lldb-commits
Author: davide
Date: Sun Sep  3 12:27:56 2017
New Revision: 312454

URL: http://llvm.org/viewvc/llvm-project?rev=312454&view=rev
Log:
[Interpreter] Simplify else after return. NFCI.

Modified:
lldb/trunk/source/Interpreter/ScriptInterpreter.cpp

Modified: lldb/trunk/source/Interpreter/ScriptInterpreter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreter.cpp?rev=312454&r1=312453&r2=312454&view=diff
==
--- lldb/trunk/source/Interpreter/ScriptInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreter.cpp Sun Sep  3 12:27:56 2017
@@ -69,10 +69,9 @@ lldb::ScriptLanguage
 ScriptInterpreter::StringToLanguage(const llvm::StringRef &language) {
   if (language.equals_lower(LanguageToString(eScriptLanguageNone)))
 return eScriptLanguageNone;
-  else if (language.equals_lower(LanguageToString(eScriptLanguagePython)))
+  if (language.equals_lower(LanguageToString(eScriptLanguagePython)))
 return eScriptLanguagePython;
-  else
-return eScriptLanguageUnknown;
+  return eScriptLanguageUnknown;
 }
 
 Status ScriptInterpreter::SetBreakpointCommandCallback(


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D37420: [ABI] Rewrite RegisterIsCalleeSaved

2017-09-03 Thread Saleem Abdulrasool via Phabricator via lldb-commits
compnerd accepted this revision.
compnerd added a comment.
This revision is now accepted and ready to land.

Nice cleanup :-)




Comment at: source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp:1918
+.Cases("r12", "r13", "r14", "r15",
+   "rbp", "rbx", "ebp", "ebx", true)
+.Cases("rip", "eip", "rsp", "esp",

Would be nice to reoder these to `rbp`, `ebp`, `rbx`, `ebx`.  It is easier to 
see that you are looking at the 32-bit and 64-bit register names that way due 
to the association.


https://reviews.llvm.org/D37420



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r312457 - [UUID] Reimplement comparison operators more canonically. NFCI.

2017-09-03 Thread Davide Italiano via lldb-commits
Author: davide
Date: Sun Sep  3 13:53:24 2017
New Revision: 312457

URL: http://llvm.org/viewvc/llvm-project?rev=312457&view=rev
Log:
[UUID] Reimplement comparison operators more canonically. NFCI.

Modified:
lldb/trunk/source/Utility/UUID.cpp

Modified: lldb/trunk/source/Utility/UUID.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/UUID.cpp?rev=312457&r1=312456&r2=312457&view=diff
==
--- lldb/trunk/source/Utility/UUID.cpp (original)
+++ lldb/trunk/source/Utility/UUID.cpp Sun Sep  3 13:53:24 2017
@@ -198,8 +198,7 @@ bool lldb_private::operator==(const lldb
 
 bool lldb_private::operator!=(const lldb_private::UUID &lhs,
   const lldb_private::UUID &rhs) {
-  return ::memcmp(lhs.GetBytes(), rhs.GetBytes(),
-  sizeof(lldb_private::UUID::ValueType)) != 0;
+  return !(lhs == rhs);
 }
 
 bool lldb_private::operator<(const lldb_private::UUID &lhs,
@@ -210,18 +209,15 @@ bool lldb_private::operator<(const lldb_
 
 bool lldb_private::operator<=(const lldb_private::UUID &lhs,
   const lldb_private::UUID &rhs) {
-  return ::memcmp(lhs.GetBytes(), rhs.GetBytes(),
-  sizeof(lldb_private::UUID::ValueType)) <= 0;
+  return !(lhs > rhs);
 }
 
 bool lldb_private::operator>(const lldb_private::UUID &lhs,
  const lldb_private::UUID &rhs) {
-  return ::memcmp(lhs.GetBytes(), rhs.GetBytes(),
-  sizeof(lldb_private::UUID::ValueType)) > 0;
+  return rhs < lhs;
 }
 
 bool lldb_private::operator>=(const lldb_private::UUID &lhs,
   const lldb_private::UUID &rhs) {
-  return ::memcmp(lhs.GetBytes(), rhs.GetBytes(),
-  sizeof(lldb_private::UUID::ValueType)) >= 0;
+  return !(lhs < rhs);
 }


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits