[Lldb-commits] [lldb] r309392 - [CMake] Adapt to clang r309390

2017-07-28 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Fri Jul 28 08:39:49 2017
New Revision: 309392

URL: http://llvm.org/viewvc/llvm-project?rev=309392&view=rev
Log:
[CMake] Adapt to clang r309390

This removes the configuration order dependence between LLDB and Clang.

Modified:
lldb/trunk/cmake/modules/AddLLDB.cmake

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=309392&r1=309391&r2=309392&view=diff
==
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Fri Jul 28 08:39:49 2017
@@ -76,10 +76,7 @@ function(add_lldb_library name)
   # Hack: only some LLDB libraries depend on the clang autogenerated headers,
   # but it is simple enough to make all of LLDB depend on some of those
   # headers without negatively impacting much of anything.
-  get_property(CLANG_TABLEGEN_TARGETS GLOBAL PROPERTY CLANG_TABLEGEN_TARGETS)
-  if(CLANG_TABLEGEN_TARGETS)
-add_dependencies(${name} ${CLANG_TABLEGEN_TARGETS})
-  endif()
+  add_dependencies(${name} clang-tablegen-targets)
 
   set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
 endfunction(add_lldb_library)


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


[Lldb-commits] [lldb] r309393 - [CMake] Enable OS_LOG support on Darwin

2017-07-28 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Fri Jul 28 08:39:50 2017
New Revision: 309393

URL: http://llvm.org/viewvc/llvm-project?rev=309393&view=rev
Log:
[CMake] Enable OS_LOG support on Darwin

This gets CMake to match the Xcode project build

Modified:
lldb/trunk/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=309393&r1=309392&r2=309393&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Fri Jul 28 08:39:50 2017
@@ -24,6 +24,10 @@ if (LLDB_DISABLE_LIBEDIT)
   add_definitions( -DLLDB_DISABLE_LIBEDIT )
 endif()
 
+if(APPLE)
+  add_definitions(-DLLDB_USE_OS_LOG)
+endif()
+
 # add_subdirectory(include)
 add_subdirectory(docs)
 if (NOT LLDB_DISABLE_PYTHON)


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


[Lldb-commits] [lldb] r309394 - [CMake] Cleanup of header fixup and installation

2017-07-28 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Fri Jul 28 08:39:51 2017
New Revision: 309394

URL: http://llvm.org/viewvc/llvm-project?rev=309394&view=rev
Log:
[CMake] Cleanup of header fixup and installation

This patch does the following:

* Gets the header copy step to re-run whenever header change
* Gets the header fix-up step to re-run whenever headers are copied
* Removes lldb-private*.h headers from the installed headers

Modified:
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/source/API/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=309394&r1=309393&r2=309394&view=diff
==
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Fri Jul 28 08:39:51 2017
@@ -159,23 +159,19 @@ if(LLDB_BUILD_FRAMEWORK)
   file(GLOB public_headers ${LLDB_SOURCE_DIR}/include/lldb/API/*.h
   ${LLDB_SOURCE_DIR}/include/lldb/lldb-*.h)
   file(GLOB root_public_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-*.h)
-
-  foreach(header ${root_public_headers})
-list(APPEND copy_headers_commands
- COMMAND ${CMAKE_COMMAND} -E copy ${header} 
${LLDB_SOURCE_DIR}/include/lldb/API 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders)
-  endforeach()
+  file(GLOB root_private_headers 
${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h)
+  list(REMOVE_ITEM root_public_headers ${root_private_headers})
 
   foreach(header ${public_headers} ${root_public_headers})
 get_filename_component(basename ${header} NAME)
+add_custom_command(OUTPUT 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename}
+   DEPENDS ${header}
+   COMMAND ${CMAKE_COMMAND} -E copy ${header} 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 list(APPEND framework_headers 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   endforeach()
 
-  add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/LLDB.h
-COMMAND ${CMAKE_COMMAND} -E copy_directory 
${LLDB_SOURCE_DIR}/include/lldb/API ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders
-${copy_headers_commands}
-COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders ${LLDB_VERSION}
-)
-  add_custom_target(lldb-framework-headers DEPENDS 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/LLDB.h)
+  add_custom_target(lldb-framework-headers DEPENDS ${framework_headers}
+COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders ${LLDB_VERSION})
   add_dependencies(liblldb lldb-framework-headers)
 
   set_target_properties(liblldb PROPERTIES


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


[Lldb-commits] [lldb] r309395 - [CMake] Add checks for libcompression

2017-07-28 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Fri Jul 28 08:39:51 2017
New Revision: 309395

URL: http://llvm.org/viewvc/llvm-project?rev=309395&view=rev
Log:
[CMake] Add checks for libcompression

This enables libcompression when available in the CMake build system.

Modified:
lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
lldb/trunk/include/lldb/Host/Config.h.cmake
lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt
lldb/trunk/tools/debugserver/source/CMakeLists.txt

Modified: lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake?rev=309395&r1=309394&r2=309395&view=diff
==
--- lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake Fri Jul 28 08:39:51 2017
@@ -3,6 +3,7 @@
 include(CheckSymbolExists)
 include(CheckIncludeFile)
 include(CheckIncludeFiles)
+include(CheckLibraryExists)
 
 set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
 check_symbol_exists(ppoll poll.h HAVE_PPOLL)
@@ -21,6 +22,8 @@ check_cxx_source_compiles("
 int main() { return __NR_process_vm_readv; }"
 HAVE_NR_PROCESS_VM_READV)
 
+check_library_exists(compression compression_encode_buffer "" 
HAVE_LIBCOMPRESSION)
+
 # These checks exist in LLVM's configuration, so I want to match the LLVM names
 # so that the check isn't duplicated, but we translate them into the LLDB names
 # so that I don't have to change all the uses at the moment.

Modified: lldb/trunk/include/lldb/Host/Config.h.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Config.h.cmake?rev=309395&r1=309394&r2=309395&view=diff
==
--- lldb/trunk/include/lldb/Host/Config.h.cmake (original)
+++ lldb/trunk/include/lldb/Host/Config.h.cmake Fri Jul 28 08:39:51 2017
@@ -24,4 +24,6 @@
 
 #cmakedefine01 HAVE_NR_PROCESS_VM_READV
 
+#cmakedefine HAVE_LIBCOMPRESSION
+
 #endif // #ifndef LLDB_HOST_CONFIG_H

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt?rev=309395&r1=309394&r2=309395&view=diff
==
--- lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt Fri Jul 28 
08:39:51 2017
@@ -7,6 +7,10 @@ set(LLDB_PLUGINS
   lldbPluginPlatformMacOSX
 )
 
+if(HAVE_LIBCOMPRESSION)
+  set(LIBCOMPRESSION compression)
+endif()
+
 add_lldb_library(lldbPluginProcessGDBRemote PLUGIN
   GDBRemoteClientBase.cpp
   GDBRemoteCommunication.cpp
@@ -30,6 +34,7 @@ add_lldb_library(lldbPluginProcessGDBRem
 lldbTarget
 lldbUtility
 ${LLDB_PLUGINS}
+${LIBCOMPRESSION}
   LINK_COMPONENTS
 Support
   )

Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=309395&r1=309394&r2=309395&view=diff
==
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Fri Jul 28 08:39:51 2017
@@ -1,4 +1,5 @@
 include(CheckCXXCompilerFlag)
+include(CheckLibraryExists)
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
 include_directories(${LLDB_SOURCE_DIR}/source)
 include_directories(MacOSX/DarwinLog)
@@ -26,6 +27,8 @@ if (CXX_SUPPORTS_NO_EXTENDED_OFFSETOF)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-extended-offsetof")
 endif ()
 
+check_library_exists(compression compression_encode_buffer "" 
HAVE_LIBCOMPRESSION)
+
 add_subdirectory(MacOSX)
 
 set(generated_mach_interfaces
@@ -123,8 +126,12 @@ if(NOT SKIP_DEBUGSERVER)
 ${MOBILESERVICES_LIBRARY}
 ${LOCKDOWN_LIBRARY}
 lldbDebugserverArchSupport
-lldbDebugserverDarwin_DarwinLog)
-
+lldbDebugserverDarwin_DarwinLog
+compression)
+  if(HAVE_LIBCOMPRESSION)
+set_property(TARGET lldbDebugserverCommon APPEND PROPERTY
+ COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
+  endif()
   set(LLVM_OPTIONAL_SOURCES ${lldbDebugserverCommonSources})
   add_lldb_tool(debugserver INCLUDE_IN_FRAMEWORK
 debugserver.cpp
@@ -151,9 +158,14 @@ if(IOS)
   ${CORE_FOUNDATION_LIBRARY}
   ${FOUNDATION_LIBRARY}
   lldbDebugserverArchSupport
-  lldbDebugserverDarwin_DarwinLog)
+  lldbDebugserverDarwin_DarwinLog
+  compression)
+  if(HAVE_LIBCOMPRESSION)
+set_property(TARGET lldbDebugserverCommon_NonUI APPEND PROPERTY
+ COMPILE_DEFINITIONS HAVE_LIBCOMPRES

[Lldb-commits] [lldb] r309396 - [CMake] libcompression is optional not required for debugserver

2017-07-28 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Fri Jul 28 08:44:16 2017
New Revision: 309396

URL: http://llvm.org/viewvc/llvm-project?rev=309396&view=rev
Log:
[CMake] libcompression is optional not required for debugserver

Fix a quick bug from r309395.

Modified:
lldb/trunk/tools/debugserver/source/CMakeLists.txt

Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=309396&r1=309395&r2=309396&view=diff
==
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Fri Jul 28 08:44:16 2017
@@ -115,6 +115,10 @@ if (APPLE)
   endif()
 endif()
 
+if(HAVE_LIBCOMPRESSION)
+  set(LIBCOMPRESSION compression)
+endif()
+
 if(NOT SKIP_DEBUGSERVER)
   target_link_libraries(lldbDebugserverCommon
 INTERFACE ${COCOA_LIBRARY}
@@ -127,7 +131,7 @@ if(NOT SKIP_DEBUGSERVER)
 ${LOCKDOWN_LIBRARY}
 lldbDebugserverArchSupport
 lldbDebugserverDarwin_DarwinLog
-compression)
+${LIBCOMPRESSION})
   if(HAVE_LIBCOMPRESSION)
 set_property(TARGET lldbDebugserverCommon APPEND PROPERTY
  COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
@@ -159,7 +163,7 @@ if(IOS)
   ${FOUNDATION_LIBRARY}
   lldbDebugserverArchSupport
   lldbDebugserverDarwin_DarwinLog
-  compression)
+  ${LIBCOMPRESSION})
   if(HAVE_LIBCOMPRESSION)
 set_property(TARGET lldbDebugserverCommon_NonUI APPEND PROPERTY
  COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)


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


[Lldb-commits] [PATCH] D33213: Use socketpair on all Unix platforms

2017-07-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a reviewer: eugene.
labath added a comment.

I am not able to test this right now. Eugene, can you take a look?




Comment at: tools/lldb-server/lldb-gdbserver.cpp:241
+  std::unique_ptr connection_up;
+  if (connection_fd != -1) {
+// Build the connection string.

you should set the O_CLOEXEC flag on the file descriptor, to avoid leakage.


https://reviews.llvm.org/D33213



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


[Lldb-commits] [PATCH] D35740: Fix PR33875 by distinguishing between DWO and clang modules

2017-07-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

I looked at this briefly last week but I could not find a good fix in the 
amount of time I had left. This fixes the current test failure, but it does not 
fix the underlying bug, which is that we (sometimes?) set the compile unit 
offset for non-dwo, non-dsym DIEs as 0. This works fine if all compile units 
are regular dwarf as we have logic to locate the containing CU if the offset is 
zero. However, it can fail in case of mixed dwarf and dwo compile units. My 
guess is you could still reproduce this bug with a so file that has a dwo 
compile unit at offset zero.

That said, I don't think this makes things any worse, so I have no objections 
to this patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D35740



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


[Lldb-commits] [PATCH] D11465: Fix "process load/unload" on android

2017-07-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments.



Comment at: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp:389
+   struct __lldb_dlopen_result { void *image_ptr; const char 
*error_str; } the_result;
+   the_result.image_ptr = __dl_dlopen ("%s", 2);
+   if (the_result.image_ptr == (void*)0x0)

nitesh.jain wrote:
> Hi Tamas,
> 
> When I run "process load libloadunload_a.so --install" its fail with error 
> Couldn't lookup symbols: __dl_dlerror, __dl_dlopen.  
> 
> Symbol table contains 13 entries:
>Num:Value  Size TypeBind   Vis  Ndx Name
>  0:  0 NOTYPE  LOCAL  DEFAULT  UND
>  1: 0304 5 FUNCGLOBAL DEFAULT5 android_dlopen_ext
>  2: 0309 5 FUNCGLOBAL DEFAULT5 android_get_LD_LIBRARY_PA
>  3: 030e 5 FUNCGLOBAL DEFAULT5 android_update_LD_LIBRARY
>  4: 0313 5 FUNCGLOBAL DEFAULT5 dl_iterate_phdr
>  5: 0318 5 FUNCGLOBAL DEFAULT5 **dladdr**
>  6: 031d 5 FUNCGLOBAL DEFAULT5 **dlclose**
>  7: 0322 5 FUNCGLOBAL DEFAULT5 **dlerror**
>  8: 0327 5 FUNCGLOBAL DEFAULT5 **dlopen**
>  9: 032c 5 FUNCGLOBAL DEFAULT5 dlsym
> 10: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS _edata
> 11: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
> 12: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS _end
> 
> The symbols are not prefix with "__dl_" . We are using SDK version 25 for 
> MIP64r6 target. 
> 
> generic_mips64:/ # getprop ro.build.version.sdk
> 25
> 
> Even we are not seeing prefix "__dl_" added to X86-64 dynamic symbol
> Symbol table '.dynsym' contains 12 entries:
>Num:Value  Size TypeBind   Vis  Ndx Name
>  0:  0 NOTYPE  LOCAL  DEFAULT  UND
>  1: 0442 6 FUNCGLOBAL DEFAULT7 
> dl_iterate_phdr@@LIBC
>  2: 043c 6 FUNCGLOBAL DEFAULT7 
> android_dlopen_ext@@LIBC
>  3: 044e 6 FUNCGLOBAL DEFAULT7 dlclose@@LIBC
>  4: 0448 6 FUNCGLOBAL DEFAULT7 dladdr@@LIBC
>  5: 045a 6 FUNCGLOBAL DEFAULT7 dlopen@@LIBC
>  6: 0454 6 FUNCGLOBAL DEFAULT7 dlerror@@LIBC
>  7: 0460 6 FUNCGLOBAL DEFAULT7 dlsym@@LIBC
>  8: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS _edata
>  9: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
> 10: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS _end
> 11:  0 OBJECT  GLOBAL DEFAULT  ABS LIBC
> 
> Symbol table '.symtab' contains 14 entries:
>Num:Value  Size TypeBind   Vis  Ndx Name
>  0:  0 NOTYPE  LOCAL  DEFAULT  UND
>  1:  0 FILELOCAL  DEFAULT  ABS tmp-platform.c
>  2: 1ee0   288 OBJECT  LOCAL  HIDDEN10 _DYNAMIC
>  3:  0 OBJECT  GLOBAL DEFAULT  ABS LIBC
>  4: 0442 6 FUNCGLOBAL DEFAULT7 dl_iterate_phdr
>  5: 043c 6 FUNCGLOBAL DEFAULT7 android_dlopen_ext
>  6: 044e 6 FUNCGLOBAL DEFAULT7 dlclose
>  7: 0448 6 FUNCGLOBAL DEFAULT7 dladdr
>  8: 045a 6 FUNCGLOBAL DEFAULT7 dlopen
> 
Is it possible you are using a **preview** version of android sdk? These had 
the new dlopen symbols even though the official android sdk's still used the 
__dl_dlopen symbols?


Repository:
  rL LLVM

https://reviews.llvm.org/D11465



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


[Lldb-commits] [PATCH] D11465: Fix "process load/unload" on android

2017-07-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment.

It would be nice to auto detect the names correctly?




Comment at: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp:389
+   struct __lldb_dlopen_result { void *image_ptr; const char 
*error_str; } the_result;
+   the_result.image_ptr = __dl_dlopen ("%s", 2);
+   if (the_result.image_ptr == (void*)0x0)

labath wrote:
> nitesh.jain wrote:
> > Hi Tamas,
> > 
> > When I run "process load libloadunload_a.so --install" its fail with error 
> > Couldn't lookup symbols: __dl_dlerror, __dl_dlopen.  
> > 
> > Symbol table contains 13 entries:
> >Num:Value  Size TypeBind   Vis  Ndx Name
> >  0:  0 NOTYPE  LOCAL  DEFAULT  UND
> >  1: 0304 5 FUNCGLOBAL DEFAULT5 android_dlopen_ext
> >  2: 0309 5 FUNCGLOBAL DEFAULT5 android_get_LD_LIBRARY_PA
> >  3: 030e 5 FUNCGLOBAL DEFAULT5 android_update_LD_LIBRARY
> >  4: 0313 5 FUNCGLOBAL DEFAULT5 dl_iterate_phdr
> >  5: 0318 5 FUNCGLOBAL DEFAULT5 **dladdr**
> >  6: 031d 5 FUNCGLOBAL DEFAULT5 **dlclose**
> >  7: 0322 5 FUNCGLOBAL DEFAULT5 **dlerror**
> >  8: 0327 5 FUNCGLOBAL DEFAULT5 **dlopen**
> >  9: 032c 5 FUNCGLOBAL DEFAULT5 dlsym
> > 10: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS _edata
> > 11: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
> > 12: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS _end
> > 
> > The symbols are not prefix with "__dl_" . We are using SDK version 25 for 
> > MIP64r6 target. 
> > 
> > generic_mips64:/ # getprop ro.build.version.sdk
> > 25
> > 
> > Even we are not seeing prefix "__dl_" added to X86-64 dynamic symbol
> > Symbol table '.dynsym' contains 12 entries:
> >Num:Value  Size TypeBind   Vis  Ndx Name
> >  0:  0 NOTYPE  LOCAL  DEFAULT  UND
> >  1: 0442 6 FUNCGLOBAL DEFAULT7 
> > dl_iterate_phdr@@LIBC
> >  2: 043c 6 FUNCGLOBAL DEFAULT7 
> > android_dlopen_ext@@LIBC
> >  3: 044e 6 FUNCGLOBAL DEFAULT7 dlclose@@LIBC
> >  4: 0448 6 FUNCGLOBAL DEFAULT7 dladdr@@LIBC
> >  5: 045a 6 FUNCGLOBAL DEFAULT7 dlopen@@LIBC
> >  6: 0454 6 FUNCGLOBAL DEFAULT7 dlerror@@LIBC
> >  7: 0460 6 FUNCGLOBAL DEFAULT7 dlsym@@LIBC
> >  8: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS _edata
> >  9: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
> > 10: 2000 0 NOTYPE  GLOBAL DEFAULT  ABS _end
> > 11:  0 OBJECT  GLOBAL DEFAULT  ABS LIBC
> > 
> > Symbol table '.symtab' contains 14 entries:
> >Num:Value  Size TypeBind   Vis  Ndx Name
> >  0:  0 NOTYPE  LOCAL  DEFAULT  UND
> >  1:  0 FILELOCAL  DEFAULT  ABS tmp-platform.c
> >  2: 1ee0   288 OBJECT  LOCAL  HIDDEN10 _DYNAMIC
> >  3:  0 OBJECT  GLOBAL DEFAULT  ABS LIBC
> >  4: 0442 6 FUNCGLOBAL DEFAULT7 dl_iterate_phdr
> >  5: 043c 6 FUNCGLOBAL DEFAULT7 
> > android_dlopen_ext
> >  6: 044e 6 FUNCGLOBAL DEFAULT7 dlclose
> >  7: 0448 6 FUNCGLOBAL DEFAULT7 dladdr
> >  8: 045a 6 FUNCGLOBAL DEFAULT7 dlopen
> > 
> Is it possible you are using a **preview** version of android sdk? These had 
> the new dlopen symbols even though the official android sdk's still used the 
> __dl_dlopen symbols?
Maybe search for a symbol named "__dl_open" first, then fall back to "dl_open" 
if that symbol is available, and supply as an argument for "expr.Printf(" by 
adding a "%s" in place of the "__dl_dlopen? call? Then it can work for both?

```
const char *dl_open_func_name = nullptr;
SymbolContextList matching_symbols;
std::vector dl_open_names = { "__dl_open", "dl_open" };
const char *dl_open_name = nullptr;
for (auto name: dl_open_names) {
  if (process->GetTarget().GetImages().FindFunctionSymbols(ConstString(name), 
eFunctionNameTypeFull, matching_symbols))
dl_open_name = name;
break;
  }
}
```



Repository:
  rL LLVM

https://reviews.llvm.org/D11465



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


[Lldb-commits] [lldb] r309428 - [CMake] debugserver-nonui doesn't go in the framework

2017-07-28 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Fri Jul 28 13:27:37 2017
New Revision: 309428

URL: http://llvm.org/viewvc/llvm-project?rev=309428&view=rev
Log:
[CMake] debugserver-nonui doesn't go in the framework

Small change to correct the install path of the nonui debugserver.

Modified:
lldb/trunk/tools/debugserver/source/CMakeLists.txt

Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=309428&r1=309427&r2=309428&view=diff
==
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Fri Jul 28 13:27:37 2017
@@ -169,7 +169,7 @@ if(IOS)
  COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
   endif()
 
-  add_lldb_tool(debugserver-nonui INCLUDE_IN_FRAMEWORK
+  add_lldb_tool(debugserver-nonui
 debugserver.cpp
 
 LINK_LIBS


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


[Lldb-commits] [lldb] r309429 - [CMake] Add SharingPtr.h to the Framework header list

2017-07-28 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Fri Jul 28 13:27:38 2017
New Revision: 309429

URL: http://llvm.org/viewvc/llvm-project?rev=309429&view=rev
Log:
[CMake] Add SharingPtr.h to the Framework header list

lldb-forward.h which is a public header uses SharingPtr, so we need to include 
that header as well.

Modified:
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/source/API/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=309429&r1=309428&r2=309429&view=diff
==
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Fri Jul 28 13:27:38 2017
@@ -162,7 +162,7 @@ if(LLDB_BUILD_FRAMEWORK)
   file(GLOB root_private_headers 
${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h)
   list(REMOVE_ITEM root_public_headers ${root_private_headers})
 
-  foreach(header ${public_headers} ${root_public_headers})
+  foreach(header ${public_headers} ${root_public_headers} 
${LLDB_SOURCE_DIR}/include/lldb/Utility/SharingPtr.h)
 get_filename_component(basename ${header} NAME)
 add_custom_command(OUTPUT 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename}
DEPENDS ${header}


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