[Lldb-commits] [lldb] r280200 - Update the Linux code to reflect the changes done by zturner in r280139

2016-08-31 Thread Sylvestre Ledru via lldb-commits
Author: sylvestre
Date: Wed Aug 31 02:16:56 2016
New Revision: 280200

URL: http://llvm.org/viewvc/llvm-project?rev=280200&view=rev
Log:
Update the Linux code to reflect the changes done by zturner in r280139

Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=280200&r1=280199&r2=280200&view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Wed Aug 31 
02:16:56 2016
@@ -1687,7 +1687,7 @@ ParseMemoryRegionInfoFromProcMapsLine (c
 line_extractor.GetU64(0, 10);  // Read the inode number
 
 line_extractor.SkipSpaces();
-const char* name = line_extractor.Peek();
+const char* name = line_extractor.PeekChar();
 if (name)
 memory_region_info.SetName(name);
 


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


[Lldb-commits] [lldb] r280202 - Fix lldb build on Mac.

2016-08-31 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Aug 31 02:42:38 2016
New Revision: 280202

URL: http://llvm.org/viewvc/llvm-project?rev=280202&view=rev
Log:
Fix lldb build on Mac.

Summary:
https://github.com/llvm-mirror/lldb/commit/e80f43fd78fa0fbc04d2d59b5713acb5d06c8308
greatly improved an API, but missed one more occurence of legacy usage.

This leads to:
  if (extractor.GetHexBytes(&payload_bytes[0], payload_bytes.size(), '\xdd') != 
payload_bytes.size())
~   
   ^~
  /lldb/include/lldb/Utility/StringExtractor.h:151:5: note: 'GetHexBytes' 
declared here

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D24064
Author: Taras Tsugrii 

Modified:
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=280202&r1=280201&r2=280202&view=diff
==
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Wed Aug 31 
02:42:38 2016
@@ -1099,7 +1099,7 @@ public:
 return false;
 }
 
