[Lldb-commits] [lldb] r299527 - Fix a typo introduce in r299200.

2017-04-05 Thread Nitesh Jain via lldb-commits
Author: nitesh.jain
Date: Wed Apr  5 04:31:43 2017
New Revision: 299527

URL: http://llvm.org/viewvc/llvm-project?rev=299527&view=rev
Log:
Fix a typo introduce in r299200.

Modified:

lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h

Modified: 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h?rev=299527&r1=299526&r2=299527&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h
 (original)
+++ 
lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.h
 Wed Apr  5 04:31:43 2017
@@ -11,7 +11,7 @@
 #define liblldb_RegisterContextPOSIXProcessMonitor_mips64_H_
 
 #include "Plugins/Process/Utility/RegisterContextPOSIX_mips64.h"
-#include "Plugin/Process/Utility/lldb-mips-freebsd-register-enums.h"
+#include "Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h"
 #include "RegisterContextPOSIX.h"
 
 class RegisterContextPOSIXProcessMonitor_mips64


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


Re: [Lldb-commits] [PATCH] D31451: New C++ function name parsing logic

2017-04-05 Thread Jim Ingham via lldb-commits
No problem.  You can't test on all platforms, so changes like this are bound to 
sometimes introduce regressions.  If you can remember to watch the bots for 
systems you don't run or test on that makes the turnaround smoother.  
Otherwise, if it's a MacOS problem the QE folks here are sure to tell me about 
it...

Jim


> On Apr 4, 2017, at 10:03 PM, Eugene Zemtsov  wrote:
> 
> Sorry about that and thanks for rolling it back. I'll take a look tomorrow. 
> 
> On Tue, Apr 4, 2017 at 5:22 PM, Jim Ingham  wrote:
> This patch is causing a testsuite failure in ObjC breakpoint setting:
> 
> functionalities/breakpoint/objc/TestObjCBreakpoints.py
> 
> You must be grabbing ObjC names and somehow treating them as C++ names.
> 
> I reverted the patch till the test gets fixed.  If you can't get your hands on
> an ObjC binary to test I can send you one.  You don't need to run code, you 
> just
> need to load a binary, which you should be able to do on any lldb host.
> 
> Jim
> 
> 
> > On Apr 3, 2017, at 12:12 PM, Eugene Zemtsov via Phabricator 
> >  wrote:
> >
> > This revision was automatically updated to reflect the committed changes.
> > Closed by commit rL299374: New C++ function name parsing logic (authored by 
> > eugene).
> >
> > Changed prior to commit:
> >  https://reviews.llvm.org/D31451?vs=93694&id=93910#toc
> >
> > Repository:
> >  rL LLVM
> >
> > https://reviews.llvm.org/D31451
> >
> > Files:
> >  lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt
> >  lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
> >  lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
> >  lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
> >  lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h
> >  lldb/trunk/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
> >
> > 
> 
> 
> 
> 
> -- 
> Thanks,
> Eugene Zemtsov.

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


[Lldb-commits] [lldb] r299587 - The darwin_log tests are very fragile and currently do not properly assess the state of that functionality.

2017-04-05 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Wed Apr  5 15:33:39 2017
New Revision: 299587

URL: http://llvm.org/viewvc/llvm-project?rev=299587&view=rev
Log:
The darwin_log tests are very fragile and currently do not properly assess the 
state of that functionality.
I have put them all in their own category, and made that category disabled by 
default.

Differential revision: https://reviews.llvm.org/D31718

Added:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/.categories
Modified:
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/test_categories.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=299587&r1=299586&r2=299587&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Wed Apr  5 
15:33:39 2017
@@ -66,7 +66,7 @@ categoriesList = None
 # set to true if we are going to use categories for cherry-picking test cases
 useCategories = False
 # Categories we want to skip
-skipCategories = []
+skipCategories = ["darwin-log"]
 # use this to track per-category failures
 failuresPerCategory = {}
 

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/.categories
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/.categories?rev=299587&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/.categories
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/.categories
 Wed Apr  5 15:33:39 2017
@@ -0,0 +1 @@
+darwin-log

