[Lldb-commits] [lldb] r304142 - More StructuredData::Type::eTypeDictionary -> lldb::eStructuredDataTypeDictionary

2017-05-29 Thread Stephan Bergmann via lldb-commits
Author: sberg
Date: Mon May 29 03:51:58 2017
New Revision: 304142

URL: http://llvm.org/viewvc/llvm-project?rev=304142&view=rev
Log:
More StructuredData::Type::eTypeDictionary -> 
lldb::eStructuredDataTypeDictionary

...missing from previous r304138 "Added new API to SBStructuredData class"

Modified:

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=304142&r1=304141&r2=304142&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
Mon May 29 03:51:58 2017
@@ -3278,7 +3278,7 @@ GDBRemoteCommunicationClient::SendGetTra
   auto json_object = StructuredData::ParseJSON(response.Peek());
 
   if (!json_object ||
-  json_object->GetType() != StructuredData::Type::eTypeDictionary) {
+  json_object->GetType() != lldb::eStructuredDataTypeDictionary) {
 error.SetErrorString("Invalid Configuration obtained");
 return error;
   }
@@ -3299,7 +3299,7 @@ GDBRemoteCommunicationClient::SendGetTra
   json_dict->GetValueForKey("params");
   if (custom_params_sp) {
 if (custom_params_sp->GetType() !=
-StructuredData::Type::eTypeDictionary) {
+lldb::eStructuredDataTypeDictionary) {
   error.SetErrorString("Invalid Configuration obtained");
   return error;
 } else

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp?rev=304142&r1=304141&r2=304142&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
 Mon May 29 03:51:58 2017
@@ -1120,7 +1120,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   auto json_object = StructuredData::ParseJSON(packet.Peek());
 
   if (!json_object ||
-  json_object->GetType() != StructuredData::Type::eTypeDictionary)
+  json_object->GetType() != lldb::eStructuredDataTypeDictionary)
 return SendIllFormedResponse(packet, "jTraceStart: Ill formed packet ");
 
   auto json_dict = json_object->GetAsDictionary();
@@ -1140,7 +1140,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   StructuredData::ObjectSP custom_params_sp =
   json_dict->GetValueForKey("params");
   if (custom_params_sp &&
-  custom_params_sp->GetType() != StructuredData::Type::eTypeDictionary)
+  custom_params_sp->GetType() != lldb::eStructuredDataTypeDictionary)
 return SendIllFormedResponse(packet, "jTraceStart: Ill formed packet ");
 
   options.setTraceParams(
@@ -1182,7 +1182,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   auto json_object = StructuredData::ParseJSON(packet.Peek());
 
   if (!json_object ||
-  json_object->GetType() != StructuredData::Type::eTypeDictionary)
+  json_object->GetType() != lldb::eStructuredDataTypeDictionary)
 return SendIllFormedResponse(packet, "jTraceStop: Ill formed packet ");
 
   auto json_dict = json_object->GetAsDictionary();
@@ -1219,7 +1219,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   auto json_object = StructuredData::ParseJSON(packet.Peek());
 
   if (!json_object ||
-  json_object->GetType() != StructuredData::Type::eTypeDictionary)
+  json_object->GetType() != lldb::eStructuredDataTypeDictionary)
 return SendIllFormedResponse(packet,
  "jTraceConfigRead: Ill formed packet ");
 
@@ -1287,7 +1287,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   auto json_object = StructuredData::ParseJSON(packet.Peek());
 
   if (!json_object ||
-  json_object->GetType() != StructuredData::Type::eTypeDictionary)
+  json_object->GetType() != lldb::eStructuredDataTypeDictionary)
 return SendIllFormedResponse(packet, "jTrace: Ill formed packet ");
 
   auto json_dict = json_object->GetAsDictionary();


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


[Lldb-commits] [lldb] r289647 - Replace APFloatBase static fltSemantics data members with getter functions

2016-12-14 Thread Stephan Bergmann via lldb-commits
Author: sberg
Date: Wed Dec 14 05:57:17 2016
New Revision: 289647

URL: http://llvm.org/viewvc/llvm-project?rev=289647&view=rev
Log:
Replace APFloatBase static fltSemantics data members with getter functions

At least the plugin used by the LibreOffice build
() indirectly
uses those members (through inline functions in LLVM/Clang include files in turn
using them), but they are not exported by utils/extract_symbols.py on Windows,
and accessing data across DLL/EXE boundaries on Windows is generally
problematic.

Differential Revision: https://reviews.llvm.org/D26671

Modified:
lldb/trunk/include/lldb/Core/Scalar.h
lldb/trunk/source/Core/Scalar.cpp