payload_bytes.resize(ascii_hex_bytes_cstr_len/2);
-if (extractor.GetHexBytes(&payload_bytes[0], 
payload_bytes.size(), '\xdd') != payload_bytes.size())
+if (extractor.GetHexBytes(payload_bytes, 
'\xdd') != payload_bytes.size())
 {
 result.AppendErrorWithFormat ("payload 
data must only contain ASCII hex characters (no spaces or hex prefixes): '%s'", 
ascii_hex_bytes_cstr);
 result.SetStatus (eReturnStatusFailed);


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


[Lldb-commits] [lldb] r280204 - Revert r280200 and put it a proper fix

2016-08-31 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Aug 31 02:49:37 2016
New Revision: 280204

URL: http://llvm.org/viewvc/llvm-project?rev=280204&view=rev
Log:
Revert r280200 and put it a proper fix

PeekChar returns a character, we want the whole string there.

Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp

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

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=280204&r1=280203&r2=280204&view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Wed Aug 31 
02:49:37 2016
@@ -1620,7 +1620,7 @@ ParseMemoryRegionInfoFromProcMapsLine (c
 {
 memory_region_info.Clear();
 
-StringExtractor line_extractor (maps_line.c_str ());
+StringExtractor line_extractor (maps_line);
 
 // Format: {address_start_hex}-{address_end_hex} perms offset  dev   inode 
  pathname
 // perms: rwxp   (letter is present if set, '-' if not, final character is 
p=private, s=shared).
@@ -1687,9 +1687,7 @@ ParseMemoryRegionInfoFromProcMapsLine (c
 line_extractor.GetU64(0, 10);  // Read the inode number
 
 line_extractor.SkipSpaces();
-const char* name = line_extractor.PeekChar();
-if (name)
-memory_region_info.SetName(name);
+memory_region_info.SetName(line_extractor.Peek().str().c_str());
 
 return Error ();
 }

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=280204&r1=280203&r2=280204&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
 Wed Aug 31 02:49:37 2016
@@ -1257,7 +1257,8 @@ GDBRemoteCommunicationServerLLGS::Handle
 if (has_continue_address)
 {
 if (log)
-log->Printf ("GDBRemoteCommunicationServerLLGS::%s not implemented 
for c{address} variant [%s remains]", __FUNCTION__, packet.Peek ());
+log->Printf("GDBRemoteCommunicationServerLLGS::%s not implemented 
for c{address} variant [%s remains]",
+__FUNCTION__, packet.Peek().str().c_str());
 return SendUnimplementedResponse (packet.GetStringRef().c_str());
 }
 


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


[Lldb-commits] [lldb] r280208 - XFail new TestPyObjSynthProvider.py on linux until I can investigate the cause of the problem

2016-08-31 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Aug 31 03:43:40 2016
New Revision: 280208

URL: http://llvm.org/viewvc/llvm-project?rev=280208&view=rev
Log:
XFail new TestPyObjSynthProvider.py on linux until I can investigate the cause 
of the problem

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py?rev=280208&r1=280207&r2=280208&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
 Wed Aug 31 03:43:40 2016
@@ -17,6 +17,7 @@ class PyObjectSynthProviderTestCase(Test
 
 mydir = TestBase.compute_mydir(__file__)
 
+@expectedFailureAll(oslist=["linux"])
 def test_print_array(self):
 """Test that expr -Z works"""
 self.build()


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


[Lldb-commits] [lldb] r280207 - Revert r280137 and 280139 and subsequent build fixes

2016-08-31 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Aug 31 03:43:37 2016
New Revision: 280207

URL: http://llvm.org/viewvc/llvm-project?rev=280207&view=rev
Log:
Revert r280137 and 280139 and subsequent build fixes

The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a way 
which makes
lldb-server crash. The crash (assert) happens when parsing the "qRegisterInfo0" 
packet, because
the function tries to drop_front more bytes than the packet contains. It's not 
clear to me
whether we should consider this a bug in the caller or the callee, but it any 
case, it worked
before, so I am reverting this until we can figure out what the proper 
interface should be.

Modified:
lldb/trunk/include/lldb/Core/ArchSpec.h
lldb/trunk/include/lldb/Interpreter/Args.h
lldb/trunk/include/lldb/Utility/StringExtractor.h
lldb/trunk/source/Core/ArchSpec.cpp
lldb/trunk/source/Interpreter/Args.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp

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

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

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/trunk/source/Utility/StringExtractor.cpp
lldb/trunk/unittests/Utility/StringExtractorTest.cpp

Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=280207&r1=280206&r2=280207&view=diff
==
--- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ArchSpec.h Wed Aug 31 03:43:37 2016
@@ -265,9 +265,8 @@ public:
 ArchSpec (const llvm::Triple &triple);
 explicit 
 ArchSpec (const char *triple_cstr);
-explicit ArchSpec(llvm::StringRef triple_str);
-explicit ArchSpec(const char *triple_cstr, Platform *platform);
-ArchSpec(llvm::StringRef triple_str, Platform *platform);
+explicit 
+ArchSpec (const char *triple_cstr, Platform *platform);
 //--
 /// Constructor over architecture name.
 ///

Modified: lldb/trunk/include/lldb/Interpreter/Args.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=280207&r1=280206&r2=280207&view=diff
==
--- lldb/trunk/include/lldb/Interpreter/Args.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Aug 31 03:43:37 2016
@@ -202,10 +202,7 @@ public:
 /// The NULL terminated C string of the copy of \a arg_cstr.
 //--
 const char *
-AppendArgument(llvm::StringRef arg_str, char quote_char = '\0');
-
-const char *
-AppendArgument(const char *arg_cstr, char quote_char = '\0');
+AppendArgument (const char *arg_cstr, char quote_char = '\0');
 
 void
 AppendArguments (const Args &rhs);
@@ -230,8 +227,6 @@ public:
 //--
 const char *
 InsertArgumentAtIndex (size_t idx, const char *arg_cstr, char quote_char = 
'\0');
-const char *
-InsertArgumentAtIndex(size_t idx, llvm::StringRef arg_str, char quote_char 
= '\0');
 
 //--
 /// Replaces the argument value at index \a idx to \a arg_cstr

Modified: lldb/trunk/include/lldb/Utility/StringExtractor.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?rev=280207&r1=280206&r2=280207&view=diff
==
--- lldb/trunk/include/lldb/Utility/StringExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/StringExtractor.h Wed Aug 31 03:43:37 2016
@@ -112,10 +112,10 @@ public:
 char
 PeekChar (char fail_value = '\0')
 {
-llvm::StringRef str = Peek();
-if (str.empty())
-return fail_value;
-return str[0];
+const char *cstr = Peek();
+if (cstr)
+return cstr[0];
+return fail_value;
 }
 
 int
@@ -154,6 +154,9 @@ public:
 size_t
 GetHexBytesAvail (llvm::MutableArrayRef dest);
 
+uint64_t
+GetHexWithFixedSize (uint32_t byte_size, bool little_endian, uint64_t 
fail_value);
+
 size_t
 GetHexByteString (std::string &str);
 
@@ -163,13 +166,13 @@ public:
 size_t
 GetHexByteStringTerminatedBy (std::string &str,
   char terminator);
-
-llvm::StringRef
-Peek() const
+
+const char *
+Peek ()
 {
-if (!IsGood())
-return llvm::StringRef();
-return llvm::StringRef(m_packet).drop_front(m_index);
+if (m_index < m_packet.size())
+return m_packet.c_str() + m_index;
+  

[Lldb-commits] [PATCH] D24074: Fixup TestPyObjSynthProvider.py and enable it again

2016-08-31 Thread Pavel Labath via lldb-commits
labath created this revision.
labath added a reviewer: granata.enrico.
labath added a subscriber: lldb-commits.

- copies the new file in the cmake build
- adds an additional import statement
- marks the test as no-debug-info specific, as it seems to be testing a python 
feature

https://reviews.llvm.org/D24074

Files:
  
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
  
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
  scripts/Python/finishSwigPythonLLDB.py

Index: scripts/Python/finishSwigPythonLLDB.py
===
--- scripts/Python/finishSwigPythonLLDB.py
+++ scripts/Python/finishSwigPythonLLDB.py
@@ -793,6 +793,7 @@
 # Having these files copied here ensure that lldb/formatters is a
 # valid package itself
 listPkgFiles = [os.path.join(strRoot, "examples", "summaries", 
"cocoa", "cache.py"),
+os.path.join(strRoot, "examples", "summaries", 
"synth.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "metrics.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "attrib_fromdict.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "Logger.py")]
Index: 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
===
--- 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
+++ 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
@@ -1,5 +1,6 @@
 import lldb
 import lldb.formatters
+import lldb.formatters.synth
 
 class 
SyntheticChildrenProvider(lldb.formatters.synth.PythonObjectSyntheticChildProvider):
 def __init__(self, value, internal_dict):
Index: 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
===
--- 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
+++ 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
@@ -16,8 +16,8 @@
 class PyObjectSynthProviderTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
 
-@expectedFailureAll(oslist=["linux"])
 def test_print_array(self):
 """Test that expr -Z works"""
 self.build()


Index: scripts/Python/finishSwigPythonLLDB.py
===
--- scripts/Python/finishSwigPythonLLDB.py
+++ scripts/Python/finishSwigPythonLLDB.py
@@ -793,6 +793,7 @@
 # Having these files copied here ensure that lldb/formatters is a
 # valid package itself
 listPkgFiles = [os.path.join(strRoot, "examples", "summaries", "cocoa", "cache.py"),
+os.path.join(strRoot, "examples", "summaries", "synth.py"),
 os.path.join(strRoot, "examples", "summaries", "cocoa", "metrics.py"),
 os.path.join(strRoot, "examples", "summaries", "cocoa", "attrib_fromdict.py"),
 os.path.join(strRoot, "examples", "summaries", "cocoa", "Logger.py")]
Index: packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
===
--- packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
+++ packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
@@ -1,5 +1,6 @@
 import lldb
 import lldb.formatters
+import lldb.formatters.synth
 
 class SyntheticChildrenProvider(lldb.formatters.synth.PythonObjectSyntheticChildProvider):
 def __init__(self, value, internal_dict):
Index: packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
===
--- packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
+++ packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
@@ -16,8 +16,8 @@
 class PyObjectSynthProviderTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
 
-@expectedFailureAll(oslist=["linux"])
 def test_print_array(self):
 """Test that expr -Z works"""
 self.build()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r280204 - Revert r280200 and put it a proper fix

2016-08-31 Thread Zachary Turner via lldb-commits
SetName accepts a StringRef, why not just SetName(line_extractor.Peek())?
On Wed, Aug 31, 2016 at 12:57 AM Pavel Labath via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: labath
> Date: Wed Aug 31 02:49:37 2016
> New Revision: 280204
>
> URL: http://llvm.org/viewvc/llvm-project?rev=280204&view=rev
> Log:
> Revert r280200 and put it a proper fix
>
> PeekChar returns a character, we want the whole string there.
>
> Modified:
> lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
>
> Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=280204&r1=280203&r2=280204&view=diff
>
> ==
> --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
> (original)
> +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Wed Aug
> 31 02:49:37 2016
> @@ -1620,7 +1620,7 @@ ParseMemoryRegionInfoFromProcMapsLine (c
>  {
>  memory_region_info.Clear();
>
> -StringExtractor line_extractor (maps_line.c_str ());
> +StringExtractor line_extractor (maps_line);
>
>  // Format: {address_start_hex}-{address_end_hex} perms offset  dev
>  inode   pathname
>  // perms: rwxp   (letter is present if set, '-' if not, final
> character is p=private, s=shared).
> @@ -1687,9 +1687,7 @@ ParseMemoryRegionInfoFromProcMapsLine (c
>  line_extractor.GetU64(0, 10);  // Read the inode number
>
>  line_extractor.SkipSpaces();
> -const char* name = line_extractor.PeekChar();
> -if (name)
> -memory_region_info.SetName(name);
> +memory_region_info.SetName(line_extractor.Peek().str().c_str());
>
>  return Error ();
>  }
>
> 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=280204&r1=280203&r2=280204&view=diff
>
> ==
> ---
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
> (original)
> +++
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
> Wed Aug 31 02:49:37 2016
> @@ -1257,7 +1257,8 @@ GDBRemoteCommunicationServerLLGS::Handle
>  if (has_continue_address)
>  {
>  if (log)
> -log->Printf ("GDBRemoteCommunicationServerLLGS::%s not
> implemented for c{address} variant [%s remains]", __FUNCTION__, packet.Peek
> ());
> +log->Printf("GDBRemoteCommunicationServerLLGS::%s not
> implemented for c{address} variant [%s remains]",
> +__FUNCTION__, packet.Peek().str().c_str());
>  return SendUnimplementedResponse (packet.GetStringRef().c_str());
>  }
>
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r280207 - Revert r280137 and 280139 and subsequent build fixes

2016-08-31 Thread Zachary Turner via lldb-commits
Can you post the exact contents of the string causing the crash? I'll add a
unittest for it
On Wed, Aug 31, 2016 at 1:51 AM Pavel Labath via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: labath
> Date: Wed Aug 31 03:43:37 2016
> New Revision: 280207
>
> URL: http://llvm.org/viewvc/llvm-project?rev=280207&view=rev
> Log:
> Revert r280137 and 280139 and subsequent build fixes
>
> The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a
> way which makes
> lldb-server crash. The crash (assert) happens when parsing the
> "qRegisterInfo0" packet, because
> the function tries to drop_front more bytes than the packet contains. It's
> not clear to me
> whether we should consider this a bug in the caller or the callee, but it
> any case, it worked
> before, so I am reverting this until we can figure out what the proper
> interface should be.
>
> Modified:
> lldb/trunk/include/lldb/Core/ArchSpec.h
> lldb/trunk/include/lldb/Interpreter/Args.h
> lldb/trunk/include/lldb/Utility/StringExtractor.h
> lldb/trunk/source/Core/ArchSpec.cpp
> lldb/trunk/source/Interpreter/Args.cpp
> lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
> lldb/trunk/source/Utility/StringExtractor.cpp
> lldb/trunk/unittests/Utility/StringExtractorTest.cpp
>
> Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=280207&r1=280206&r2=280207&view=diff
>
> ==
> --- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
> +++ lldb/trunk/include/lldb/Core/ArchSpec.h Wed Aug 31 03:43:37 2016
> @@ -265,9 +265,8 @@ public:
>  ArchSpec (const llvm::Triple &triple);
>  explicit
>  ArchSpec (const char *triple_cstr);
> -explicit ArchSpec(llvm::StringRef triple_str);
> -explicit ArchSpec(const char *triple_cstr, Platform *platform);
> -ArchSpec(llvm::StringRef triple_str, Platform *platform);
> +explicit
> +ArchSpec (const char *triple_cstr, Platform *platform);
>  //--
>  /// Constructor over architecture name.
>  ///
>
> Modified: lldb/trunk/include/lldb/Interpreter/Args.h
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=280207&r1=280206&r2=280207&view=diff
>
> ==
> --- lldb/trunk/include/lldb/Interpreter/Args.h (original)
> +++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Aug 31 03:43:37 2016
> @@ -202,10 +202,7 @@ public:
>  /// The NULL terminated C string of the copy of \a arg_cstr.
>  //--
>  const char *
> -AppendArgument(llvm::StringRef arg_str, char quote_char = '\0');
> -
> -const char *
> -AppendArgument(const char *arg_cstr, char quote_char = '\0');
> +AppendArgument (const char *arg_cstr, char quote_char = '\0');
>
>  void
>  AppendArguments (const Args &rhs);
> @@ -230,8 +227,6 @@ public:
>  //--
>  const char *
>  InsertArgumentAtIndex (size_t idx, const char *arg_cstr, char
> quote_char = '\0');
> -const char *
> -InsertArgumentAtIndex(size_t idx, llvm::StringRef arg_str, char
> quote_char = '\0');
>
>  //--
>  /// Replaces the argument value at index \a idx to \a arg_cstr
>
> Modified: lldb/trunk/include/lldb/Utility/StringExtractor.h
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?rev=280207&r1=280206&r2=280207&view=diff
>
> ==
> --- lldb/trunk/include/lldb/Utility/StringExtractor.h (original)
> +++ lldb/trunk/include/lldb/Utility/StringExtractor.h Wed Aug 31 03:43:37
> 2016
> @@ -112,10 +112,10 @@ public:
>  char
>  PeekChar (char fail_value = '\0')
>  {
> -llvm::StringRef str = Peek();
> -if (str.empty())
> -return fail_value;
> -return str[0];
> +const char *cstr = Peek();
> +if (cstr)
> +return cstr[0];
> +return fail_value;
>  }
>
>  int
> @@ -154,6 +154,9 @@ public:
>  size_t
>  GetHexBytesAvail (llvm::MutableArrayRef dest);
>
> +uint64_t
> +GetHexWithFixedSize (uint32_t byte_size, bool little_endian, uint64_t
> fail_value);
> +
>  size_t
>  GetHexByteString (std::string &str);
>
> @@ -163,13 +166,13 @@ public:
>  size_t
>  GetHexByteSt

Re: [Lldb-commits] [lldb] r280204 - Revert r280200 and put it a proper fix

2016-08-31 Thread Pavel Labath via lldb-commits
It's MemoryRegionInfo::SetName(const char *), there's no StringRef
version. I wanted to keep the fix minimal, but it turned out to not be
enough.

On 31 August 2016 at 14:21, Zachary Turner  wrote:
> SetName accepts a StringRef, why not just SetName(line_extractor.Peek())?
>
> On Wed, Aug 31, 2016 at 12:57 AM Pavel Labath via lldb-commits
>  wrote:
>>
>> Author: labath
>> Date: Wed Aug 31 02:49:37 2016
>> New Revision: 280204
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=280204&view=rev
>> Log:
>> Revert r280200 and put it a proper fix
>>
>> PeekChar returns a character, we want the whole string there.
>>
>> Modified:
>> lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
>>
>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
>>
>> Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=280204&r1=280203&r2=280204&view=diff
>>
>> ==
>> --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
>> (original)
>> +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Wed Aug
>> 31 02:49:37 2016
>> @@ -1620,7 +1620,7 @@ ParseMemoryRegionInfoFromProcMapsLine (c
>>  {
>>  memory_region_info.Clear();
>>
>> -StringExtractor line_extractor (maps_line.c_str ());
>> +StringExtractor line_extractor (maps_line);
>>
>>  // Format: {address_start_hex}-{address_end_hex} perms offset  dev
>> inode   pathname
>>  // perms: rwxp   (letter is present if set, '-' if not, final
>> character is p=private, s=shared).
>> @@ -1687,9 +1687,7 @@ ParseMemoryRegionInfoFromProcMapsLine (c
>>  line_extractor.GetU64(0, 10);  // Read the inode number
>>
>>  line_extractor.SkipSpaces();
>> -const char* name = line_extractor.PeekChar();
>> -if (name)
>> -memory_region_info.SetName(name);
>> +memory_region_info.SetName(line_extractor.Peek().str().c_str());
>>
>>  return Error ();
>>  }
>>
>> 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=280204&r1=280203&r2=280204&view=diff
>>
>> ==
>> ---
>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
>> (original)
>> +++
>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
>> Wed Aug 31 02:49:37 2016
>> @@ -1257,7 +1257,8 @@ GDBRemoteCommunicationServerLLGS::Handle
>>  if (has_continue_address)
>>  {
>>  if (log)
>> -log->Printf ("GDBRemoteCommunicationServerLLGS::%s not
>> implemented for c{address} variant [%s remains]", __FUNCTION__, packet.Peek
>> ());
>> +log->Printf("GDBRemoteCommunicationServerLLGS::%s not
>> implemented for c{address} variant [%s remains]",
>> +__FUNCTION__, packet.Peek().str().c_str());
>>  return SendUnimplementedResponse (packet.GetStringRef().c_str());
>>  }
>>
>>
>>
>> ___
>> lldb-commits mailing list
>> lldb-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D24013: Removed the `GetStringRef()` functions of `StringExtractor`

2016-08-31 Thread Pavel Labath via lldb-commits
labath requested changes to this revision.
labath added a comment.
This revision now requires changes to proceed.

It is hung because one of your previous changes broke a very fundamental piece 
of functionality, which makes all tests fail. It is fixed now 
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake and the tests 
are passing on our buildbot in a very stable manner.

I request that you stop making these changes, until we figure out how to make 
sure they can go in safely.

- first, I'd like to wait with the changes until after the reformat. The reason 
for this is that the reformat will make tracking breakages and/or reverting 
much more difficult. I'm not disputing the need for doing this, but I do 
believe it can wait one more week.
- second, I'd like to have these changes tested more before or immediately 
after they go in. The StringExtractor is much more heavily used on OSX/Linux 
than it is on windows, so I don't think running lldb windows host tests is 
enough. Now, there is nothing host-specific in the string extractor and in an 
ideal world we would have enough unit tests to make sure a refactor is not 
breaking things, but we are not there yet, and until we get there, I think 
you'll need to be more careful about refactoring random stuff.

You said the test suite was not working for you yesterday. Could you check it 
again today? It works fine on the buildbot now. Last time I remember we spoke 
about this, the problem  was two tests being too slow. Both of these issues 
should be resolved now, and if there is still something wrong, I am ready to 
work with you to resolve them. This should enable you to have more confidence 
into the more risky changes. For the less risky ones, you should be able to 
rely on the buildbot to do post-submit verification.  I'll get the buildbot set 
up to send out emails when tests break. I think it is very stable now, and I 
think I've been putting of that task for long enough. Please look out for 
emails from it and try to resolve problems it detects, particularly when making 
chained changes like yesterday. The turnaround time should be very fast now (12 
minutes). I'd like to avoid situations where I have to scramble to put things 
back in a working state, like I had to for the past two mornings.

Again, I am not trying do stop you from doing this, as I agree that it needs to 
be done. I'd like to just make sure it is done in a sustainable manner.


https://reviews.llvm.org/D24013



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


Re: [Lldb-commits] [lldb] r280207 - Revert r280137 and 280139 and subsequent build fixes

2016-08-31 Thread Pavel Labath via lldb-commits
StringExtractor ex("0");
EXPECT_EQ(0x0, ex.GetHexMaxU64(false, 0)); // instead it crashes



On 31 August 2016 at 14:22, Zachary Turner  wrote:
> Can you post the exact contents of the string causing the crash? I'll add a
> unittest for it
>
> On Wed, Aug 31, 2016 at 1:51 AM Pavel Labath via lldb-commits
>  wrote:
>>
>> Author: labath
>> Date: Wed Aug 31 03:43:37 2016
>> New Revision: 280207
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=280207&view=rev
>> Log:
>> Revert r280137 and 280139 and subsequent build fixes
>>
>> The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a
>> way which makes
>> lldb-server crash. The crash (assert) happens when parsing the
>> "qRegisterInfo0" packet, because
>> the function tries to drop_front more bytes than the packet contains. It's
>> not clear to me
>> whether we should consider this a bug in the caller or the callee, but it
>> any case, it worked
>> before, so I am reverting this until we can figure out what the proper
>> interface should be.
>>
>> Modified:
>> lldb/trunk/include/lldb/Core/ArchSpec.h
>> lldb/trunk/include/lldb/Interpreter/Args.h
>> lldb/trunk/include/lldb/Utility/StringExtractor.h
>> lldb/trunk/source/Core/ArchSpec.cpp
>> lldb/trunk/source/Interpreter/Args.cpp
>> lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
>>
>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
>>
>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
>>
>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
>> lldb/trunk/source/Utility/StringExtractor.cpp
>> lldb/trunk/unittests/Utility/StringExtractorTest.cpp
>>
>> Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=280207&r1=280206&r2=280207&view=diff
>>
>> ==
>> --- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
>> +++ lldb/trunk/include/lldb/Core/ArchSpec.h Wed Aug 31 03:43:37 2016
>> @@ -265,9 +265,8 @@ public:
>>  ArchSpec (const llvm::Triple &triple);
>>  explicit
>>  ArchSpec (const char *triple_cstr);
>> -explicit ArchSpec(llvm::StringRef triple_str);
>> -explicit ArchSpec(const char *triple_cstr, Platform *platform);
>> -ArchSpec(llvm::StringRef triple_str, Platform *platform);
>> +explicit
>> +ArchSpec (const char *triple_cstr, Platform *platform);
>>  //--
>>  /// Constructor over architecture name.
>>  ///
>>
>> Modified: lldb/trunk/include/lldb/Interpreter/Args.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=280207&r1=280206&r2=280207&view=diff
>>
>> ==
>> --- lldb/trunk/include/lldb/Interpreter/Args.h (original)
>> +++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Aug 31 03:43:37 2016
>> @@ -202,10 +202,7 @@ public:
>>  /// The NULL terminated C string of the copy of \a arg_cstr.
>>  //--
>>  const char *
>> -AppendArgument(llvm::StringRef arg_str, char quote_char = '\0');
>> -
>> -const char *
>> -AppendArgument(const char *arg_cstr, char quote_char = '\0');
>> +AppendArgument (const char *arg_cstr, char quote_char = '\0');
>>
>>  void
>>  AppendArguments (const Args &rhs);
>> @@ -230,8 +227,6 @@ public:
>>  //--
>>  const char *
>>  InsertArgumentAtIndex (size_t idx, const char *arg_cstr, char
>> quote_char = '\0');
>> -const char *
>> -InsertArgumentAtIndex(size_t idx, llvm::StringRef arg_str, char
>> quote_char = '\0');
>>
>>  //--
>>  /// Replaces the argument value at index \a idx to \a arg_cstr
>>
>> Modified: lldb/trunk/include/lldb/Utility/StringExtractor.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?rev=280207&r1=280206&r2=280207&view=diff
>>
>> ==
>> --- lldb/trunk/include/lldb/Utility/StringExtractor.h (original)
>> +++ lldb/trunk/include/lldb/Utility/StringExtractor.h Wed Aug 31 03:43:37
>> 2016
>> @@ -112,10 +112,10 @@ public:
>>  char
>>  PeekChar (char fail_value = '\0')
>>  {
>> -llvm::StringRef str = Peek();
>> -if (str.empty())
>> -return fail_value;
>> -return str[0];
>> +const char *cstr = Peek();
>> +if (cstr)
>> +return cstr[0];
>> +return fail_value;
>>  }
>>
>>  int
>> @@ -154,6 +154,9 @@ public:
>>  size_t
>>  GetHexBytesAvail (llvm::MutableArrayRef 

Re: [Lldb-commits] [lldb] r280207 - Revert r280137 and 280139 and subsequent build fixes

2016-08-31 Thread Zachary Turner via lldb-commits
Thanks, I'll check it out. Are there any plans to make buildbots send
emails? It seems less useful when we can't tell when we're breaking
something
On Wed, Aug 31, 2016 at 6:38 AM Pavel Labath  wrote:

> StringExtractor ex("0");
> EXPECT_EQ(0x0, ex.GetHexMaxU64(false, 0)); // instead it crashes
>
>
>
> On 31 August 2016 at 14:22, Zachary Turner  wrote:
> > Can you post the exact contents of the string causing the crash? I'll
> add a
> > unittest for it
> >
> > On Wed, Aug 31, 2016 at 1:51 AM Pavel Labath via lldb-commits
> >  wrote:
> >>
> >> Author: labath
> >> Date: Wed Aug 31 03:43:37 2016
> >> New Revision: 280207
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=280207&view=rev
> >> Log:
> >> Revert r280137 and 280139 and subsequent build fixes
> >>
> >> The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a
> >> way which makes
> >> lldb-server crash. The crash (assert) happens when parsing the
> >> "qRegisterInfo0" packet, because
> >> the function tries to drop_front more bytes than the packet contains.
> It's
> >> not clear to me
> >> whether we should consider this a bug in the caller or the callee, but
> it
> >> any case, it worked
> >> before, so I am reverting this until we can figure out what the proper
> >> interface should be.
> >>
> >> Modified:
> >> lldb/trunk/include/lldb/Core/ArchSpec.h
> >> lldb/trunk/include/lldb/Interpreter/Args.h
> >> lldb/trunk/include/lldb/Utility/StringExtractor.h
> >> lldb/trunk/source/Core/ArchSpec.cpp
> >> lldb/trunk/source/Interpreter/Args.cpp
> >> lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
> >>
> >>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
> >>
> >>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
> >>
> >>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
> >> lldb/trunk/source/Utility/StringExtractor.cpp
> >> lldb/trunk/unittests/Utility/StringExtractorTest.cpp
> >>
> >> Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=280207&r1=280206&r2=280207&view=diff
> >>
> >>
> ==
> >> --- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
> >> +++ lldb/trunk/include/lldb/Core/ArchSpec.h Wed Aug 31 03:43:37 2016
> >> @@ -265,9 +265,8 @@ public:
> >>  ArchSpec (const llvm::Triple &triple);
> >>  explicit
> >>  ArchSpec (const char *triple_cstr);
> >> -explicit ArchSpec(llvm::StringRef triple_str);
> >> -explicit ArchSpec(const char *triple_cstr, Platform *platform);
> >> -ArchSpec(llvm::StringRef triple_str, Platform *platform);
> >> +explicit
> >> +ArchSpec (const char *triple_cstr, Platform *platform);
> >>
> //--
> >>  /// Constructor over architecture name.
> >>  ///
> >>
> >> Modified: lldb/trunk/include/lldb/Interpreter/Args.h
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=280207&r1=280206&r2=280207&view=diff
> >>
> >>
> ==
> >> --- lldb/trunk/include/lldb/Interpreter/Args.h (original)
> >> +++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Aug 31 03:43:37 2016
> >> @@ -202,10 +202,7 @@ public:
> >>  /// The NULL terminated C string of the copy of \a arg_cstr.
> >>
> //--
> >>  const char *
> >> -AppendArgument(llvm::StringRef arg_str, char quote_char = '\0');
> >> -
> >> -const char *
> >> -AppendArgument(const char *arg_cstr, char quote_char = '\0');
> >> +AppendArgument (const char *arg_cstr, char quote_char = '\0');
> >>
> >>  void
> >>  AppendArguments (const Args &rhs);
> >> @@ -230,8 +227,6 @@ public:
> >>
> //--
> >>  const char *
> >>  InsertArgumentAtIndex (size_t idx, const char *arg_cstr, char
> >> quote_char = '\0');
> >> -const char *
> >> -InsertArgumentAtIndex(size_t idx, llvm::StringRef arg_str, char
> >> quote_char = '\0');
> >>
> >>
> //--
> >>  /// Replaces the argument value at index \a idx to \a arg_cstr
> >>
> >> Modified: lldb/trunk/include/lldb/Utility/StringExtractor.h
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?rev=280207&r1=280206&r2=280207&view=diff
> >>
> >>
> ==
> >> --- lldb/trunk/include/lldb/Utility/StringExtractor.h (original)
> >> +++ lldb/trunk/include/lldb/Utility/StringExtractor.h Wed Aug 31
> 03:43:37
> >> 2016
> >> @@ -112,10 +112,10 @@ public:
> >>  char

Re: [Lldb-commits] [lldb] r280207 - Revert r280137 and 280139 and subsequent build fixes

2016-08-31 Thread Pavel Labath via lldb-commits
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver
builds linux and various configurations of android. This one is
already sending out emails.

http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake runs
local linux test suite. It should be quite stable now, but I was
giving it a bit of time to make sure it's still not flaky (and also
just generally being busy). Given the recent breakages, I am going to
rearrange the priorities a bit, and get the emails enabled.

On 31 August 2016 at 14:45, Zachary Turner  wrote:
> Thanks, I'll check it out. Are there any plans to make buildbots send
> emails? It seems less useful when we can't tell when we're breaking
> something
> On Wed, Aug 31, 2016 at 6:38 AM Pavel Labath  wrote:
>>
>> StringExtractor ex("0");
>> EXPECT_EQ(0x0, ex.GetHexMaxU64(false, 0)); // instead it crashes
>>
>>
>>
>> On 31 August 2016 at 14:22, Zachary Turner  wrote:
>> > Can you post the exact contents of the string causing the crash? I'll
>> > add a
>> > unittest for it
>> >
>> > On Wed, Aug 31, 2016 at 1:51 AM Pavel Labath via lldb-commits
>> >  wrote:
>> >>
>> >> Author: labath
>> >> Date: Wed Aug 31 03:43:37 2016
>> >> New Revision: 280207
>> >>
>> >> URL: http://llvm.org/viewvc/llvm-project?rev=280207&view=rev
>> >> Log:
>> >> Revert r280137 and 280139 and subsequent build fixes
>> >>
>> >> The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a
>> >> way which makes
>> >> lldb-server crash. The crash (assert) happens when parsing the
>> >> "qRegisterInfo0" packet, because
>> >> the function tries to drop_front more bytes than the packet contains.
>> >> It's
>> >> not clear to me
>> >> whether we should consider this a bug in the caller or the callee, but
>> >> it
>> >> any case, it worked
>> >> before, so I am reverting this until we can figure out what the proper
>> >> interface should be.
>> >>
>> >> Modified:
>> >> lldb/trunk/include/lldb/Core/ArchSpec.h
>> >> lldb/trunk/include/lldb/Interpreter/Args.h
>> >> lldb/trunk/include/lldb/Utility/StringExtractor.h
>> >> lldb/trunk/source/Core/ArchSpec.cpp
>> >> lldb/trunk/source/Interpreter/Args.cpp
>> >> lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
>> >>
>> >>
>> >> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
>> >>
>> >>
>> >> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
>> >>
>> >>
>> >> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
>> >> lldb/trunk/source/Utility/StringExtractor.cpp
>> >> lldb/trunk/unittests/Utility/StringExtractorTest.cpp
>> >>
>> >> Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
>> >> URL:
>> >>
>> >> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=280207&r1=280206&r2=280207&view=diff
>> >>
>> >>
>> >> ==
>> >> --- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
>> >> +++ lldb/trunk/include/lldb/Core/ArchSpec.h Wed Aug 31 03:43:37 2016
>> >> @@ -265,9 +265,8 @@ public:
>> >>  ArchSpec (const llvm::Triple &triple);
>> >>  explicit
>> >>  ArchSpec (const char *triple_cstr);
>> >> -explicit ArchSpec(llvm::StringRef triple_str);
>> >> -explicit ArchSpec(const char *triple_cstr, Platform *platform);
>> >> -ArchSpec(llvm::StringRef triple_str, Platform *platform);
>> >> +explicit
>> >> +ArchSpec (const char *triple_cstr, Platform *platform);
>> >>
>> >> //--
>> >>  /// Constructor over architecture name.
>> >>  ///
>> >>
>> >> Modified: lldb/trunk/include/lldb/Interpreter/Args.h
>> >> URL:
>> >>
>> >> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=280207&r1=280206&r2=280207&view=diff
>> >>
>> >>
>> >> ==
>> >> --- lldb/trunk/include/lldb/Interpreter/Args.h (original)
>> >> +++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Aug 31 03:43:37 2016
>> >> @@ -202,10 +202,7 @@ public:
>> >>  /// The NULL terminated C string of the copy of \a arg_cstr.
>> >>
>> >> //--
>> >>  const char *
>> >> -AppendArgument(llvm::StringRef arg_str, char quote_char = '\0');
>> >> -
>> >> -const char *
>> >> -AppendArgument(const char *arg_cstr, char quote_char = '\0');
>> >> +AppendArgument (const char *arg_cstr, char quote_char = '\0');
>> >>
>> >>  void
>> >>  AppendArguments (const Args &rhs);
>> >> @@ -230,8 +227,6 @@ public:
>> >>
>> >> //--
>> >>  const char *
>> >>  InsertArgumentAtIndex (size_t idx, const char *arg_cstr, char
>> >> quote_char = '\0');
>> >> -const char *
>> >> -InsertArgumentAtIndex(size_t idx, llvm::StringRef arg_s

Re: [Lldb-commits] [lldb] r280207 - Revert r280137 and 280139 and subsequent build fixes

2016-08-31 Thread Zachary Turner via lldb-commits
Yea that would be great, no email is usually a sign that everything is ok,
I could have had the changes reverted and/or fixed much earlier had I known
On Wed, Aug 31, 2016 at 6:57 AM Pavel Labath  wrote:

> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver
> builds linux and various configurations of android. This one is
> already sending out emails.
>
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake runs
> local linux test suite. It should be quite stable now, but I was
> giving it a bit of time to make sure it's still not flaky (and also
> just generally being busy). Given the recent breakages, I am going to
> rearrange the priorities a bit, and get the emails enabled.
>
> On 31 August 2016 at 14:45, Zachary Turner  wrote:
> > Thanks, I'll check it out. Are there any plans to make buildbots send
> > emails? It seems less useful when we can't tell when we're breaking
> > something
> > On Wed, Aug 31, 2016 at 6:38 AM Pavel Labath  wrote:
> >>
> >> StringExtractor ex("0");
> >> EXPECT_EQ(0x0, ex.GetHexMaxU64(false, 0)); // instead it crashes
> >>
> >>
> >>
> >> On 31 August 2016 at 14:22, Zachary Turner  wrote:
> >> > Can you post the exact contents of the string causing the crash? I'll
> >> > add a
> >> > unittest for it
> >> >
> >> > On Wed, Aug 31, 2016 at 1:51 AM Pavel Labath via lldb-commits
> >> >  wrote:
> >> >>
> >> >> Author: labath
> >> >> Date: Wed Aug 31 03:43:37 2016
> >> >> New Revision: 280207
> >> >>
> >> >> URL: http://llvm.org/viewvc/llvm-project?rev=280207&view=rev
> >> >> Log:
> >> >> Revert r280137 and 280139 and subsequent build fixes
> >> >>
> >> >> The rewrite of StringExtractor::GetHexMaxU32 changes functionality
> in a
> >> >> way which makes
> >> >> lldb-server crash. The crash (assert) happens when parsing the
> >> >> "qRegisterInfo0" packet, because
> >> >> the function tries to drop_front more bytes than the packet contains.
> >> >> It's
> >> >> not clear to me
> >> >> whether we should consider this a bug in the caller or the callee,
> but
> >> >> it
> >> >> any case, it worked
> >> >> before, so I am reverting this until we can figure out what the
> proper
> >> >> interface should be.
> >> >>
> >> >> Modified:
> >> >> lldb/trunk/include/lldb/Core/ArchSpec.h
> >> >> lldb/trunk/include/lldb/Interpreter/Args.h
> >> >> lldb/trunk/include/lldb/Utility/StringExtractor.h
> >> >> lldb/trunk/source/Core/ArchSpec.cpp
> >> >> lldb/trunk/source/Interpreter/Args.cpp
> >> >> lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
> >> >>
> >> >>
> >> >>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
> >> >>
> >> >>
> >> >>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
> >> >>
> >> >>
> >> >>
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
> >> >> lldb/trunk/source/Utility/StringExtractor.cpp
> >> >> lldb/trunk/unittests/Utility/StringExtractorTest.cpp
> >> >>
> >> >> Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
> >> >> URL:
> >> >>
> >> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=280207&r1=280206&r2=280207&view=diff
> >> >>
> >> >>
> >> >>
> ==
> >> >> --- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
> >> >> +++ lldb/trunk/include/lldb/Core/ArchSpec.h Wed Aug 31 03:43:37 2016
> >> >> @@ -265,9 +265,8 @@ public:
> >> >>  ArchSpec (const llvm::Triple &triple);
> >> >>  explicit
> >> >>  ArchSpec (const char *triple_cstr);
> >> >> -explicit ArchSpec(llvm::StringRef triple_str);
> >> >> -explicit ArchSpec(const char *triple_cstr, Platform *platform);
> >> >> -ArchSpec(llvm::StringRef triple_str, Platform *platform);
> >> >> +explicit
> >> >> +ArchSpec (const char *triple_cstr, Platform *platform);
> >> >>
> >> >> //--
> >> >>  /// Constructor over architecture name.
> >> >>  ///
> >> >>
> >> >> Modified: lldb/trunk/include/lldb/Interpreter/Args.h
> >> >> URL:
> >> >>
> >> >>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=280207&r1=280206&r2=280207&view=diff
> >> >>
> >> >>
> >> >>
> ==
> >> >> --- lldb/trunk/include/lldb/Interpreter/Args.h (original)
> >> >> +++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Aug 31 03:43:37
> 2016
> >> >> @@ -202,10 +202,7 @@ public:
> >> >>  /// The NULL terminated C string of the copy of \a arg_cstr.
> >> >>
> >> >> //--
> >> >>  const char *
> >> >> -AppendArgument(llvm::StringRef arg_str, char quote_char = '\0');
> >> >> -
> >> >> -const char *
> >> >> -AppendArgument(const char *arg_cstr, char quote_char = '\0');
> >> >> +AppendArgume

[Lldb-commits] [PATCH] D24078: [zorg] Move lldb-x86_64-ubuntu-14.04-cmake buildbot to the stable category

2016-08-31 Thread Pavel Labath via lldb-commits
labath created this revision.
labath added reviewers: gkistanova, chying.
labath added subscribers: lldb-commits, zturner.
Herald added subscribers: srhines, danalbert, tberghammer.

The buildbot has been stable for the past few months and having it send
breakage emails will make it much easier to diagnose and fix failures.

https://reviews.llvm.org/D24078

Files:
  buildbot/osuosl/master/config/builders.py

Index: buildbot/osuosl/master/config/builders.py
===
--- buildbot/osuosl/master/config/builders.py
+++ buildbot/osuosl/master/config/builders.py
@@ -612,6 +612,14 @@
 downloadBinary=False,
 buildAndroid=True,
 runTest=False)},
+{'name': "lldb-x86_64-ubuntu-14.04-cmake",
+ 'slavenames': ["lldb-build1-ubuntu-1404"],
+ 'builddir': "buildWorkingDir",
+ 'category' : 'lldb',
+ 'factory': LLDBBuilder.getLLDBScriptCommandsFactory(
+downloadBinary=False,
+buildAndroid=False,
+runTest=True)},
 {'name': "lldb-amd64-ninja-netbsd7",
  'slavenames': ["lldb-amd64-ninja-netbsd7"],
  'builddir': "build",
@@ -1077,14 +1085,6 @@
  'factory': LLDBBuilder.getLLDBBuildFactory(triple=None, # use default
 
extra_configure_args=['--enable-cxx11', '--enable-optimized', 
'--enable-assertions'],
 
env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'})},
-{'name': "lldb-x86_64-ubuntu-14.04-cmake",
- 'slavenames': ["lldb-build1-ubuntu-1404"],
- 'builddir': "buildWorkingDir",
- 'category' : 'lldb',
- 'factory': LLDBBuilder.getLLDBScriptCommandsFactory(
-downloadBinary=False,
-buildAndroid=False,
-runTest=True)},
 {'name': "lldb-x86_64-darwin-13.4",
  'slavenames': ["lldb-x86_64-darwin-13.4"],
  'builddir': "buildDir",


Index: buildbot/osuosl/master/config/builders.py
===
--- buildbot/osuosl/master/config/builders.py
+++ buildbot/osuosl/master/config/builders.py
@@ -612,6 +612,14 @@
 downloadBinary=False,
 buildAndroid=True,
 runTest=False)},
+{'name': "lldb-x86_64-ubuntu-14.04-cmake",
+ 'slavenames': ["lldb-build1-ubuntu-1404"],
+ 'builddir': "buildWorkingDir",
+ 'category' : 'lldb',
+ 'factory': LLDBBuilder.getLLDBScriptCommandsFactory(
+downloadBinary=False,
+buildAndroid=False,
+runTest=True)},
 {'name': "lldb-amd64-ninja-netbsd7",
  'slavenames': ["lldb-amd64-ninja-netbsd7"],
  'builddir': "build",
@@ -1077,14 +1085,6 @@
  'factory': LLDBBuilder.getLLDBBuildFactory(triple=None, # use default
 extra_configure_args=['--enable-cxx11', '--enable-optimized', '--enable-assertions'],
 env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'})},
-{'name': "lldb-x86_64-ubuntu-14.04-cmake",
- 'slavenames': ["lldb-build1-ubuntu-1404"],
- 'builddir': "buildWorkingDir",
- 'category' : 'lldb',
- 'factory': LLDBBuilder.getLLDBScriptCommandsFactory(
-downloadBinary=False,
-buildAndroid=False,
-runTest=True)},
 {'name': "lldb-x86_64-darwin-13.4",
  'slavenames': ["lldb-x86_64-darwin-13.4"],
  'builddir': "buildDir",
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D24079: Always rely on CFI unwind info for linux vdso

2016-08-31 Thread Pavel Labath via lldb-commits
labath created this revision.
labath added a reviewer: tberghammer.
labath added a subscriber: lldb-commits.
Herald added subscribers: danalbert, tberghammer.

The vdso is full of hand-written assembly which the instruction emulator has a 
hard time
understanding. Luckily, the kernel already provides us with correct unwind info 
for them. So
let's use it.

This fixes (at least) the 
AssertingInferiorTestCase.test_inferior_asserting_disassemble test on
android N i386.

https://reviews.llvm.org/D24079

Files:
  source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
  source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h

Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
===
--- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
+++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
@@ -172,6 +172,9 @@
 void
 ResolveExecutableModule(lldb::ModuleSP &module_sp);
 
+bool
+AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override;
+
 private:
 DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD);
 };
Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
===
--- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -7,8 +7,12 @@
 //
 
//===--===//
 
-// C Includes
-// C++ Includes
+// Main header include
+#include "DynamicLoaderPOSIXDYLD.h"
+
+// Project includes
+#include "AuxVector.h"
+
 // Other libraries and framework includes
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Log.h"
@@ -22,9 +26,10 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlanRunToAddress.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Symbol/Function.h"
 
-#include "AuxVector.h"
-#include "DynamicLoaderPOSIXDYLD.h"
+// C++ Includes
+// C Includes
 
 using namespace lldb;
 using namespace lldb_private;
@@ -691,3 +696,17 @@
 
 target.SetExecutableModule (module_sp, false);
 }
+
+bool
+DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext 
&sym_ctx)
+{
+ModuleSP module_sp;
+if (sym_ctx.symbol)
+module_sp = sym_ctx.symbol->GetAddressRef().GetModule();
+if (!module_sp && sym_ctx.function)
+module_sp = 
sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule();
+if (!module_sp)
+return false;
+
+return module_sp->GetFileSpec().GetPath() == "[vdso]";
+}


Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
===
--- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
+++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
@@ -172,6 +172,9 @@
 void
 ResolveExecutableModule(lldb::ModuleSP &module_sp);
 
+bool
+AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override;
+
 private:
 DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD);
 };
Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
===
--- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -7,8 +7,12 @@
 //
 //===--===//
 
-// C Includes
-// C++ Includes
+// Main header include
+#include "DynamicLoaderPOSIXDYLD.h"
+
+// Project includes
+#include "AuxVector.h"
+
 // Other libraries and framework includes
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Log.h"
@@ -22,9 +26,10 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlanRunToAddress.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Symbol/Function.h"
 
-#include "AuxVector.h"
-#include "DynamicLoaderPOSIXDYLD.h"
+// C++ Includes
+// C Includes
 
 using namespace lldb;
 using namespace lldb_private;
@@ -691,3 +696,17 @@
 
 target.SetExecutableModule (module_sp, false);
 }
+
+bool
+DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx)
+{
+ModuleSP module_sp;
+if (sym_ctx.symbol)
+module_sp = sym_ctx.symbol->GetAddressRef().GetModule();
+if (!module_sp && sym_ctx.function)
+module_sp = sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule();
+if (!module_sp)
+return false;
+
+return module_sp->GetFileSpec().GetPath() == "[vdso]";
+}
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r280253 - Add more unit tests for StringExtractor hex/endian functions.

2016-08-31 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Aug 31 10:50:50 2016
New Revision: 280253

URL: http://llvm.org/viewvc/llvm-project?rev=280253&view=rev
Log:
Add more unit tests for StringExtractor hex/endian functions.

There were a few corner cases that weren't tested for dealing with
extraction of an odd number of nibbles.  Add tests for those here.

Modified:
lldb/trunk/unittests/Utility/StringExtractorTest.cpp

Modified: lldb/trunk/unittests/Utility/StringExtractorTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/StringExtractorTest.cpp?rev=280253&r1=280252&r2=280253&view=diff
==
--- lldb/trunk/unittests/Utility/StringExtractorTest.cpp (original)
+++ lldb/trunk/unittests/Utility/StringExtractorTest.cpp Wed Aug 31 10:50:50 
2016
@@ -571,50 +571,164 @@ TEST_F(StringExtractorTest, GetNameColon
 
 TEST_F(StringExtractorTest, GetU32LittleEndian)
 {
-StringExtractor ex("ABCD");
-EXPECT_EQ(0xCDAB, ex.GetHexMaxU32(true, 0));
+StringExtractor ex("");
+EXPECT_EQ(0x0, ex.GetHexMaxU32(true, 0));
 
-ex.Reset("89ABCDEF");
-EXPECT_EQ(0xEFCDAB89, ex.GetHexMaxU32(true, 0));
+ex.Reset("0");
+EXPECT_EQ(0x0, ex.GetHexMaxU32(true, 1));
 
-ex.Reset("123456789ABCDEF");
+ex.Reset("1");
+EXPECT_EQ(0x1, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("01");
+EXPECT_EQ(0x1, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("001");
+EXPECT_EQ(0x100, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("12");
+EXPECT_EQ(0x12, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("123");
+EXPECT_EQ(0x312, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("1203");
+EXPECT_EQ(0x312, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("1234");
+EXPECT_EQ(0x3412, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("12340");
+EXPECT_EQ(0x3412, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("123400");
+EXPECT_EQ(0x3412, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("12345670");
+EXPECT_EQ(0x70563412, ex.GetHexMaxU32(true, 0));
+
+ex.Reset("123456701");
 EXPECT_EQ(0, ex.GetHexMaxU32(true, 0));
 }
 
 TEST_F(StringExtractorTest, GetU32BigEndian)
 {
-StringExtractor ex("ABCD");
-EXPECT_EQ(0xABCD, ex.GetHexMaxU32(false, 0));
+StringExtractor ex("");
+EXPECT_EQ(0x0, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("0");
+EXPECT_EQ(0x0, ex.GetHexMaxU32(false, 1));
+
+ex.Reset("1");
+EXPECT_EQ(0x1, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("01");
+EXPECT_EQ(0x1, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("001");
+EXPECT_EQ(0x1, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("12");
+EXPECT_EQ(0x12, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("123");
+EXPECT_EQ(0x123, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("1203");
+EXPECT_EQ(0x1203, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("1234");
+EXPECT_EQ(0x1234, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("12340");
+EXPECT_EQ(0x12340, ex.GetHexMaxU32(false, 0));
 
-ex.Reset("89ABCDEF");
-EXPECT_EQ(0x89ABCDEF, ex.GetHexMaxU32(false, 0));
+ex.Reset("123400");
+EXPECT_EQ(0x123400, ex.GetHexMaxU32(false, 0));
 
-ex.Reset("123456789ABCDEF");
+ex.Reset("12345670");
+EXPECT_EQ(0x12345670, ex.GetHexMaxU32(false, 0));
+
+ex.Reset("123456700");
 EXPECT_EQ(0, ex.GetHexMaxU32(false, 0));
 }
 
 TEST_F(StringExtractorTest, GetU64LittleEndian)
 {
-StringExtractor ex("ABCD");
-EXPECT_EQ(0xCDAB, ex.GetHexMaxU64(true, 0));
+StringExtractor ex("");
+EXPECT_EQ(0x0, ex.GetHexMaxU64(true, 0));
+
+ex.Reset("0");
+EXPECT_EQ(0x0, ex.GetHexMaxU64(true, 1));
+
+ex.Reset("1");
+EXPECT_EQ(0x1, ex.GetHexMaxU64(true, 0));
+
+ex.Reset("01");
+EXPECT_EQ(0x1, ex.GetHexMaxU64(true, 0));
+
+ex.Reset("001");
+EXPECT_EQ(0x100, ex.GetHexMaxU64(true, 0));
+
+ex.Reset("12");
+EXPECT_EQ(0x12, ex.GetHexMaxU64(true, 0));
+
+ex.Reset("123");
+EXPECT_EQ(0x312, ex.GetHexMaxU64(true, 0));
+
+ex.Reset("1203");
+EXPECT_EQ(0x312, ex.GetHexMaxU64(true, 0));
+
+ex.Reset("1234");
+EXPECT_EQ(0x3412, ex.GetHexMaxU64(true, 0));
+
+ex.Reset("12340");
+EXPECT_EQ(0x3412, ex.GetHexMaxU64(true, 0));
 
-ex.Reset("89ABCDEF");
-EXPECT_EQ(0xEFCDAB89, ex.GetHexMaxU64(true, 0));
+ex.Reset("123400");
+EXPECT_EQ(0x3412, ex.GetHexMaxU64(true, 0));
 
 ex.Reset("123456789ABCDEF0");
 EXPECT_EQ(0xF0DEBC9A78563412ULL, ex.GetHexMaxU64(true, 0));
 
-ex.Reset("123456789ABCDEF000");
+ex.Reset("123456789ABCDEF01");
 EXPECT_EQ(0, ex.GetHexMaxU64(true, 0));
 }
 
 TEST_F(StringExtractorTest, GetU64BigEndian)
 {
-StringExtractor ex("ABCD");
-EXPECT_EQ(0xABCDULL, ex.GetHexMaxU64(false, 0));
+StringExtractor ex("");
+EXPECT_EQ(0x0, ex.GetHexMaxU64(false, 0));
+
+ex.Reset("0");
+EXPECT_EQ(0x0, ex.GetHexMaxU64(false, 1));
+
+ex.Reset("1");
+EXPECT_EQ(0x1, ex.GetHexMaxU64(false, 0));
+
+ex.Reset("01");
+EXPECT_EQ(0x1, ex.GetHexMaxU64

Re: [Lldb-commits] [PATCH] D24074: Fixup TestPyObjSynthProvider.py and enable it again

2016-08-31 Thread Enrico Granata via lldb-commits
granata.enrico accepted this revision.
This revision is now accepted and ready to land.


Comment at: 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py:19
@@ -18,2 +18,3 @@
 mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
 

I assume this only implies not to build for *all* debug info formats, but still 
allows an a.out to be built?

If so, fine by me


Comment at: 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py:3
@@ -2,2 +2,3 @@
 import lldb.formatters
+import lldb.formatters.synth
 

That didn't seem to be necessary on macOS. Not sure what the difference is, but 
anyway, doesn't look wrong.


https://reviews.llvm.org/D24074



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


Re: [Lldb-commits] [PATCH] D24079: Always rely on CFI unwind info for linux vdso

2016-08-31 Thread Tamas Berghammer via lldb-commits
tberghammer accepted this revision.
tberghammer added a comment.
This revision is now accepted and ready to land.

Looks good



Comment at: 
source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:13-14
@@ +12,4 @@
+
+// Project includes
+#include "AuxVector.h"
+

Why do we need this?


https://reviews.llvm.org/D24079



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


Re: [Lldb-commits] [PATCH] D24078: [zorg] Move lldb-x86_64-ubuntu-14.04-cmake buildbot to the stable category

2016-08-31 Thread Galina via lldb-commits
gkistanova accepted this revision.
gkistanova added a comment.
This revision is now accepted and ready to land.

LGTM.

Thanks

Galina


https://reviews.llvm.org/D24078



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


[Lldb-commits] [LLDB] Please commit accepted changes.

2016-08-31 Thread Taras Tsugrii via lldb-commits
Can someone please commit https://reviews.llvm.org/D23950, 
https://reviews.llvm.org/D23951, https://reviews.llvm.org/D23952, 
https://reviews.llvm.org/D23948 and https://reviews.llvm.org/D24064 to lldb 
repo? All differentials are approved.

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


Re: [Lldb-commits] [LLDB] Please commit accepted changes.

2016-08-31 Thread Zachary Turner via lldb-commits
I will commit these today.

On Wed, Aug 31, 2016 at 10:41 AM Taras Tsugrii via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Can someone please commit https://reviews.llvm.org/D23950,
> https://reviews.llvm.org/D23951, https://reviews.llvm.org/D23952,
> https://reviews.llvm.org/D23948 and https://reviews.llvm.org/D24064 to
> lldb repo? All differentials are approved.
>
>
>
> Thank you,
>
> Taras
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r280261 - Fixup TestPyObjSynthProvider.py and enable it again

2016-08-31 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Aug 31 12:38:17 2016
New Revision: 280261

URL: http://llvm.org/viewvc/llvm-project?rev=280261&view=rev
Log:
Fixup TestPyObjSynthProvider.py and enable it again

Summary:
- copies the new file in the cmake build
- adds an additional import statement
- marks the test as no-debug-info specific, as it seems to be testing a python 
feature

Reviewers: granata.enrico

Subscribers: lldb-commits

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

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
lldb/trunk/scripts/Python/finishSwigPythonLLDB.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py?rev=280261&r1=280260&r2=280261&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
 Wed Aug 31 12:38:17 2016
@@ -16,8 +16,8 @@ from lldbsuite.test import lldbutil
 class PyObjectSynthProviderTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
 
-@expectedFailureAll(oslist=["linux"])
 def test_print_array(self):
 """Test that expr -Z works"""
 self.build()

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py?rev=280261&r1=280260&r2=280261&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
 Wed Aug 31 12:38:17 2016
@@ -1,5 +1,6 @@
 import lldb
 import lldb.formatters
+import lldb.formatters.synth
 
 class 
SyntheticChildrenProvider(lldb.formatters.synth.PythonObjectSyntheticChildProvider):
 def __init__(self, value, internal_dict):

Modified: lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/finishSwigPythonLLDB.py?rev=280261&r1=280260&r2=280261&view=diff
==
--- lldb/trunk/scripts/Python/finishSwigPythonLLDB.py (original)
+++ lldb/trunk/scripts/Python/finishSwigPythonLLDB.py Wed Aug 31 12:38:17 2016
@@ -793,6 +793,7 @@ def main(vDictArgs):
 # Having these files copied here ensure that lldb/formatters is a
 # valid package itself
 listPkgFiles = [os.path.join(strRoot, "examples", "summaries", 
"cocoa", "cache.py"),
+os.path.join(strRoot, "examples", "summaries", 
"synth.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "metrics.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "attrib_fromdict.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "Logger.py")]


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


Re: [Lldb-commits] [LLDB] Please commit accepted changes.

2016-08-31 Thread Taras Tsugrii via lldb-commits
Awesome, thank you Zachary!

From: Zachary Turner 
Date: Wednesday, August 31, 2016 at 10:43 AM
To: Taras Tsugrii , via lldb-commits 

Subject: Re: [Lldb-commits] [LLDB] Please commit accepted changes.

I will commit these today.

On Wed, Aug 31, 2016 at 10:41 AM Taras Tsugrii via lldb-commits 
mailto:lldb-commits@lists.llvm.org>> wrote:
Can someone please commit 
https://reviews.llvm.org/D23950,
 
https://reviews.llvm.org/D23951,
 
https://reviews.llvm.org/D23952,
 
https://reviews.llvm.org/D23948
 and 
https://reviews.llvm.org/D24064
 to lldb repo? All differentials are approved.

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


Re: [Lldb-commits] [PATCH] D24074: Fixup TestPyObjSynthProvider.py and enable it again

2016-08-31 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL280261: Fixup TestPyObjSynthProvider.py and enable it again 
(authored by labath).

Changed prior to commit:
  https://reviews.llvm.org/D24074?vs=69836&id=69881#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24074

Files:
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
  lldb/trunk/scripts/Python/finishSwigPythonLLDB.py

Index: lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
===
--- lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
+++ lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
@@ -793,6 +793,7 @@
 # Having these files copied here ensure that lldb/formatters is a
 # valid package itself
 listPkgFiles = [os.path.join(strRoot, "examples", "summaries", 
"cocoa", "cache.py"),
+os.path.join(strRoot, "examples", "summaries", 
"synth.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "metrics.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "attrib_fromdict.py"),
 os.path.join(strRoot, "examples", "summaries", 
"cocoa", "Logger.py")]
Index: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
@@ -1,5 +1,6 @@
 import lldb
 import lldb.formatters
+import lldb.formatters.synth
 
 class 
SyntheticChildrenProvider(lldb.formatters.synth.PythonObjectSyntheticChildProvider):
 def __init__(self, value, internal_dict):
Index: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
@@ -16,8 +16,8 @@
 class PyObjectSynthProviderTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
 
-@expectedFailureAll(oslist=["linux"])
 def test_print_array(self):
 """Test that expr -Z works"""
 self.build()


Index: lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
===
--- lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
+++ lldb/trunk/scripts/Python/finishSwigPythonLLDB.py
@@ -793,6 +793,7 @@
 # Having these files copied here ensure that lldb/formatters is a
 # valid package itself
 listPkgFiles = [os.path.join(strRoot, "examples", "summaries", "cocoa", "cache.py"),
+os.path.join(strRoot, "examples", "summaries", "synth.py"),
 os.path.join(strRoot, "examples", "summaries", "cocoa", "metrics.py"),
 os.path.join(strRoot, "examples", "summaries", "cocoa", "attrib_fromdict.py"),
 os.path.join(strRoot, "examples", "summaries", "cocoa", "Logger.py")]
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
@@ -1,5 +1,6 @@
 import lldb
 import lldb.formatters
+import lldb.formatters.synth
 
 class SyntheticChildrenProvider(lldb.formatters.synth.PythonObjectSyntheticChildProvider):
 def __init__(self, value, internal_dict):
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
@@ -16,8 +16,8 @@
 class PyObjectSynthProviderTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
 
-@expectedFailureAll(oslist=["linux"])
 def test_print_array(self):
 """Test that expr -Z works"""
 self.build()
__

Re: [Lldb-commits] [PATCH] D24074: Fixup TestPyObjSynthProvider.py and enable it again

2016-08-31 Thread Pavel Labath via lldb-commits
labath added inline comments.


Comment at: 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py:19
@@ -18,2 +18,3 @@
 mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
 

granata.enrico wrote:
> I assume this only implies not to build for *all* debug info formats, but 
> still allows an a.out to be built?
> 
> If so, fine by me
Acknowledged.


Comment at: 
packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py:3
@@ -2,2 +2,3 @@
 import lldb.formatters
+import lldb.formatters.synth
 

granata.enrico wrote:
> That didn't seem to be necessary on macOS. Not sure what the difference is, 
> but anyway, doesn't look wrong.
Yes.. very odd, but it did not work without it for me.


Repository:
  rL LLVM

https://reviews.llvm.org/D24074



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


[Lldb-commits] [lldb] r280264 - Always rely on CFI unwind info for linux vdso

2016-08-31 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Aug 31 12:43:49 2016
New Revision: 280264

URL: http://llvm.org/viewvc/llvm-project?rev=280264&view=rev
Log:
Always rely on CFI unwind info for linux vdso

Summary:
The vdso is full of hand-written assembly which the instruction emulator has a 
hard time
understanding. Luckily, the kernel already provides us with correct unwind info 
for them. So
let's use it.

This fixes (at least) the 
AssertingInferiorTestCase.test_inferior_asserting_disassemble test on
android N i386.

Reviewers: tberghammer

Subscribers: tberghammer, danalbert, lldb-commits

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

Modified:

lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=280264&r1=280263&r2=280264&view=diff
==
--- 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp 
Wed Aug 31 12:43:49 2016
@@ -7,8 +7,12 @@
 //
 
//===--===//
 
-// C Includes
-// C++ Includes
+// Main header include
+#include "DynamicLoaderPOSIXDYLD.h"
+
+// Project includes
+#include "AuxVector.h"
+
 // Other libraries and framework includes
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Log.h"
@@ -22,9 +26,10 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlanRunToAddress.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Symbol/Function.h"
 
-#include "AuxVector.h"
-#include "DynamicLoaderPOSIXDYLD.h"
+// C++ Includes
+// C Includes
 
 using namespace lldb;
 using namespace lldb_private;
@@ -691,3 +696,17 @@ DynamicLoaderPOSIXDYLD::ResolveExecutabl
 
 target.SetExecutableModule (module_sp, false);
 }
+
+bool
+DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext 
&sym_ctx)
+{
+ModuleSP module_sp;
+if (sym_ctx.symbol)
+module_sp = sym_ctx.symbol->GetAddressRef().GetModule();
+if (!module_sp && sym_ctx.function)
+module_sp = 
sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule();
+if (!module_sp)
+return false;
+
+return module_sp->GetFileSpec().GetPath() == "[vdso]";
+}

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h?rev=280264&r1=280263&r2=280264&view=diff
==
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h 
(original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h 
Wed Aug 31 12:43:49 2016
@@ -172,6 +172,9 @@ protected:
 void
 ResolveExecutableModule(lldb::ModuleSP &module_sp);
 
+bool
+AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override;
+
 private:
 DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD);
 };


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


Re: [Lldb-commits] [PATCH] D24079: Always rely on CFI unwind info for linux vdso

2016-08-31 Thread Pavel Labath via lldb-commits
labath added inline comments.


Comment at: 
source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:13-14
@@ +12,4 @@
+
+// Project includes
+#include "AuxVector.h"
+

tberghammer wrote:
> Why do we need this?
I'm not adding anything. I just took the opportunity to reorganize the headers 
into the new format while I was touching it. (The only new include is 
lldb/Symbol/Function.h).


https://reviews.llvm.org/D24079



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


Re: [Lldb-commits] [PATCH] D24079: Always rely on CFI unwind info for linux vdso

2016-08-31 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL280264: Always rely on CFI unwind info for linux vdso 
(authored by labath).

Changed prior to commit:
  https://reviews.llvm.org/D24079?vs=69857&id=69883#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24079

Files:
  lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
  lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h

Index: 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
===
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
@@ -172,6 +172,9 @@
 void
 ResolveExecutableModule(lldb::ModuleSP &module_sp);
 
+bool
+AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override;
+
 private:
 DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD);
 };
Index: 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
===
--- 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -7,8 +7,12 @@
 //
 
//===--===//
 
-// C Includes
-// C++ Includes
+// Main header include
+#include "DynamicLoaderPOSIXDYLD.h"
+
+// Project includes
+#include "AuxVector.h"
+
 // Other libraries and framework includes
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Log.h"
@@ -22,9 +26,10 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlanRunToAddress.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Symbol/Function.h"
 
-#include "AuxVector.h"
-#include "DynamicLoaderPOSIXDYLD.h"
+// C++ Includes
+// C Includes
 
 using namespace lldb;
 using namespace lldb_private;
@@ -691,3 +696,17 @@
 
 target.SetExecutableModule (module_sp, false);
 }
+
+bool
+DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext 
&sym_ctx)
+{
+ModuleSP module_sp;
+if (sym_ctx.symbol)
+module_sp = sym_ctx.symbol->GetAddressRef().GetModule();
+if (!module_sp && sym_ctx.function)
+module_sp = 
sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule();
+if (!module_sp)
+return false;
+
+return module_sp->GetFileSpec().GetPath() == "[vdso]";
+}


Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
===
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
@@ -172,6 +172,9 @@
 void
 ResolveExecutableModule(lldb::ModuleSP &module_sp);
 
+bool
+AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override;
+
 private:
 DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD);
 };
Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
===
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -7,8 +7,12 @@
 //
 //===--===//
 
-// C Includes
-// C++ Includes
+// Main header include
+#include "DynamicLoaderPOSIXDYLD.h"
+
+// Project includes
+#include "AuxVector.h"
+
 // Other libraries and framework includes
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Log.h"
@@ -22,9 +26,10 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlanRunToAddress.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Symbol/Function.h"
 
-#include "AuxVector.h"
-#include "DynamicLoaderPOSIXDYLD.h"
+// C++ Includes
+// C Includes
 
 using namespace lldb;
 using namespace lldb_private;
@@ -691,3 +696,17 @@
 
 target.SetExecutableModule (module_sp, false);
 }
+
+bool
+DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx)
+{
+ModuleSP module_sp;
+if (sym_ctx.symbol)
+module_sp = sym_ctx.symbol->GetAddressRef().GetModule();
+if (!module_sp && sym_ctx.function)
+module_sp = sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule();
+if (!module_sp)
+return false;
+
+return module_sp->GetFileSpec().GetPath() == "[vdso]";
+}
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r280283 - Remove unused variables.

2016-08-31 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Aug 31 15:03:14 2016
New Revision: 280283

URL: http://llvm.org/viewvc/llvm-project?rev=280283&view=rev
Log:
Remove unused variables.

Patch by Taras Tsugrii

Modified:
lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/ThreadPlanStepOut.cpp

Modified: lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp?rev=280283&r1=280282&r2=280283&view=diff
==
--- lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp Wed Aug 31 15:03:14 
2016
@@ -394,7 +394,6 @@ TypeCategoryMap::ForEach(ForEachCallback
 {
 if (pos->second->IsEnabled())
 continue;
-KeyType type = pos->first;
 if (!callback(pos->second))
 break;
 }

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=280283&r1=280282&r2=280283&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 Wed Aug 31 15:03:14 2016
@@ -1751,7 +1751,6 @@ AppleObjCRuntimeV2::UpdateISAToDescripto
 
 
 bool success = false;
-bool any_found = false;
 
 diagnostics.Clear();
 
@@ -1812,7 +1811,7 @@ AppleObjCRuntimeV2::UpdateISAToDescripto
 process->GetByteOrder(),
 addr_size);
 
-any_found = (ParseClassInfoArray (class_infos_data, 
num_class_infos) > 0);
+ParseClassInfoArray (class_infos_data, num_class_infos);
 }
 }
 else

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=280283&r1=280282&r2=280283&view=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Wed Aug 31 15:03:14 2016
@@ -6602,7 +6602,6 @@ Process::GetMemoryRegions (std::vectorGetRange().GetRangeBase();
 range_end = region_info->GetRange().GetRangeEnd();
 if( region_info->GetMapped() == MemoryRegionInfo::eYes )
 {

Modified: lldb/trunk/source/Target/ThreadPlanStepOut.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepOut.cpp?rev=280283&r1=280282&r2=280283&view=diff
==
--- lldb/trunk/source/Target/ThreadPlanStepOut.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepOut.cpp Wed Aug 31 15:03:14 2016
@@ -71,8 +71,6 @@ ThreadPlanStepOut::ThreadPlanStepOut
 
 m_step_out_to_id = return_frame_sp->GetStackID();
 m_immediate_step_from_id = immediate_return_from_sp->GetStackID();
-
-StackID frame_zero_id = m_thread.GetStackFrameAtIndex(0)->GetStackID();
 
 // If the frame directly below the one we are returning to is inlined, we 
have to be
 // a little more careful.  It is non-trivial to determine the real "return 
code address" for


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


Re: [Lldb-commits] [LLDB] Please commit accepted changes.

2016-08-31 Thread Zachary Turner via lldb-commits
These should be in.  I committed all the unused variable fixes in one
patch, and someone had already beaten me to the other one.  Feel free to
request commit access (see llvm.org website for how to do this)

On Wed, Aug 31, 2016 at 10:46 AM Taras Tsugrii  wrote:

> Awesome, thank you Zachary!
>
>
>
> *From: *Zachary Turner 
> *Date: *Wednesday, August 31, 2016 at 10:43 AM
> *To: *Taras Tsugrii , via lldb-commits <
> lldb-commits@lists.llvm.org>
> *Subject: *Re: [Lldb-commits] [LLDB] Please commit accepted changes.
>
>
>
> I will commit these today.
>
>
>
> On Wed, Aug 31, 2016 at 10:41 AM Taras Tsugrii via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
> Can someone please commit https://reviews.llvm.org/D23950
> ,
> https://reviews.llvm.org/D23951
> ,
> https://reviews.llvm.org/D23952
> ,
> https://reviews.llvm.org/D23948
> 
> and https://reviews.llvm.org/D24064
> 
> to lldb repo? All differentials are approved.
>
>
>
> Thank you,
>
> Taras
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> 
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [LLDB] Please commit accepted changes.

2016-08-31 Thread Taras Tsugrii via lldb-commits
Cool, thank you Zachary!

From: Zachary Turner 
Date: Wednesday, August 31, 2016 at 1:11 PM
To: Taras Tsugrii , via lldb-commits 

Subject: Re: [Lldb-commits] [LLDB] Please commit accepted changes.

These should be in.  I committed all the unused variable fixes in one patch, 
and someone had already beaten me to the other one.  Feel free to request 
commit access (see 
llvm.org
 website for how to do this)

On Wed, Aug 31, 2016 at 10:46 AM Taras Tsugrii 
mailto:ttsug...@fb.com>> wrote:
Awesome, thank you Zachary!

From: Zachary Turner mailto:ztur...@google.com>>
Date: Wednesday, August 31, 2016 at 10:43 AM
To: Taras Tsugrii mailto:ttsug...@fb.com>>, via lldb-commits 
mailto:lldb-commits@lists.llvm.org>>
Subject: Re: [Lldb-commits] [LLDB] Please commit accepted changes.

I will commit these today.

On Wed, Aug 31, 2016 at 10:41 AM Taras Tsugrii via lldb-commits 
mailto:lldb-commits@lists.llvm.org>> wrote:
Can someone please commit 
https://reviews.llvm.org/D23950,
 
https://reviews.llvm.org/D23951,
 
https://reviews.llvm.org/D23952,
 
https://reviews.llvm.org/D23948
 and 
https://reviews.llvm.org/D24064
 to lldb repo? All differentials are approved.

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


[Lldb-commits] [lldb] r280294 - Fix an issue where a synthetic child provider could only provide a value of the same size as the containing type

2016-08-31 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Aug 31 16:46:21 2016
New Revision: 280294

URL: http://llvm.org/viewvc/llvm-project?rev=280294&view=rev
Log:
Fix an issue where a synthetic child provider could only provide a value of the 
same size as the containing type


Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/main.cpp
lldb/trunk/source/DataFormatters/TypeFormat.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py?rev=280294&r1=280293&r2=280294&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
 Wed Aug 31 16:46:21 2016
@@ -55,32 +55,40 @@ class DataFormatterSynthValueTestCase(Te
 y.SetPreferSyntheticValue(True)
 z = self.frame().FindVariable("z")
 z.SetPreferSyntheticValue(True)
+q = self.frame().FindVariable("q")
+z.SetPreferSyntheticValue(True)
 
 x_val = x.GetValueAsUnsigned
 y_val = y.GetValueAsUnsigned
 z_val = z.GetValueAsUnsigned
+q_val = q.GetValueAsUnsigned
 
 if self.TraceOn():
-print("x_val = %s; y_val = %s; z_val = %s" % 
(x_val(),y_val(),z_val()))
+print("x_val = %s; y_val = %s; z_val = %s; q_val = %s" % 
(x_val(),y_val(),z_val(),q_val()))
 
 self.assertFalse(x_val() == 3, "x == 3 before synthetics")
 self.assertFalse(y_val() == 4, "y == 4 before synthetics")
 self.assertFalse(z_val() == 7, "z == 7 before synthetics")
+self.assertFalse(q_val() == 8, "q == 8 before synthetics")
 
 # now set up the synth
 self.runCmd("script from myIntSynthProvider import *")
 self.runCmd("type synth add -l myIntSynthProvider myInt")
 self.runCmd("type synth add -l myArraySynthProvider myArray")
+self.runCmd("type synth add -l myIntSynthProvider myIntAndStuff")
 
 if self.TraceOn():
-print("x_val = %s; y_val = %s; z_val = %s" % 
(x_val(),y_val(),z_val()))
+print("x_val = %s; y_val = %s; z_val = %s; q_val = %s" % 
(x_val(),y_val(),z_val(),q_val()))
 
 self.assertTrue(x_val() == 3, "x != 3 after synthetics")
 self.assertTrue(y_val() == 4, "y != 4 after synthetics")
 self.assertTrue(z_val() == 7, "z != 7 after synthetics")
+self.assertTrue(q_val() == 8, "q != 8 after synthetics")
 
 self.expect("frame variable x", substrs=['3'])
 self.expect("frame variable x", substrs=['theValue = 3'], 
matching=False)
+self.expect("frame variable q", substrs=['8'])
+self.expect("frame variable q", substrs=['theValue = 8'], 
matching=False)
 
 # check that an aptly defined synthetic provider does not affect 
one-lining
 self.expect("expression struct S { myInt theInt{12}; }; S()", substrs 
= ['(theInt = 12)'])

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/main.cpp?rev=280294&r1=280293&r2=280294&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/main.cpp
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/main.cpp
 Wed Aug 31 16:46:21 2016
@@ -5,6 +5,16 @@ class myInt {
 int val() { return theValue; }
 };
 
+class myIntAndStuff {
+private:
+  int theValue;
+  double theExtraFluff;
+public:
+  myIntAndStuff() : theValue(0), theExtraFluff(1.25) {}
+  myIntAndStuff(int _x) : theValue(_x), theExtraFluff(1.25) {}
+  int val() { return theValue; }
+};
+
 class myArray {
 public:
 int array[16];
@@ -17,11 +27,13 @@ class hasAnInt {
 };
 
 myInt operator + (myInt x, myInt y) { return myInt(x.val() + y.val()); }
+myInt operator + (myInt x, myIntAndStuff y) { return myInt(x.val() + y.val()); 
}
 
 int main() {
 myInt x{3};
 myInt y{4};
 myInt z {x+y};
+myIntAndStuff q {z.val()+1};
 hasAnInt hi;
 myArray ma;
 

Modified: lldb/trunk/source/DataFormatters/TypeFormat.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/Ty

[Lldb-commits] [lldb] r280295 - Add a data formatter for std::function in libcxx

2016-08-31 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Aug 31 16:46:37 2016
New Revision: 280295

URL: http://llvm.org/viewvc/llvm-project?rev=280295&view=rev
Log:
Add a data formatter for std::function in libcxx


Added:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
Modified:
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.h

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile?rev=280295&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
 Wed Aug 31 16:46:37 2016
@@ -0,0 +1,5 @@
+LEVEL = ../../../../../make
+CXX_SOURCES := main.cpp
+CXXFLAGS += -std=c++11
+USE_LIBCPP := 1
+include $(LEVEL)/Makefile.rules

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py?rev=280295&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
 Wed Aug 31 16:46:37 2016
@@ -0,0 +1,50 @@
+"""
+Test lldb data formatter subsystem.
+"""
+
+from __future__ import print_function
+
+
+
+import os, time
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class LibCxxFunctionTestCase(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+def get_variable(self, name):
+var = self.frame().FindVariable(name)
+var.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
+var.SetPreferSyntheticValue(True)
+return var
+
+@skipIf(compiler="gcc")
+@skipIfWindows # libc++ not ported to Windows yet
+def test(self):
+"""Test that std::function as defined by libc++ is correctly printed 
by LLDB"""
+self.build()
+self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+
+bkpt = 
self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, 
"Set break point at this line."))
+
+self.runCmd("run", RUN_SUCCEEDED)
+
+lldbutil.skip_if_library_missing(self, self.target(), 
lldbutil.PrintableRegex("libc\+\+"))
+
+# The stop reason of the thread should be breakpoint.
+self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+substrs = ['stopped',
+   'stop reason = breakpoint'])
+
+f1 = self.get_variable('f1')
+f2 = self.get_variable('f2')
+
+if self.TraceOn(): print(f1)
+if self.TraceOn(): print(f2)
+
+self.assertTrue(f1.GetValueAsUnsigned(0) != 0, 'f1 has a valid value')
+self.assertTrue(f2.GetValueAsUnsigned(0) != 0, 'f2 has a valid value')

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp?rev=280295&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
 Wed Aug 31 16:46:37 2016
@@ -0,0 +1,25 @@
+//===-- main.cpp --*- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// Licens

[Lldb-commits] [lldb] r280328 - There exists at least one compiler on one platform that doesn't know how to assert on a std::shared_ptr<>

2016-08-31 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Wed Aug 31 19:32:53 2016
New Revision: 280328

URL: http://llvm.org/viewvc/llvm-project?rev=280328&view=rev
Log:
There exists at least one compiler on one platform that doesn't know how to 
assert on a std::shared_ptr<>

Appease it by being very very very explicit about what I mean


Modified:
lldb/trunk/source/Commands/CommandObjectMemory.cpp

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=280328&r1=280327&r2=280328&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Wed Aug 31 19:32:53 2016
@@ -1097,7 +1097,7 @@ protected:
   m_base_addr(base),
   m_is_valid(true)
   {
-  lldbassert(process_sp);
+  lldbassert(process_sp.get() != nullptr);
   }
   
   bool


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