Modified: lldb/trunk/packages/Python/lldbsuite/test/test_categories.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/test_categories.py?rev=299587&r1=299586&r2=299587&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/test_categories.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/test_categories.py Wed Apr  5 
15:33:39 2017
@@ -33,7 +33,8 @@ all_categories = {
 'dyntype': 'Tests related to dynamic type support',
 'stresstest': 'Tests related to stressing lldb limits',
 'flakey': 'Flakey test cases, i.e. tests that do not reliably pass at each 
execution',
-'lldb-mi': 'lldb-mi tests'}
+'lldb-mi': 'lldb-mi tests',
+'darwin-log': 'Darwin log tests'}
 
 
 def unique_string_match(yourentry, list):


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


[Lldb-commits] [lldb] r299588 - Annotate some more libc++ tests with the new category

2017-04-05 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Apr  5 15:34:26 2017
New Revision: 299588

URL: http://llvm.org/viewvc/llvm-project?rev=299588&view=rev
Log:
Annotate some more libc++ tests with the new category

This makes sure we are able to run them properly on android.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py?rev=299588&r1=299587&r2=299588&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
 Wed Apr  5 15:34:26 2017
@@ -17,10 +17,12 @@ class LibcxxUnorderedDataFormatterTestCa
 
 mydir = TestBase.compute_mydir(__file__)
 
-@skipIfWindows  # libc++ not ported to Windows yet
-@skipIf(compiler="gcc")
+def setUp(self):
+TestBase.setUp(self)
+ns = 'ndk' if lldbplatformutil.target_is_android() else ''
+self.namespace = 'std::__' + ns + '1'
+
 def test_with_run_command(self):
-"""Test that that file and class static variables display correctly."""
 self.build()
 self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
@@ -29,9 +31,6 @@ class LibcxxUnorderedDataFormatterTestCa
 
 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',
@@ -51,30 +50,30 @@ class LibcxxUnorderedDataFormatterTestCa
 # Execute the cleanup function during test case tear down.
 self.addTearDownHook(cleanup)
 
-self.expect('image list', substrs=self.getLibcPlusPlusLibs())
-
+ns = self.namespace
 self.look_for_content_and_continue(
-"map", ['size=5 {', 'hello', 'world', 'this', 'is', 'me'])
+"map", ['%s::unordered_map' %
+ns, 'size=5 {', 'hello', 'world', 'this', 'is', 'me'])
 
 self.look_for_content_and_continue(
-"mmap", ['size=6 {', 'first = 3', 'second = "this"',
- 'first = 2', 'second = "hello"'])
+"mmap", ['%s::unordered_multimap' % ns, 'size=6 {', 'first = 3', 
'second = "this"',
+ 'first = 2', 'second = "hello"'])
 
 self.look_for_content_and_continue(
-"iset", ['size=5 {', '\[\d\] = 5', '\[\d\] = 3', '\[\d\] = 2'])
+"iset", ['%s::unordered_set' %
+ ns, 'size=5 {', '\[\d\] = 5', '\[\d\] = 3', '\[\d\] = 2'])
 
 self.look_for_content_and_continue(
-"sset", ['size=5 {', '\[\d\] = "is"', '\[\d\] = "world"',
- '\[\d\] = "hello"'])
+"sset", ['%s::unordered_set' % ns, 'size=5 {', '\[\d\] = "is"', 
'\[\d\] = "world"',
+ '\[\d\] = "hello"'])
 
 self.look_for_content_and_continue(
-"imset", ['size=6 {', '(\[\d\] = 3(\\n|.)+){3}',
-  '\[\d\] = 2', '\[\d\] = 1'])
+"imset", ['%s::unordered_multiset' % ns, 'size=6 {', '(\[\d\] = 
3(\\n|.)+){3}',
+  '\[\d\] = 2', '\[\d\] = 1'])
 
 self.look_for_content_and_continue(
-"smset",
-['size=5 {', '(\[\d\] = "is"(\\n|.)+){2}',
- '(\[\d\] = "world"(\\n|.)+){2}'])
+"smset", ['%s::unordered_multiset' % ns, 'size=5 {', '(\[\d\] = 
"is"(\\n|.)+){2}',
+  '(\[\d\] = "world"(\\n|.)+){2}'])
 
 def look_for_content_and_continue(self, var_name, patterns):
 self.expect(("frame variable %s" % var_name), patterns=patterns)

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py?rev=299588&r1=299587&r2=299588&view=diff

[Lldb-commits] [lldb] r299608 - Change how UDP sockets are set up -- use the same one socket for

2017-04-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Apr  5 20:21:44 2017
New Revision: 299608

URL: http://llvm.org/viewvc/llvm-project?rev=299608&view=rev
Log:
Change how UDP sockets are set up -- use the same one socket for
both sending and receiving information, instead of using one socket
to send and another to receive.  The two socket arrangement fails over
when a firewall is between the two systems.
 

Modified:
lldb/trunk/include/lldb/Host/Socket.h
lldb/trunk/include/lldb/Host/common/UDPSocket.h
lldb/trunk/source/Host/common/Socket.cpp
lldb/trunk/source/Host/common/UDPSocket.cpp
lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp

Modified: lldb/trunk/include/lldb/Host/Socket.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Socket.h?rev=299608&r1=299607&r2=299608&view=diff
==
--- lldb/trunk/include/lldb/Host/Socket.h (original)
+++ lldb/trunk/include/lldb/Host/Socket.h Wed Apr  5 20:21:44 2017
@@ -71,8 +71,7 @@ public:
   static Error TcpConnect(llvm::StringRef host_and_port,
   bool child_processes_inherit, Socket *&socket);
   static Error UdpConnect(llvm::StringRef host_and_port,
-  bool child_processes_inherit, Socket *&send_socket,
-  Socket *&recv_socket);
+  bool child_processes_inherit, Socket *&socket);
   static Error UnixDomainConnect(llvm::StringRef host_and_port,
  bool child_processes_inherit, Socket 
*&socket);
   static Error UnixDomainAccept(llvm::StringRef host_and_port,

Modified: lldb/trunk/include/lldb/Host/common/UDPSocket.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/common/UDPSocket.h?rev=299608&r1=299607&r2=299608&view=diff
==
--- lldb/trunk/include/lldb/Host/common/UDPSocket.h (original)
+++ lldb/trunk/include/lldb/Host/common/UDPSocket.h Wed Apr  5 20:21:44 2017
@@ -18,7 +18,7 @@ public:
   UDPSocket(bool child_processes_inherit, Error &error);
 
   static Error Connect(llvm::StringRef name, bool child_processes_inherit,
-   Socket *&send_socket, Socket *&recv_socket);
+   Socket *&socket);
 
 private:
   UDPSocket(NativeSocket socket);
@@ -29,7 +29,7 @@ private:
   Error Accept(llvm::StringRef name, bool child_processes_inherit,
Socket *&socket) override;
 
-  SocketAddress m_send_sockaddr;
+  SocketAddress m_sockaddr;
 };
 }
 

Modified: lldb/trunk/source/Host/common/Socket.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Socket.cpp?rev=299608&r1=299607&r2=299608&view=diff
==
--- lldb/trunk/source/Host/common/Socket.cpp (original)
+++ lldb/trunk/source/Host/common/Socket.cpp Wed Apr  5 20:21:44 2017
@@ -172,15 +172,13 @@ Error Socket::TcpListen(llvm::StringRef
 }
 
 Error Socket::UdpConnect(llvm::StringRef host_and_port,
- bool child_processes_inherit, Socket *&send_socket,
- Socket *&recv_socket) {
+ bool child_processes_inherit, Socket *&socket) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
   if (log)
 log->Printf("Socket::%s (host/port = %s)", __FUNCTION__,
 host_and_port.data());
 
-  return UDPSocket::Connect(host_and_port, child_processes_inherit, 
send_socket,
-recv_socket);
+  return UDPSocket::Connect(host_and_port, child_processes_inherit, socket);
 }
 
 Error Socket::UnixDomainConnect(llvm::StringRef name,

Modified: lldb/trunk/source/Host/common/UDPSocket.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/UDPSocket.cpp?rev=299608&r1=299607&r2=299608&view=diff
==
--- lldb/trunk/source/Host/common/UDPSocket.cpp (original)
+++ lldb/trunk/source/Host/common/UDPSocket.cpp Wed Apr  5 20:21:44 2017
@@ -38,7 +38,7 @@ UDPSocket::UDPSocket(bool child_processe
 
 size_t UDPSocket::Send(const void *buf, const size_t num_bytes) {
   return ::sendto(m_socket, static_cast(buf), num_bytes, 0,
-  m_send_sockaddr, m_send_sockaddr.GetLength());
+  m_sockaddr, m_sockaddr.GetLength());
 }
 
 Error UDPSocket::Connect(llvm::StringRef name) {
@@ -55,9 +55,8 @@ Error UDPSocket::Accept(llvm::StringRef
 }
 
 Error UDPSocket::Connect(llvm::StringRef name, bool child_processes_inherit,
- Socket *&send_socket, Socket *&recv_socket) {
-  std::unique_ptr final_send_socket;
-  std::unique_ptr final_recv_socket;
+ Socket *&socket) {
+  std::unique_ptr final_socket;
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
   if (log)
@@ -70,25 +69,6 @@ Erro

[Lldb-commits] [lldb] r299609 - getAsInteger is not a equivalent replacement for strtol

2017-04-05 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Wed Apr  5 20:33:38 2017
New Revision: 299609

URL: http://llvm.org/viewvc/llvm-project?rev=299609&view=rev
Log:
getAsInteger is not a equivalent replacement for strtol

work around that fact for CommandObjectMemoryWrite.



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=299609&r1=299608&r2=299609&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Wed Apr  5 20:33:38 2017
@@ -1443,8 +1443,16 @@ protected:
   case eFormatHex:
   case eFormatHexUppercase:
   case eFormatPointer:
+  {
 // Decode hex bytes
-if (entry.ref.getAsInteger(16, uval64)) {
+// Be careful, getAsInteger with a radix of 16 rejects "0xab" so we
+// have to special case that:
+bool success = false;
+if (entry.ref.startswith("0x"))
+  success = !entry.ref.getAsInteger(0, uval64);
+if (!success)
+  success = !entry.ref.getAsInteger(16, uval64);
+if (!success) {
   result.AppendErrorWithFormat(
   "'%s' is not a valid hex string value.\n", entry.c_str());
   result.SetStatus(eReturnStatusFailed);
@@ -1459,7 +1467,7 @@ protected:
 }
 buffer.PutMaxHex64(uval64, item_byte_size);
 break;
-
+  }
   case eFormatBoolean:
 uval64 = Args::StringToBoolean(entry.ref, false, &success);
 if (!success) {


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


[Lldb-commits] [lldb] r299612 - Some old mach-o core files have an LC_IDENT load command

2017-04-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Apr  5 20:50:11 2017
New Revision: 299612

URL: http://llvm.org/viewvc/llvm-project?rev=299612&view=rev
Log:
Some old mach-o core files have an LC_IDENT load command 
and there's a string in there that can be helpful in locating
the kernel binary.  Use it.
 

Modified:
lldb/trunk/include/lldb/Symbol/ObjectFile.h
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp

Modified: lldb/trunk/include/lldb/Symbol/ObjectFile.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ObjectFile.h?rev=299612&r1=299611&r2=299612&view=diff
==
--- lldb/trunk/include/lldb/Symbol/ObjectFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/ObjectFile.h Wed Apr  5 20:50:11 2017
@@ -563,6 +563,19 @@ public:
 
   virtual uint32_t GetNumThreadContexts() { return 0; }
 
+  //--
+  /// Some object files may have an identifier string embedded in them,
+  /// e.g. in a Mach-O core file using the LC_IDENT load command (which 
+  /// is obsolete, but can still be found in some old files)
+  ///
+  /// @return
+  /// Returns the identifier string if one exists, else an empty
+  /// string.
+  //--
+  virtual std::string GetIdentifierString () { 
+  return std::string(); 
+  }
+
   virtual lldb::RegisterContextSP
   GetThreadContextAtIndex(uint32_t idx, lldb_private::Thread &thread) {
 return lldb::RegisterContextSP();

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=299612&r1=299611&r2=299612&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Wed Apr  5 
20:50:11 2017
@@ -5353,6 +5353,37 @@ uint32_t ObjectFileMachO::GetNumThreadCo
   return m_thread_context_offsets.GetSize();
 }
 
+// The LC_IDENT load command has been obsoleted for a very
+// long time and it should not occur in Mach-O files.  But
+// if it is there, it may contain a hint about where to find
+// the main binary in a core file, so we'll use it.
+std::string ObjectFileMachO::GetIdentifierString() {
+  std::string result;
+  ModuleSP module_sp(GetModule());
+  if (module_sp) {
+std::lock_guard guard(module_sp->GetMutex());
+lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
+for (uint32_t i = 0; i < m_header.ncmds; ++i) {
+  const uint32_t cmd_offset = offset;
+  struct ident_command ident_command;
+  if (m_data.GetU32(&offset, &ident_command, 2) == NULL)
+break;
+  if (ident_command.cmd == LC_IDENT && ident_command.cmdsize != 0) {
+char *buf = (char *)malloc (ident_command.cmdsize);
+if (buf != nullptr 
+&& m_data.CopyData (offset, ident_command.cmdsize, buf) == 
ident_command.cmdsize) {
+  buf[ident_command.cmdsize - 1] = '\0';
+  result = buf;
+}
+if (buf)
+  free (buf);
+  }
+  offset = cmd_offset + ident_command.cmdsize;
+}
+  }
+  return result;
+}
+
 lldb::RegisterContextSP
 ObjectFileMachO::GetThreadContextAtIndex(uint32_t idx,
  lldb_private::Thread &thread) {

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h?rev=299612&r1=299611&r2=299612&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h Wed Apr  5 
20:50:11 2017
@@ -111,6 +111,8 @@ public:
 
   uint32_t GetNumThreadContexts() override;
 
+  std::string GetIdentifierString() override;
+
   lldb::RegisterContextSP
   GetThreadContextAtIndex(uint32_t idx, lldb_private::Thread &thread) override;
 

Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=299612&r1=299611&r2=299612&view=diff
==
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Wed Apr  5 
20:50:11 2017
@@ -291,8 +291,42 @@ Error ProcessMachCore::DoLoadCore() {
 m_core_range_infos.Sort();
   }
 
-  if (m_dyld_addr == LLDB_INVALID_ADDRESS ||
-  m_mach_ker

[Lldb-commits] [lldb] r299613 - Update unittests/Host/SocketTest.cpp to also use the new

2017-04-05 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Wed Apr  5 22:16:44 2017
New Revision: 299613

URL: http://llvm.org/viewvc/llvm-project?rev=299613&view=rev
Log:
Update unittests/Host/SocketTest.cpp to also use the new
one-socket API.

Modified:
lldb/trunk/unittests/Host/SocketTest.cpp

Modified: lldb/trunk/unittests/Host/SocketTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/SocketTest.cpp?rev=299613&r1=299612&r2=299613&view=diff
==
--- lldb/trunk/unittests/Host/SocketTest.cpp (original)
+++ lldb/trunk/unittests/Host/SocketTest.cpp Wed Apr  5 22:16:44 2017
@@ -196,17 +196,14 @@ TEST_F(SocketTest, TCPGetAddress) {
 }
 
 TEST_F(SocketTest, UDPConnect) {
-  Socket *socket_a;
-  Socket *socket_b;
+  Socket *socket;
 
   bool child_processes_inherit = false;
   auto error = UDPSocket::Connect("127.0.0.1:0", child_processes_inherit,
-  socket_a, socket_b);
+  socket);
 
-  std::unique_ptr a_up(socket_a);
-  std::unique_ptr b_up(socket_b);
+  std::unique_ptr socket_up(socket);
 
   EXPECT_TRUE(error.Success());
-  EXPECT_TRUE(a_up->IsValid());
-  EXPECT_TRUE(b_up->IsValid());
+  EXPECT_TRUE(socket_up->IsValid());
 }


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