Modified: lldb/trunk/include/lldb/Core/Scalar.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Scalar.h?rev=289647&r1=289646&r2=289647&view=diff
==
--- lldb/trunk/include/lldb/Core/Scalar.h (original)
+++ lldb/trunk/include/lldb/Core/Scalar.h Wed Dec 14 05:57:17 2016
@@ -75,11 +75,11 @@ public:
   Scalar(long double v, bool ieee_quad)
   : m_type(e_long_double), m_float((float)0), m_ieee_quad(ieee_quad) {
 if (ieee_quad)
-  m_float = llvm::APFloat(llvm::APFloat::IEEEquad,
+  m_float = llvm::APFloat(llvm::APFloat::IEEEquad(),
   llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128,
   ((type128 *)&v)->x));
 else
-  m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended,
+  m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended(),
   llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128,
   ((type128 *)&v)->x));
   }

Modified: lldb/trunk/source/Core/Scalar.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=289647&r1=289646&r2=289647&view=diff
==
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Wed Dec 14 05:57:17 2016
@@ -403,11 +403,11 @@ Scalar &Scalar::operator=(long double v)
   m_type = e_long_double;
   if (m_ieee_quad)
 m_float = llvm::APFloat(
-llvm::APFloat::IEEEquad,
+llvm::APFloat::IEEEquad(),
 llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128, ((type128 *)&v)->x));
   else
 m_float = llvm::APFloat(
-llvm::APFloat::x87DoubleExtended,
+llvm::APFloat::x87DoubleExtended(),
 llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128, ((type128 *)&v)->x));
   return *this;
 }
@@ -509,9 +509,9 @@ bool Scalar::Promote(Scalar::Type type)
 
 case e_long_double:
   if (m_ieee_quad)
-m_float = llvm::APFloat(llvm::APFloat::IEEEquad, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::IEEEquad(), m_integer);
   else
-m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended(), m_integer);
   success = true;
   break;
 }
@@ -569,9 +569,9 @@ bool Scalar::Promote(Scalar::Type type)
 
 case e_long_double:
   if (m_ieee_quad)
-m_float = llvm::APFloat(llvm::APFloat::IEEEquad, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::IEEEquad(), m_integer);
   else
-m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended(), m_integer);
   success = true;
   break;
 }
@@ -625,9 +625,9 @@ bool Scalar::Promote(Scalar::Type type)
 
 case e_long_double:
   if (m_ieee_quad)
-m_float = llvm::APFloat(llvm::APFloat::IEEEquad, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::IEEEquad(), m_integer);
   else
-m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended(), m_integer);
   success = true;
   break;
 }
@@ -677,9 +677,9 @@ bool Scalar::Promote(Scalar::Type type)
 
 case e_long_double:
   if (m_ieee_quad)
-m_float = llvm::APFloat(llvm::APFloat::IEEEquad, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::IEEEquad(), m_integer);
   else
-m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended(), m_integer);
   success = true;
   break;
 }
@@ -725,9 +725,9 @@ bool Scalar::Promote(Scalar::Type type)
 
 case e_long_double:
   if (m_ieee_quad)
-m_float = llvm::APFloat(llvm::APFloat::IEEEquad, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::IEEEquad(), m_integer);
   else
-m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended, m_integer);
+m_float = llvm::APFloat(llvm::APFloat::x87DoubleExtended(), m_integer);
   success 

[Lldb-commits] [PATCH] Avoid Python "UnboundedLocalError: local variable 'strErrMsgProgFail' referenced before assignment"

2015-11-11 Thread Stephan Bergmann via lldb-commits
An attempt at building lldb from recent trunk source failed for me with 
a Python error



UnboundedLocalError: local variable 'strErrMsgProgFail' referenced before 
assignment


in tools/lldb/scripts/Python/buildSwigPython.py.  I have not much of an 
idea about Python, but from 
 
it looks like there is "global strErrMsgProgFail" missing, and the 
attached lldb-buildSwigPython.patch indeed fixed the problem for me.


(I have no commit rights, so would ask for this to get pushed by 
somebody if acceptable.)
Index: scripts/Python/buildSwigPython.py
===
--- scripts/Python/buildSwigPython.py	(revision 252713)
+++ scripts/Python/buildSwigPython.py	(working copy)
@@ -640,6 +640,7 @@
 strMsg = ""
 
 if not "--swigExecutable" in vDictArgs:
+global strErrMsgProgFail
 strErrMsgProgFail += strErrMsgSwigParamsMissing
 return (-100, strErrMsgProgFail)
 
@@ -769,6 +770,7 @@
 if bOk:
 return (0, strMsg)
 else:
+global strErrMsgProgFail
 strErrMsgProgFail += strMsg
 return (-100, strErrMsgProgFail)
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits