[Lldb-commits] [lldb] r244069 - Flush stderr on dosep status update for Windows.
Author: chaoren Date: Wed Aug 5 12:36:54 2015 New Revision: 244069 URL: http://llvm.org/viewvc/llvm-project?rev=244069&view=rev Log: Flush stderr on dosep status update for Windows. Modified: lldb/trunk/test/dosep.py Modified: lldb/trunk/test/dosep.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=244069&r1=244068&r2=244069&view=diff == --- lldb/trunk/test/dosep.py (original) +++ lldb/trunk/test/dosep.py Wed Aug 5 12:36:54 2015 @@ -86,6 +86,7 @@ def update_status(name = None, command = print >> sys.stderr, "stderr:\n%s" % output[1] sys.stderr.write("\r%*d out of %d test suites processed" % (len(str(total_tests)), test_counter.value, total_tests)) +sys.stderr.flush() test_counter.value += 1 def parse_test_results(output): ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r244073 - Static Android build doesn't need shared libs.
Author: chaoren Date: Wed Aug 5 12:42:46 2015 New Revision: 244073 URL: http://llvm.org/viewvc/llvm-project?rev=244073&view=rev Log: Static Android build doesn't need shared libs. Modified: lldb/trunk/cmake/platforms/Android.cmake Modified: lldb/trunk/cmake/platforms/Android.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/platforms/Android.cmake?rev=244073&r1=244072&r2=244073&view=diff == --- lldb/trunk/cmake/platforms/Android.cmake (original) +++ lldb/trunk/cmake/platforms/Android.cmake Wed Aug 5 12:42:46 2015 @@ -44,7 +44,9 @@ set( __ANDROID_NDK__ True ) # its symbols, which significantly increases the binary size. Static linking, on # the other hand, has little to no effect on the binary size. if( NOT DEFINED LLVM_BUILD_STATIC ) - set( LLVM_BUILD_STATIC True ) + set( LLVM_BUILD_STATIC True CACHE BOOL "" FORCE ) + set( LLVM_ENABLE_PIC FALSE CACHE BOOL "" FORCE ) + set( BUILD_SHARED_LIBS FALSE CACHE BOOL "" FORCE ) endif() set( ANDROID_ABI "${ANDROID_ABI}" CACHE INTERNAL "Android Abi" FORCE ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r244072 - Allow sysroot and python to be specified for Android build.
Author: chaoren Date: Wed Aug 5 12:42:44 2015 New Revision: 244072 URL: http://llvm.org/viewvc/llvm-project?rev=244072&view=rev Log: Allow sysroot and python to be specified for Android build. Modified: lldb/trunk/cmake/platforms/Android.cmake Modified: lldb/trunk/cmake/platforms/Android.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/platforms/Android.cmake?rev=244072&r1=244071&r2=244072&view=diff == --- lldb/trunk/cmake/platforms/Android.cmake (original) +++ lldb/trunk/cmake/platforms/Android.cmake Wed Aug 5 12:42:44 2015 @@ -70,16 +70,15 @@ else() message( SEND_ERROR "Unknown ANDROID_ABI = \"${ANDROID_ABI}\"." ) endif() -set( ANDROID_TOOLCHAIN_DIR "${ANDROID_TOOLCHAIN_DIR}" CACHE INTERNAL "Android standalone toolchain directory" FORCE ) -set( ANDROID_SYSROOT "${ANDROID_TOOLCHAIN_DIR}/sysroot" CACHE INTERNAL "Android Sysroot" FORCE ) +set( ANDROID_TOOLCHAIN_DIR "${ANDROID_TOOLCHAIN_DIR}" CACHE PATH "Android standalone toolchain directory" ) +set( ANDROID_SYSROOT "${ANDROID_TOOLCHAIN_DIR}/sysroot" CACHE PATH "Android Sysroot" ) # CMAKE_EXECUTABLE_SUFFIX is undefined in CMAKE_TOOLCHAIN_FILE if( WIN32 ) set( EXECUTABLE_SUFFIX ".exe" ) endif() -# force python exe to be the one in Android toolchian -set( PYTHON_EXECUTABLE "${ANDROID_TOOLCHAIN_DIR}/bin/python${EXECUTABLE_SUFFIX}" CACHE INTERNAL "Python exec path" FORCE ) +set( PYTHON_EXECUTABLE "${ANDROID_TOOLCHAIN_DIR}/bin/python${EXECUTABLE_SUFFIX}" CACHE PATH "Python exec path" ) if( NOT CMAKE_C_COMPILER ) set( CMAKE_C_COMPILER "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-gcc${EXECUTABLE_SUFFIX}" CACHE PATH "C compiler" ) @@ -119,27 +118,6 @@ endif() set( ANDROID_CXX_FLAGS"${ANDROID_CXX_FLAGS} -fdata-sections -ffunction-sections" ) set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--gc-sections" ) -# BEGIN EVIL HACK ## -# lldb-server links against libdl even though it's not being used and -# libdl.a is currently missing from the toolchain (b.android.com/178517). -# Therefore, in order to statically link lldb-server, we need a temporary -# workaround. This creates a dummy libdl.a stub until the actual -# libdl.a can be implemented in the toolchain. -if( LLVM_BUILD_STATIC ) - set( ANDROID_LIBDL_STUB "${CMAKE_BINARY_DIR}/libdl_stub" ) - file( MAKE_DIRECTORY ${ANDROID_LIBDL_STUB} ) - file( WRITE "${ANDROID_LIBDL_STUB}/libdl.c" " -#include -void * dlopen (const char *filename, int flag) { return 0; } -const char * dlerror (void) { return 0; } -void * dlsym (void *handle, const char *symbol) { return 0; } -int dlclose (void *handle) { return 0; }") - execute_process( COMMAND ${CMAKE_C_COMPILER} -c ${ANDROID_LIBDL_STUB}/libdl.c -o ${ANDROID_LIBDL_STUB}/libdl.o ) - execute_process( COMMAND ${CMAKE_AR} rcs ${ANDROID_LIBDL_STUB}/libdl.a ${ANDROID_LIBDL_STUB}/libdl.o ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -L${ANDROID_LIBDL_STUB}" ) -endif() -# END EVIL HACK ## - # cache flags set( CMAKE_CXX_FLAGS ""CACHE STRING "c++ flags" ) set( CMAKE_C_FLAGS ""CACHE STRING "c flags" ) @@ -164,3 +142,28 @@ set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOO set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) + +# BEGIN EVIL HACK ## +# lldb-server links against libdl even though it's not being used and +# libdl.a is currently missing from the toolchain (b.android.com/178517). +# Therefore, in order to statically link lldb-server, we need a temporary +# workaround. This creates a dummy libdl.a stub until the actual +# libdl.a can be implemented in the toolchain. +if( LLVM_BUILD_STATIC ) + set( ANDROID_LIBDL_STUB "${CMAKE_BINARY_DIR}/libdl_stub" ) + file( MAKE_DIRECTORY ${ANDROID_LIBDL_STUB} ) + file( WRITE "${ANDROID_LIBDL_STUB}/libdl.c" " +#include +void * dlopen (const char *filename, int flag) { return 0; } +const char * dlerror (void) { return 0; } +void * dlsym (void *handle, const char *symbol) { return 0; } +int dlclose (void *handle) { return 0; }") + set( SEPARATED_C_FLAGS "${CMAKE_C_FLAGS}" ) + separate_arguments( SEPARATED_C_FLAGS ) + execute_process( COMMAND ${CMAKE_C_COMPILER} ${SEPARATED_C_FLAGS} -c ${ANDROID_LIBDL_STUB}/libdl.c -o ${ANDROID_LIBDL_STUB}/libdl.o ) + execute_process( COMMAND ${CMAKE_AR} rcs ${ANDROID_LIBDL_STUB}/libdl.a ${ANDROID_LIBDL_STUB}/libdl.o ) + set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${ANDROID_LIBDL_STUB}" ) + unset( ANDROID_LIBDL_STUB ) + unset( SEPARATED_C_FLAGS ) +endif() +# END EVIL HACK ## _
Re: [Lldb-commits] [lldb] r248846 - Skipping TestAttachDenied.py on Linux as it is hanging on a buildbot after r248834.
Does timeout not work? On Tue, Sep 29, 2015 at 4:06 PM, Todd Fiala via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: tfiala > Date: Tue Sep 29 18:06:56 2015 > New Revision: 248846 > > URL: http://llvm.org/viewvc/llvm-project?rev=248846&view=rev > Log: > Skipping TestAttachDenied.py on Linux as it is hanging on a buildbot after > r248834. > > I'll track down what is happening here. > > Modified: > > lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py > > Modified: > lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py?rev=248846&r1=248845&r2=248846&view=diff > > == > --- > lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py > (original) > +++ > lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py > Tue Sep 29 18:06:56 2015 > @@ -21,6 +21,7 @@ class AttachDeniedTestCase(TestBase): > return (err, shell_command.GetStatus(), shell_command.GetOutput()) > > @skipIfWindows > +@skipIfLinux # hanging after reviews D13124 change went in > def test_attach_to_process_by_id_denied(self): > """Test attach by process id denied""" > > > > ___ > 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] r249486 - Fix Android build.
Author: chaoren Date: Tue Oct 6 19:01:06 2015 New Revision: 249486 URL: http://llvm.org/viewvc/llvm-project?rev=249486&view=rev Log: Fix Android build. Modified: lldb/trunk/CMakeLists.txt lldb/trunk/cmake/platforms/Android.cmake lldb/trunk/source/CMakeLists.txt Modified: lldb/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=249486&r1=249485&r2=249486&view=diff == --- lldb/trunk/CMakeLists.txt (original) +++ lldb/trunk/CMakeLists.txt Tue Oct 6 19:01:06 2015 @@ -4,6 +4,12 @@ include(cmake/modules/LLDBStandalone.cma include(cmake/modules/LLDBConfig.cmake) include(cmake/modules/AddLLDB.cmake) +if (__ANDROID_NDK__ OR (CMAKE_SYSTEM_NAME MATCHES "Windows")) + set(LLDB_DEFAULT_DISABLE_LIBEDIT 1) +else() + set(LLDB_DEFAULT_DISABLE_LIBEDIT 0) +endif () + # We need libedit support to go down both the source and # the scripts directories. set(LLDB_DISABLE_LIBEDIT ${LLDB_DEFAULT_DISABLE_LIBEDIT} CACHE BOOL "Disables the use of editline.") Modified: lldb/trunk/cmake/platforms/Android.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/platforms/Android.cmake?rev=249486&r1=249485&r2=249486&view=diff == --- lldb/trunk/cmake/platforms/Android.cmake (original) +++ lldb/trunk/cmake/platforms/Android.cmake Tue Oct 6 19:01:06 2015 @@ -37,6 +37,7 @@ remove_definitions( -DANDROID -D__ANDROI add_definitions( -DANDROID -D__ANDROID_NDK__ -DLLDB_DISABLE_LIBEDIT ) set( ANDROID True ) set( __ANDROID_NDK__ True ) +set( LLDB_DEFAULT_DISABLE_LIBEDIT True ) # linking lldb-server statically for Android avoids the need to ship two # binaries (pie for API 21+ and non-pie for API 16-). It's possible to use Modified: lldb/trunk/source/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=249486&r1=249485&r2=249486&view=diff == --- lldb/trunk/source/CMakeLists.txt (original) +++ lldb/trunk/source/CMakeLists.txt Tue Oct 6 19:01:06 2015 @@ -1,11 +1,5 @@ include_directories(.) -if (__ANDROID_NDK__ OR (CMAKE_SYSTEM_NAME MATCHES "Windows")) - set(LLDB_DEFAULT_DISABLE_LIBEDIT 1) -else() - set(LLDB_DEFAULT_DISABLE_LIBEDIT 0) -endif () - if ( CMAKE_SYSTEM_NAME MATCHES "Linux" ) include_directories( Plugins/Process/Linux ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14127: Use accept4 workaround for MIPS Android build.
chaoren created this revision. chaoren added reviewers: chying, ovyalov. chaoren added a subscriber: lldb-commits. Herald added subscribers: srhines, danalbert, tberghammer, aemerson. Similar to http://reviews.llvm.org/rL242319, which was for ARM. http://reviews.llvm.org/D14127 Files: cmake/platforms/Android.cmake source/Host/common/Socket.cpp Index: source/Host/common/Socket.cpp === --- source/Host/common/Socket.cpp +++ source/Host/common/Socket.cpp @@ -40,11 +40,11 @@ #include #include #include -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) #include #include #include -#endif // ANDROID_ARM_BUILD_STATIC +#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC #endif // __ANDROID_NDK__ using namespace lldb; @@ -457,7 +457,7 @@ Error& error) { error.Clear(); -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) // Temporary workaround for statically linking Android lldb-server with the // latest API. int fd = syscall(__NR_accept, sockfd, addr, addrlen); Index: cmake/platforms/Android.cmake === --- cmake/platforms/Android.cmake +++ cmake/platforms/Android.cmake @@ -115,6 +115,10 @@ list( APPEND LLDB_SYSTEM_LIBS atomic ) set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE ) endif() + if( LLVM_BUILD_STATIC ) + # Temporary workaround for static linking with the latest API. + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" ) + endif() endif() if( NOT LLVM_BUILD_STATIC ) Index: source/Host/common/Socket.cpp === --- source/Host/common/Socket.cpp +++ source/Host/common/Socket.cpp @@ -40,11 +40,11 @@ #include #include #include -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) #include #include #include -#endif // ANDROID_ARM_BUILD_STATIC +#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC #endif // __ANDROID_NDK__ using namespace lldb; @@ -457,7 +457,7 @@ Error& error) { error.Clear(); -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) // Temporary workaround for statically linking Android lldb-server with the // latest API. int fd = syscall(__NR_accept, sockfd, addr, addrlen); Index: cmake/platforms/Android.cmake === --- cmake/platforms/Android.cmake +++ cmake/platforms/Android.cmake @@ -115,6 +115,10 @@ list( APPEND LLDB_SYSTEM_LIBS atomic ) set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE ) endif() + if( LLVM_BUILD_STATIC ) + # Temporary workaround for static linking with the latest API. + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" ) + endif() endif() if( NOT LLVM_BUILD_STATIC ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r251439 - Use accept4 workaround for MIPS Android build.
Author: chaoren Date: Tue Oct 27 14:17:35 2015 New Revision: 251439 URL: http://llvm.org/viewvc/llvm-project?rev=251439&view=rev Log: Use accept4 workaround for MIPS Android build. Summary: Similar to http://reviews.llvm.org/rL242319, which was for ARM. Reviewers: chying, ovyalov Subscribers: aemerson, tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D14127 Modified: lldb/trunk/cmake/platforms/Android.cmake lldb/trunk/source/Host/common/Socket.cpp Modified: lldb/trunk/cmake/platforms/Android.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/platforms/Android.cmake?rev=251439&r1=251438&r2=251439&view=diff == --- lldb/trunk/cmake/platforms/Android.cmake (original) +++ lldb/trunk/cmake/platforms/Android.cmake Tue Oct 27 14:17:35 2015 @@ -115,6 +115,10 @@ elseif( ANDROID_ABI STREQUAL "mips" ) list( APPEND LLDB_SYSTEM_LIBS atomic ) set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE ) endif() + if( LLVM_BUILD_STATIC ) + # Temporary workaround for static linking with the latest API. + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" ) + endif() endif() if( NOT LLVM_BUILD_STATIC ) Modified: lldb/trunk/source/Host/common/Socket.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Socket.cpp?rev=251439&r1=251438&r2=251439&view=diff == --- lldb/trunk/source/Host/common/Socket.cpp (original) +++ lldb/trunk/source/Host/common/Socket.cpp Tue Oct 27 14:17:35 2015 @@ -40,11 +40,11 @@ #include #include #include -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) #include #include #include -#endif // ANDROID_ARM_BUILD_STATIC +#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC #endif // __ANDROID_NDK__ using namespace lldb; @@ -457,7 +457,7 @@ Socket::AcceptSocket(NativeSocket sockfd Error& error) { error.Clear(); -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) // Temporary workaround for statically linking Android lldb-server with the // latest API. int fd = syscall(__NR_accept, sockfd, addr, addrlen); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14127: Use accept4 workaround for MIPS Android build.
This revision was automatically updated to reflect the committed changes. Closed by commit rL251439: Use accept4 workaround for MIPS Android build. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D14127?vs=38581&id=38582#toc Repository: rL LLVM http://reviews.llvm.org/D14127 Files: lldb/trunk/cmake/platforms/Android.cmake lldb/trunk/source/Host/common/Socket.cpp Index: lldb/trunk/source/Host/common/Socket.cpp === --- lldb/trunk/source/Host/common/Socket.cpp +++ lldb/trunk/source/Host/common/Socket.cpp @@ -40,11 +40,11 @@ #include #include #include -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) #include #include #include -#endif // ANDROID_ARM_BUILD_STATIC +#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC #endif // __ANDROID_NDK__ using namespace lldb; @@ -457,7 +457,7 @@ Error& error) { error.Clear(); -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) // Temporary workaround for statically linking Android lldb-server with the // latest API. int fd = syscall(__NR_accept, sockfd, addr, addrlen); Index: lldb/trunk/cmake/platforms/Android.cmake === --- lldb/trunk/cmake/platforms/Android.cmake +++ lldb/trunk/cmake/platforms/Android.cmake @@ -115,6 +115,10 @@ list( APPEND LLDB_SYSTEM_LIBS atomic ) set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE ) endif() + if( LLVM_BUILD_STATIC ) + # Temporary workaround for static linking with the latest API. + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" ) + endif() endif() if( NOT LLVM_BUILD_STATIC ) Index: lldb/trunk/source/Host/common/Socket.cpp === --- lldb/trunk/source/Host/common/Socket.cpp +++ lldb/trunk/source/Host/common/Socket.cpp @@ -40,11 +40,11 @@ #include #include #include -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) #include #include #include -#endif // ANDROID_ARM_BUILD_STATIC +#endif // ANDROID_ARM_BUILD_STATIC || ANDROID_MIPS_BUILD_STATIC #endif // __ANDROID_NDK__ using namespace lldb; @@ -457,7 +457,7 @@ Error& error) { error.Clear(); -#if defined(ANDROID_ARM_BUILD_STATIC) +#if defined(ANDROID_ARM_BUILD_STATIC) || defined(ANDROID_MIPS_BUILD_STATIC) // Temporary workaround for statically linking Android lldb-server with the // latest API. int fd = syscall(__NR_accept, sockfd, addr, addrlen); Index: lldb/trunk/cmake/platforms/Android.cmake === --- lldb/trunk/cmake/platforms/Android.cmake +++ lldb/trunk/cmake/platforms/Android.cmake @@ -115,6 +115,10 @@ list( APPEND LLDB_SYSTEM_LIBS atomic ) set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE ) endif() + if( LLVM_BUILD_STATIC ) + # Temporary workaround for static linking with the latest API. + set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_MIPS_BUILD_STATIC" ) + endif() endif() if( NOT LLVM_BUILD_STATIC ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14166: Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR.
chaoren created this revision. chaoren added reviewers: sas, ovyalov. chaoren added a subscriber: lldb-commits. http://reviews.llvm.org/D14166 Files: cmake/modules/LLDBConfig.cmake Index: cmake/modules/LLDBConfig.cmake === --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -194,7 +194,11 @@ add_definitions( -DLLDB_DISABLE_PYTHON ) endif() -include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +if (LLVM_EXTERNAL_CLANG_SOURCE_DIR) + include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include) +else () + include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +endif () include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include") # Disable GCC warnings Index: cmake/modules/LLDBConfig.cmake === --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -194,7 +194,11 @@ add_definitions( -DLLDB_DISABLE_PYTHON ) endif() -include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +if (LLVM_EXTERNAL_CLANG_SOURCE_DIR) + include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include) +else () + include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +endif () include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include") # Disable GCC warnings ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13819: LLDBStandalone: Report nice errors on missing vars
chaoren resigned from this revision. chaoren removed a reviewer: chaoren. chaoren added a comment. Seems legit. But I've never built standalone, so I probably shouldn't be a reviewer for this. http://reviews.llvm.org/D13819 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r251589 - Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR.
Author: chaoren Date: Wed Oct 28 19:48:38 2015 New Revision: 251589 URL: http://llvm.org/viewvc/llvm-project?rev=251589&view=rev Log: Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR. Reviewers: sas, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14166 Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=251589&r1=251588&r2=251589&view=diff == --- lldb/trunk/cmake/modules/LLDBConfig.cmake (original) +++ lldb/trunk/cmake/modules/LLDBConfig.cmake Wed Oct 28 19:48:38 2015 @@ -194,7 +194,11 @@ if (LLDB_DISABLE_PYTHON) add_definitions( -DLLDB_DISABLE_PYTHON ) endif() -include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +if (LLVM_EXTERNAL_CLANG_SOURCE_DIR) + include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include) +else () + include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +endif () include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include") # Disable GCC warnings ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14166: Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR.
This revision was automatically updated to reflect the committed changes. Closed by commit rL251589: Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D14166?vs=38700&id=38702#toc Repository: rL LLVM http://reviews.llvm.org/D14166 Files: lldb/trunk/cmake/modules/LLDBConfig.cmake Index: lldb/trunk/cmake/modules/LLDBConfig.cmake === --- lldb/trunk/cmake/modules/LLDBConfig.cmake +++ lldb/trunk/cmake/modules/LLDBConfig.cmake @@ -194,7 +194,11 @@ add_definitions( -DLLDB_DISABLE_PYTHON ) endif() -include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +if (LLVM_EXTERNAL_CLANG_SOURCE_DIR) + include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include) +else () + include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +endif () include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include") # Disable GCC warnings Index: lldb/trunk/cmake/modules/LLDBConfig.cmake === --- lldb/trunk/cmake/modules/LLDBConfig.cmake +++ lldb/trunk/cmake/modules/LLDBConfig.cmake @@ -194,7 +194,11 @@ add_definitions( -DLLDB_DISABLE_PYTHON ) endif() -include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +if (LLVM_EXTERNAL_CLANG_SOURCE_DIR) + include_directories(${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include) +else () + include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include) +endif () include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include") # Disable GCC warnings ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252124 - Fix build on Linux.
Author: chaoren Date: Wed Nov 4 19:23:19 2015 New Revision: 252124 URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev Log: Fix build on Linux. Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Wed Nov 4 19:23:19 2015 @@ -9,6 +9,8 @@ #include "PlatformiOSSimulatorCoreSimulatorSupport.h" +#if defined (__APPLE__) // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities + // C Includes // C++ Includes // Other libraries and framework includes @@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc return dev; } + +#endif // __APPLE__ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D12115: [LLDB-MI] Fix -data-info-line and -symbol-list-lines when Windows filenames are used.
Yeah, it seems like it's been passing for gcc-4.9 for a while now. Thanks for checking! On Wed, Nov 4, 2015 at 5:15 PM, Dawn Perchik wrote: > dawn marked an inline comment as done. > dawn added a comment. > > In http://reviews.llvm.org/D12115#248069, @chaoren wrote: > > > Could you please take a look at these issues? > > > > TestMiSymbol started to fail on Linux with gcc-4.9: > > > http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/6387 > > > Hi Chaoren, > I believe the issue with gcc was fixed for gcc a while back. Just > checking to make sure you're no longer seeing the failure. Let me know > otherwise. > > > > Comment at: lldb/trunk/tools/lldb-mi/MIUtilParse.h:13 > @@ +12,3 @@ > +// Third party headers: > +#include "../lib/Support/regex_impl.h" > + > > chaoren wrote: > > This caused a build failure on OS X: > > http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/5801 > This was fixed by Sean - the XCode build wasn't including the full set of > include paths when building lldb-mi. > > > Repository: > rL LLVM > > http://reviews.llvm.org/D12115 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D12115: [LLDB-MI] Fix -data-info-line and -symbol-list-lines when Windows filenames are used.
chaoren added a comment. Yeah, it seems like it's been passing for gcc-4.9 for a while now. Thanks for checking! Repository: rL LLVM http://reviews.llvm.org/D12115 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r252124 - Fix build on Linux.
Yeah, I just looked at PlatformDarwinKernel.cpp as example for a quick fix. I agree that kind of logic probably belongs in the CMakeLists.txt. On Wed, Nov 4, 2015 at 6:02 PM, Jason Molenda wrote: > You're making a valid point. I was only noting that this is not the first > instance where've conditionally compiled mac platform files. > > J > > > On Nov 4, 2015, at 6:00 PM, Jim Ingham wrote: > > > > Why? > > > > Jim > > > >> On Nov 4, 2015, at 5:43 PM, Jason Molenda wrote: > >> > >> We do the same thing in other MacOSX platform files where they depend > on Apple specific libraries. > >> > >> > >>> On Nov 4, 2015, at 5:39 PM, Jim Ingham via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >>> > >>> Why are we trying to build this at all on Linux? Seems odd to build > an empty file rather than just not build it. > >>> > >>> Jim > >>> > >>>> On Nov 4, 2015, at 5:23 PM, Chaoren Lin via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >>>> > >>>> Author: chaoren > >>>> Date: Wed Nov 4 19:23:19 2015 > >>>> New Revision: 252124 > >>>> > >>>> URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev > >>>> Log: > >>>> Fix build on Linux. > >>>> > >>>> Modified: > >>>> > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > >>>> > >>>> Modified: > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > >>>> URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff > >>>> > == > >>>> --- > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > (original) > >>>> +++ > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > Wed Nov 4 19:23:19 2015 > >>>> @@ -9,6 +9,8 @@ > >>>> > >>>> #include "PlatformiOSSimulatorCoreSimulatorSupport.h" > >>>> > >>>> +#if defined (__APPLE__) // This Plugin uses the Mac-specific > source/Host/macosx/cfcpp utilities > >>>> + > >>>> // C Includes > >>>> // C++ Includes > >>>> // Other libraries and framework includes > >>>> @@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc > >>>> > >>>> return dev; > >>>> } > >>>> + > >>>> +#endif // __APPLE__ > >>>> > >>>> > >>>> ___ > >>>> 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 mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r252124 - Fix build on Linux.
There's no simulator support outside of Darwin, so none of it should get used anyway. On Wed, Nov 4, 2015 at 6:08 PM, Jim Ingham wrote: > In this case it's even a little weirder, 'cause we compile a source file > that contains a class declaration (since the #if defined is after the > #include), but not the methods that aren't inlined. Then presumably link > in the .o file containing whatever was the result of that compilation. > That seems potentially harmful. > > Jim > > > > On Nov 4, 2015, at 6:02 PM, Jason Molenda wrote: > > > > You're making a valid point. I was only noting that this is not the > first instance where've conditionally compiled mac platform files. > > > > J > > > >> On Nov 4, 2015, at 6:00 PM, Jim Ingham wrote: > >> > >> Why? > >> > >> Jim > >> > >>> On Nov 4, 2015, at 5:43 PM, Jason Molenda wrote: > >>> > >>> We do the same thing in other MacOSX platform files where they depend > on Apple specific libraries. > >>> > >>> > >>>> On Nov 4, 2015, at 5:39 PM, Jim Ingham via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >>>> > >>>> Why are we trying to build this at all on Linux? Seems odd to build > an empty file rather than just not build it. > >>>> > >>>> Jim > >>>> > >>>>> On Nov 4, 2015, at 5:23 PM, Chaoren Lin via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >>>>> > >>>>> Author: chaoren > >>>>> Date: Wed Nov 4 19:23:19 2015 > >>>>> New Revision: 252124 > >>>>> > >>>>> URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev > >>>>> Log: > >>>>> Fix build on Linux. > >>>>> > >>>>> Modified: > >>>>> > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > >>>>> > >>>>> Modified: > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > >>>>> URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff > >>>>> > == > >>>>> --- > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > (original) > >>>>> +++ > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > Wed Nov 4 19:23:19 2015 > >>>>> @@ -9,6 +9,8 @@ > >>>>> > >>>>> #include "PlatformiOSSimulatorCoreSimulatorSupport.h" > >>>>> > >>>>> +#if defined (__APPLE__) // This Plugin uses the Mac-specific > source/Host/macosx/cfcpp utilities > >>>>> + > >>>>> // C Includes > >>>>> // C++ Includes > >>>>> // Other libraries and framework includes > >>>>> @@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc > >>>>> > >>>>> return dev; > >>>>> } > >>>>> + > >>>>> +#endif // __APPLE__ > >>>>> > >>>>> > >>>>> ___ > >>>>> 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 mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252133 - Fix TestGoFormatters.py.
Author: chaoren Date: Wed Nov 4 20:17:21 2015 New Revision: 252133 URL: http://llvm.org/viewvc/llvm-project?rev=252133&view=rev Log: Fix TestGoFormatters.py. Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py?rev=252133&r1=252132&r2=252133&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py Wed Nov 4 20:17:21 2015 @@ -3,14 +3,13 @@ import os, time import unittest2 import lldb -import lldbutil -from lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * class TestGoLanguage(TestBase): mydir = TestBase.compute_mydir(__file__) -@python_api_test @skipIfFreeBSD # llvm.org/pr24895 triggers assertion failure @skipIfRemote # Not remote test suite ready @no_debug_info_test ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r252124 - Fix build on Linux.
Yeah, it fails to build if we don't have objc too. I'll upload an update. On Wed, Nov 4, 2015 at 6:12 PM, Jim Ingham wrote: > Yeah, sure. But I bet you could figure out something to put in > PlatformiOSSimulatorCoreSimulatorSupport.h that would cause this to fail to > link except on OS X. Not that that's likely, but as a general strategy it > seems wrong. > > Jim > > > On Nov 4, 2015, at 6:09 PM, Chaoren Lin wrote: > > > > There's no simulator support outside of Darwin, so none of it should get > used anyway. > > > > On Wed, Nov 4, 2015 at 6:08 PM, Jim Ingham wrote: > > In this case it's even a little weirder, 'cause we compile a source file > that contains a class declaration (since the #if defined is after the > #include), but not the methods that aren't inlined. Then presumably link > in the .o file containing whatever was the result of that compilation. > That seems potentially harmful. > > > > Jim > > > > > > > On Nov 4, 2015, at 6:02 PM, Jason Molenda wrote: > > > > > > You're making a valid point. I was only noting that this is not the > first instance where've conditionally compiled mac platform files. > > > > > > J > > > > > >> On Nov 4, 2015, at 6:00 PM, Jim Ingham wrote: > > >> > > >> Why? > > >> > > >> Jim > > >> > > >>> On Nov 4, 2015, at 5:43 PM, Jason Molenda > wrote: > > >>> > > >>> We do the same thing in other MacOSX platform files where they > depend on Apple specific libraries. > > >>> > > >>> > > >>>> On Nov 4, 2015, at 5:39 PM, Jim Ingham via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > >>>> > > >>>> Why are we trying to build this at all on Linux? Seems odd to > build an empty file rather than just not build it. > > >>>> > > >>>> Jim > > >>>> > > >>>>> On Nov 4, 2015, at 5:23 PM, Chaoren Lin via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > >>>>> > > >>>>> Author: chaoren > > >>>>> Date: Wed Nov 4 19:23:19 2015 > > >>>>> New Revision: 252124 > > >>>>> > > >>>>> URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev > > >>>>> Log: > > >>>>> Fix build on Linux. > > >>>>> > > >>>>> Modified: > > >>>>> > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > > >>>>> > > >>>>> Modified: > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > > >>>>> URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff > > >>>>> > == > > >>>>> --- > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > (original) > > >>>>> +++ > lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm > Wed Nov 4 19:23:19 2015 > > >>>>> @@ -9,6 +9,8 @@ > > >>>>> > > >>>>> #include "PlatformiOSSimulatorCoreSimulatorSupport.h" > > >>>>> > > >>>>> +#if defined (__APPLE__) // This Plugin uses the Mac-specific > source/Host/macosx/cfcpp utilities > > >>>>> + > > >>>>> // C Includes > > >>>>> // C++ Includes > > >>>>> // Other libraries and framework includes > > >>>>> @@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc > > >>>>> > > >>>>> return dev; > > >>>>> } > > >>>>> + > > >>>>> +#endif // __APPLE__ > > >>>>> > > >>>>> > > >>>>> ___ > > >>>>> 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 mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14365: Fix build for platforms without ObjC++.
chaoren created this revision. chaoren added reviewers: jingham, jasonmolenda. chaoren added a subscriber: lldb-commits. http://reviews.llvm.org/D14365 Files: source/Plugins/Platform/MacOSX/CMakeLists.txt source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm === --- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -9,8 +9,6 @@ #include "PlatformiOSSimulatorCoreSimulatorSupport.h" -#if defined (__APPLE__) // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities - // C Includes // C++ Includes // Other libraries and framework includes @@ -773,5 +771,3 @@ return dev; } - -#endif // __APPLE__ Index: source/Plugins/Platform/MacOSX/CMakeLists.txt === --- source/Plugins/Platform/MacOSX/CMakeLists.txt +++ source/Plugins/Platform/MacOSX/CMakeLists.txt @@ -1,9 +1,16 @@ -add_lldb_library(lldbPluginPlatformMacOSX +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp PlatformiOSSimulator.cpp - PlatformiOSSimulatorCoreSimulatorSupport.mm PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES + PlatformiOSSimulatorCoreSimulatorSupport.mm + ) +endif() + +add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES}) Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm === --- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -9,8 +9,6 @@ #include "PlatformiOSSimulatorCoreSimulatorSupport.h" -#if defined (__APPLE__) // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities - // C Includes // C++ Includes // Other libraries and framework includes @@ -773,5 +771,3 @@ return dev; } - -#endif // __APPLE__ Index: source/Plugins/Platform/MacOSX/CMakeLists.txt === --- source/Plugins/Platform/MacOSX/CMakeLists.txt +++ source/Plugins/Platform/MacOSX/CMakeLists.txt @@ -1,9 +1,16 @@ -add_lldb_library(lldbPluginPlatformMacOSX +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp PlatformiOSSimulator.cpp - PlatformiOSSimulatorCoreSimulatorSupport.mm PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES + PlatformiOSSimulatorCoreSimulatorSupport.mm + ) +endif() + +add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES}) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14365: Fix build for platforms without ObjC++.
This revision was automatically updated to reflect the committed changes. Closed by commit rL252143: Fix build for platforms without ObjC++. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D14365?vs=39305&id=39309#toc Repository: rL LLVM http://reviews.llvm.org/D14365 Files: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm === --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -9,8 +9,6 @@ #include "PlatformiOSSimulatorCoreSimulatorSupport.h" -#if defined (__APPLE__) // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities - // C Includes // C++ Includes // Other libraries and framework includes @@ -773,5 +771,3 @@ return dev; } - -#endif // __APPLE__ Index: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt === --- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt +++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt @@ -1,9 +1,16 @@ -add_lldb_library(lldbPluginPlatformMacOSX +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp PlatformiOSSimulator.cpp - PlatformiOSSimulatorCoreSimulatorSupport.mm PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES + PlatformiOSSimulatorCoreSimulatorSupport.mm + ) +endif() + +add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES}) Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm === --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -9,8 +9,6 @@ #include "PlatformiOSSimulatorCoreSimulatorSupport.h" -#if defined (__APPLE__) // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities - // C Includes // C++ Includes // Other libraries and framework includes @@ -773,5 +771,3 @@ return dev; } - -#endif // __APPLE__ Index: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt === --- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt +++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt @@ -1,9 +1,16 @@ -add_lldb_library(lldbPluginPlatformMacOSX +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp PlatformiOSSimulator.cpp - PlatformiOSSimulatorCoreSimulatorSupport.mm PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES + PlatformiOSSimulatorCoreSimulatorSupport.mm + ) +endif() + +add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES}) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252143 - Fix build for platforms without ObjC++.
Author: chaoren Date: Wed Nov 4 21:30:45 2015 New Revision: 252143 URL: http://llvm.org/viewvc/llvm-project?rev=252143&view=rev Log: Fix build for platforms without ObjC++. Reviewers: jingham, jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14365 Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252143&r1=252142&r2=252143&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Wed Nov 4 21:30:45 2015 @@ -1,9 +1,16 @@ -add_lldb_library(lldbPluginPlatformMacOSX +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp PlatformiOSSimulator.cpp - PlatformiOSSimulatorCoreSimulatorSupport.mm PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") +list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES + PlatformiOSSimulatorCoreSimulatorSupport.mm + ) +endif() + +add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES}) Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252143&r1=252142&r2=252143&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Wed Nov 4 21:30:45 2015 @@ -9,8 +9,6 @@ #include "PlatformiOSSimulatorCoreSimulatorSupport.h" -#if defined (__APPLE__) // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities - // C Includes // C++ Includes // Other libraries and framework includes @@ -773,5 +771,3 @@ CoreSimulatorSupport::DeviceSet::GetFanc return dev; } - -#endif // __APPLE__ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14388: Use lldb::pid_t instead of pid_t.
chaoren created this revision. chaoren added a reviewer: granata.enrico. chaoren added a subscriber: lldb-commits. http://reviews.llvm.org/D14388 Files: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm === --- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -47,10 +47,10 @@ - (NSUInteger) state; - (BOOL) shutdownWithError:(NSError **)error; - (NSUUID *) UDID; -- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; +- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; @end -CoreSimulatorSupport::Process::Process (pid_t p) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p) : m_pid (p), m_error () { @@ -62,7 +62,7 @@ { } -CoreSimulatorSupport::Process::Process (pid_t p, Error error) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) : m_pid (p), m_error (error) { @@ -661,7 +661,7 @@ NSError* nserror; -pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] +lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] options: options terminationHandler: nil error: &nserror]; Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h === --- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h +++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h @@ -36,7 +36,7 @@ class Process { public: -pid_t +lldb::pid_t GetPID () { return m_pid; @@ -54,13 +54,13 @@ } private: -Process (pid_t p); +Process (lldb::pid_t p); Process(lldb_private::Error error); -Process (pid_t p, lldb_private::Error error); +Process (lldb::pid_t p, lldb_private::Error error); -pid_t m_pid; +lldb::pid_t m_pid; lldb_private::Error m_error; friend class Device; Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm === --- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -47,10 +47,10 @@ - (NSUInteger) state; - (BOOL) shutdownWithError:(NSError **)error; - (NSUUID *) UDID; -- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; +- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; @end -CoreSimulatorSupport::Process::Process (pid_t p) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p) : m_pid (p), m_error () { @@ -62,7 +62,7 @@ { } -CoreSimulatorSupport::Process::Process (pid_t p, Error error) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) : m_pid (p), m_error (error) { @@ -661,7 +661,7 @@ NSError* nserror; -pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] +lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] options: options terminationHandler: nil error: &nserror]; Index: source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h === --- source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h +++ source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h @@ -36,7 +36,7 @@ class Process { public: -pid_t +lldb::pid_t GetPID () { return m_pid; @@ -54,13 +54,13 @@ } private: -Process (pid_t p); +Process (lldb::pid_t p); Process(lldb_private::Error error); -Process (pid_t p, lldb_private::Error error); +Process (lldb::pi
Re: [Lldb-commits] [PATCH] D14388: Use lldb::pid_t instead of pid_t.
This revision was automatically updated to reflect the committed changes. Closed by commit rL252183: Use lldb::pid_t instead of pid_t. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D14388?vs=39384&id=39387#toc Repository: rL LLVM http://reviews.llvm.org/D14388 Files: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm === --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -47,10 +47,10 @@ - (NSUInteger) state; - (BOOL) shutdownWithError:(NSError **)error; - (NSUUID *) UDID; -- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; +- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; @end -CoreSimulatorSupport::Process::Process (pid_t p) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p) : m_pid (p), m_error () { @@ -62,7 +62,7 @@ { } -CoreSimulatorSupport::Process::Process (pid_t p, Error error) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) : m_pid (p), m_error (error) { @@ -661,7 +661,7 @@ NSError* nserror; -pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] +lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] options: options terminationHandler: nil error: &nserror]; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h === --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h @@ -36,7 +36,7 @@ class Process { public: -pid_t +lldb::pid_t GetPID () { return m_pid; @@ -54,13 +54,13 @@ } private: -Process (pid_t p); +Process (lldb::pid_t p); Process(lldb_private::Error error); -Process (pid_t p, lldb_private::Error error); +Process (lldb::pid_t p, lldb_private::Error error); -pid_t m_pid; +lldb::pid_t m_pid; lldb_private::Error m_error; friend class Device; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm === --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm @@ -47,10 +47,10 @@ - (NSUInteger) state; - (BOOL) shutdownWithError:(NSError **)error; - (NSUUID *) UDID; -- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; +- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; @end -CoreSimulatorSupport::Process::Process (pid_t p) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p) : m_pid (p), m_error () { @@ -62,7 +62,7 @@ { } -CoreSimulatorSupport::Process::Process (pid_t p, Error error) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) : m_pid (p), m_error (error) { @@ -661,7 +661,7 @@ NSError* nserror; -pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] +lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] options: options terminationHandler: nil error: &nserror]; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h === --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h @@ -36,7 +36,7 @@ class Process { public: -pid_t +lldb::pid_t
[Lldb-commits] [lldb] r252183 - Use lldb::pid_t instead of pid_t.
Author: chaoren Date: Thu Nov 5 12:49:03 2015 New Revision: 252183 URL: http://llvm.org/viewvc/llvm-project?rev=252183&view=rev Log: Use lldb::pid_t instead of pid_t. Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14388 Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h?rev=252183&r1=252182&r2=252183&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h Thu Nov 5 12:49:03 2015 @@ -36,7 +36,7 @@ namespace CoreSimulatorSupport class Process { public: -pid_t +lldb::pid_t GetPID () { return m_pid; @@ -54,13 +54,13 @@ namespace CoreSimulatorSupport } private: -Process (pid_t p); +Process (lldb::pid_t p); Process(lldb_private::Error error); -Process (pid_t p, lldb_private::Error error); +Process (lldb::pid_t p, lldb_private::Error error); -pid_t m_pid; +lldb::pid_t m_pid; lldb_private::Error m_error; friend class Device; Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252183&r1=252182&r2=252183&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Thu Nov 5 12:49:03 2015 @@ -47,10 +47,10 @@ using namespace lldb_utility; - (NSUInteger) state; - (BOOL) shutdownWithError:(NSError **)error; - (NSUUID *) UDID; -- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; +- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options terminationHandler:(void (^)(int status)) terminationHandler error:(NSError **)error; @end -CoreSimulatorSupport::Process::Process (pid_t p) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p) : m_pid (p), m_error () { @@ -62,7 +62,7 @@ CoreSimulatorSupport::Process::Process(E { } -CoreSimulatorSupport::Process::Process (pid_t p, Error error) : +CoreSimulatorSupport::Process::Process (lldb::pid_t p, Error error) : m_pid (p), m_error (error) { @@ -661,7 +661,7 @@ CoreSimulatorSupport::Device::Spawn (Pro NSError* nserror; -pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] +lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: launch_info.GetExecutableFile().GetPath().c_str()] options: options terminationHandler: nil error: &nserror]; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252182 - Revert "Do not build any of the simulator material on non-Darwin"
Author: chaoren Date: Thu Nov 5 12:49:02 2015 New Revision: 252182 URL: http://llvm.org/viewvc/llvm-project?rev=252182&view=rev Log: Revert "Do not build any of the simulator material on non-Darwin" This breaks the cmake build on all non-darwin platforms. This reverts commit ff6cc332dd6654620e3408d06f8f49a0c9b3cd41. rL252179 Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252182&r1=252181&r2=252182&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Thu Nov 5 12:49:02 2015 @@ -1,15 +1,15 @@ list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES + PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp + PlatformiOSSimulator.cpp PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES - PlatformAppleSimulator.cpp PlatformiOSSimulatorCoreSimulatorSupport.mm - PlatformiOSSimulator.cpp ) endif() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.
chaoren created this revision. chaoren added reviewers: granata.enrico, tberghammer, zturner, jingham. chaoren added a subscriber: lldb-commits. This is a resubmission of r252179, but correctly ignores the source files for other platforms. http://reviews.llvm.org/D14389 Files: source/Initialization/SystemInitializerCommon.cpp source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp source/Plugins/Platform/MacOSX/CMakeLists.txt Index: source/Plugins/Platform/MacOSX/CMakeLists.txt === --- source/Plugins/Platform/MacOSX/CMakeLists.txt +++ source/Plugins/Platform/MacOSX/CMakeLists.txt @@ -1,16 +1,22 @@ list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES - PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp - PlatformiOSSimulator.cpp PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) -if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES +list(APPEND PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES + PlatformAppleSimulator.cpp + PlatformiOSSimulator.cpp PlatformiOSSimulatorCoreSimulatorSupport.mm ) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES +${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES}) +else() + list(APPEND LLVM_OPTIONAL_SOURCES +${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES}) endif() add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES}) Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp === --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -60,7 +60,9 @@ #include "AppleObjCDeclVendor.h" #include "AppleObjCTrampolineHandler.h" +#if defined(__APPLE__) #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" +#endif using namespace lldb; using namespace lldb_private; @@ -1765,7 +1767,8 @@ { if (m_noclasses_warning_emitted) return; - + +#if defined(__APPLE__) if (m_process && m_process->GetTarget().GetPlatform() && m_process->GetTarget().GetPlatform()->GetPluginName() == PlatformiOSSimulator::GetPluginNameStatic()) @@ -1775,7 +1778,8 @@ m_noclasses_warning_emitted = true; return; } - +#endif + Debugger &debugger(GetProcess()->GetTarget().GetDebugger()); if (debugger.GetAsyncOutputStream()) Index: source/Initialization/SystemInitializerCommon.cpp === --- source/Initialization/SystemInitializerCommon.cpp +++ source/Initialization/SystemInitializerCommon.cpp @@ -31,13 +31,13 @@ #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h" #include "Plugins/Platform/Kalimba/PlatformKalimba.h" #include "Plugins/Platform/Linux/PlatformLinux.h" -#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #include "Plugins/Platform/MacOSX/PlatformMacOSX.h" #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" #include "Plugins/Platform/Windows/PlatformWindows.h" #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h" #if defined(__APPLE__) +#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h" #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h" @@ -130,9 +130,9 @@ PlatformRemoteiOS::Initialize(); PlatformMacOSX::Initialize(); -PlatformiOSSimulator::Initialize(); #if defined(__APPLE__) +PlatformiOSSimulator::Initialize(); DynamicLoaderDarwinKernel::Initialize(); PlatformDarwinKernel::Initialize(); ObjectFileMachO::Initialize(); @@ -168,7 +168,6 @@ ObjectContainerUniversalMachO::Terminate(); PlatformMacOSX::Terminate(); PlatformRemoteiOS::Terminate(); -PlatformiOSSimulator::Terminate(); ClangASTContext::Terminate(); GoASTContext::Terminate(); @@ -178,6 +177,7 @@ EmulateInstructionMIPS64::Terminate(); #if defined(__APPLE__) +PlatformiOSSimulator::Terminate(); DynamicLoaderDarwinKernel::Terminate(); ObjectFileMachO::Terminate(); PlatformDarwinKernel::Terminate(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.
chaoren added a comment. LLVM_OPTIONAL_SOURCES should avoid that. http://reviews.llvm.org/D14389 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.
chaoren added a comment. It's not actually CMake complaining but the LLVM cmake scripts. http://reviews.llvm.org/D14389 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.
chaoren added a comment. I haven't seen anything else that uses LLVM_OPTIONAL_SOURCES, but it's conceivable that there might be items in the list already, and I would like to avoid doing anything to it besides just appending. http://reviews.llvm.org/D14389 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14389: Completely avoid building Apple simulator on non-Darwin platforms.
This revision was automatically updated to reflect the committed changes. Closed by commit rL252205: Completely avoid building Apple simulator on non-Darwin platforms. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D14389?vs=39394&id=39402#toc Repository: rL LLVM http://reviews.llvm.org/D14389 Files: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Index: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp === --- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp +++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp @@ -31,13 +31,13 @@ #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h" #include "Plugins/Platform/Kalimba/PlatformKalimba.h" #include "Plugins/Platform/Linux/PlatformLinux.h" -#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #include "Plugins/Platform/MacOSX/PlatformMacOSX.h" #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" #include "Plugins/Platform/Windows/PlatformWindows.h" #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h" #if defined(__APPLE__) +#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h" #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h" @@ -130,9 +130,9 @@ PlatformRemoteiOS::Initialize(); PlatformMacOSX::Initialize(); -PlatformiOSSimulator::Initialize(); #if defined(__APPLE__) +PlatformiOSSimulator::Initialize(); DynamicLoaderDarwinKernel::Initialize(); PlatformDarwinKernel::Initialize(); ObjectFileMachO::Initialize(); @@ -168,7 +168,6 @@ ObjectContainerUniversalMachO::Terminate(); PlatformMacOSX::Terminate(); PlatformRemoteiOS::Terminate(); -PlatformiOSSimulator::Terminate(); ClangASTContext::Terminate(); GoASTContext::Terminate(); @@ -178,6 +177,7 @@ EmulateInstructionMIPS64::Terminate(); #if defined(__APPLE__) +PlatformiOSSimulator::Terminate(); DynamicLoaderDarwinKernel::Terminate(); ObjectFileMachO::Terminate(); PlatformDarwinKernel::Terminate(); Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp === --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -60,7 +60,9 @@ #include "AppleObjCDeclVendor.h" #include "AppleObjCTrampolineHandler.h" +#if defined(__APPLE__) #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" +#endif using namespace lldb; using namespace lldb_private; @@ -1765,7 +1767,8 @@ { if (m_noclasses_warning_emitted) return; - + +#if defined(__APPLE__) if (m_process && m_process->GetTarget().GetPlatform() && m_process->GetTarget().GetPlatform()->GetPluginName() == PlatformiOSSimulator::GetPluginNameStatic()) @@ -1775,7 +1778,8 @@ m_noclasses_warning_emitted = true; return; } - +#endif + Debugger &debugger(GetProcess()->GetTarget().GetDebugger()); if (debugger.GetAsyncOutputStream()) Index: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt === --- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt +++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt @@ -1,16 +1,22 @@ list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES - PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp - PlatformiOSSimulator.cpp PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) -if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES +list(APPEND PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES + PlatformAppleSimulator.cpp + PlatformiOSSimulator.cpp PlatformiOSSimulatorCoreSimulatorSupport.mm ) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES +${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES}) +else() + list(APPEND LLVM_OPTIONAL_SOURCES +${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES}) endif() add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES}) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252205 - Completely avoid building Apple simulator on non-Darwin platforms.
Author: chaoren Date: Thu Nov 5 14:45:29 2015 New Revision: 252205 URL: http://llvm.org/viewvc/llvm-project?rev=252205&view=rev Log: Completely avoid building Apple simulator on non-Darwin platforms. Summary: This is a resubmission of r252179, but correctly ignores the source files for other platforms. Reviewers: granata.enrico, tberghammer, zturner, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14389 Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=252205&r1=252204&r2=252205&view=diff == --- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original) +++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Thu Nov 5 14:45:29 2015 @@ -31,13 +31,13 @@ #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h" #include "Plugins/Platform/Kalimba/PlatformKalimba.h" #include "Plugins/Platform/Linux/PlatformLinux.h" -#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #include "Plugins/Platform/MacOSX/PlatformMacOSX.h" #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" #include "Plugins/Platform/Windows/PlatformWindows.h" #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h" #if defined(__APPLE__) +#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h" #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h" @@ -130,9 +130,9 @@ SystemInitializerCommon::Initialize() PlatformRemoteiOS::Initialize(); PlatformMacOSX::Initialize(); -PlatformiOSSimulator::Initialize(); #if defined(__APPLE__) +PlatformiOSSimulator::Initialize(); DynamicLoaderDarwinKernel::Initialize(); PlatformDarwinKernel::Initialize(); ObjectFileMachO::Initialize(); @@ -168,7 +168,6 @@ SystemInitializerCommon::Terminate() ObjectContainerUniversalMachO::Terminate(); PlatformMacOSX::Terminate(); PlatformRemoteiOS::Terminate(); -PlatformiOSSimulator::Terminate(); ClangASTContext::Terminate(); GoASTContext::Terminate(); @@ -178,6 +177,7 @@ SystemInitializerCommon::Terminate() EmulateInstructionMIPS64::Terminate(); #if defined(__APPLE__) +PlatformiOSSimulator::Terminate(); DynamicLoaderDarwinKernel::Terminate(); ObjectFileMachO::Terminate(); PlatformDarwinKernel::Terminate(); 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=252205&r1=252204&r2=252205&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Thu Nov 5 14:45:29 2015 @@ -60,7 +60,9 @@ #include "AppleObjCDeclVendor.h" #include "AppleObjCTrampolineHandler.h" +#if defined(__APPLE__) #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" +#endif using namespace lldb; using namespace lldb_private; @@ -1765,7 +1767,8 @@ AppleObjCRuntimeV2::WarnIfNoClassesCache { if (m_noclasses_warning_emitted) return; - + +#if defined(__APPLE__) if (m_process && m_process->GetTarget().GetPlatform() && m_process->GetTarget().GetPlatform()->GetPluginName() == PlatformiOSSimulator::GetPluginNameStatic()) @@ -1775,7 +1778,8 @@ AppleObjCRuntimeV2::WarnIfNoClassesCache m_noclasses_warning_emitted = true; return; } - +#endif + Debugger &debugger(GetProcess()->GetTarget().GetDebugger()); if (debugger.GetAsyncOutputStream()) Modified: lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt?rev=252205&r1=252204&r2=252205&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/CMakeLists.txt Thu Nov 5 14:45:29 2015 @@ -1,16 +1,22 @@ list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES - PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp - PlatformiOSSimulator.cpp PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) -if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES +list(APPEND PLUGIN
Re: [Lldb-commits] [lldb] r252191 - Python 3 - Turn on absolute imports, and fix existing imports.
Hi, I think this changed caused all of the OS X tests to fail: http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/6969/steps/test1/logs/stdio with this error: Traceback (most recent call last): File "/Users/lldb_build/lldbSlave/buildDir/scripts/../lldb/test/dotest.py", line 7, in lldbsuite.test.run_suite() File "/Users/lldb_build/lldbSlave/buildDir/lldb/packages/Python/lldbsuite/test/dotest.py", line 1487, in run_suite setupCrashInfoHook() File "/Users/lldb_build/lldbSlave/buildDir/lldb/packages/Python/lldbsuite/test/dotest.py", line 390, in setupCrashInfoHook import lock ImportError: No module named lock On Thu, Nov 5, 2015 at 11:22 AM, Zachary Turner via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: zturner > Date: Thu Nov 5 13:22:28 2015 > New Revision: 252191 > > URL: http://llvm.org/viewvc/llvm-project?rev=252191&view=rev > Log: > Python 3 - Turn on absolute imports, and fix existing imports. > > Absolute imports were introduced in Python 2.5 as a feature > (e.g. from __future__ import absolute_import), and made default > in Python 3. > > When absolute imports are enabled, the import system changes in > a couple of ways: > > 1) The `import foo` syntax will *only* search sys.path. If `foo` >isn't in sys.path, it won't be found. Period. Without absolute >imports, the import system will also search the same directory >that the importing file resides in, so that you can easily >import from the same folder. > > 2) From inside a package, you can use a dot syntax to refer to higher >levels of the current package. For example, if you are in the >package lldbsuite.test.utility, then ..foo refers to >lldbsuite.test.foo. You can use this notation with the >`from X import Y` syntax to write intra-package references. For >example, using the previous locationa s a starting point, writing >`from ..support import seven` would import lldbsuite.support.seven > > Since this is now the default behavior in Python 3, this means that > importing from the same directory with `import foo` *no longer works*. > As a result, the only way to have portable code is to force absolute > imports for all versions of Python. > > See PEP 0328 [https://www.python.org/dev/peps/pep-0328/] for more > information about absolute and relative imports. > > Differential Revision: http://reviews.llvm.org/D14342 > Reviewed By: Todd Fiala > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/__init__.py > lldb/trunk/packages/Python/lldbsuite/test/bench.py > lldb/trunk/packages/Python/lldbsuite/test/curses_results.py > lldb/trunk/packages/Python/lldbsuite/test/dosep.py > lldb/trunk/packages/Python/lldbsuite/test/dotest.py > lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py > lldb/trunk/packages/Python/lldbsuite/test/dotest_channels.py > lldb/trunk/packages/Python/lldbsuite/test/lldb_pylint_helper.py > lldb/trunk/packages/Python/lldbsuite/test/lldbbench.py > lldb/trunk/packages/Python/lldbsuite/test/lldbcurses.py > lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py > lldb/trunk/packages/Python/lldbsuite/test/lldbpexpect.py > lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py > lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py > lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py > lldb/trunk/packages/Python/lldbsuite/test/test_categories.py > lldb/trunk/packages/Python/lldbsuite/test/test_results.py > > Modified: lldb/trunk/packages/Python/lldbsuite/test/__init__.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/__init__.py?rev=252191&r1=252190&r2=252191&view=diff > > == > --- lldb/trunk/packages/Python/lldbsuite/test/__init__.py (original) > +++ lldb/trunk/packages/Python/lldbsuite/test/__init__.py Thu Nov 5 > 13:22:28 2015 > @@ -1,4 +1,6 @@ > # Module level initialization for the `lldbsuite.test` module. > > -import dotest > +from __future__ import absolute_import > + > +from . import dotest > run_suite = dotest.run_suite > > Modified: lldb/trunk/packages/Python/lldbsuite/test/bench.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/bench.py?rev=252191&r1=252190&r2=252191&view=diff > > == > --- lldb/trunk/packages/Python/lldbsuite/test/bench.py (original) > +++ lldb/trunk/packages/Python/lldbsuite/test/bench.py Thu Nov 5 13:22:28 > 2015 > @@ -15,6 +15,7 @@ See also bench-history. > """ > > from __future__ import print_function > +from __future__ import absolute_import > > import os, sys > import re > > Modified: lldb/trunk/packages/Python/lldbsuite/test/curses_results.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/curses_results.py?rev=252191&r1=252190&r2=252191&view=diff
[Lldb-commits] [lldb] r252218 - Fix OS X tests.
Author: chaoren Date: Thu Nov 5 16:00:47 2015 New Revision: 252218 URL: http://llvm.org/viewvc/llvm-project?rev=252218&view=rev Log: Fix OS X tests. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252218&r1=252217&r2=252218&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Thu Nov 5 16:00:47 2015 @@ -387,7 +387,7 @@ def setupCrashInfoHook(): global setCrashInfoHook setCrashInfoHook = setCrashInfoHook_NonMac # safe default if platform.system() == "Darwin": -import lock +from . import lock test_dir = os.environ['LLDB_TEST'] if not test_dir or not os.path.exists(test_dir): return ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r252191 - Python 3 - Turn on absolute imports, and fix existing imports.
rL252218 should hopefully fix it. On Thu, Nov 5, 2015 at 1:53 PM, Chaoren Lin wrote: > Hi, I think this changed caused all of the OS X tests to fail: > > > http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/6969/steps/test1/logs/stdio > > with this error: > > Traceback (most recent call last): > File "/Users/lldb_build/lldbSlave/buildDir/scripts/../lldb/test/dotest.py", > line 7, in > lldbsuite.test.run_suite() > File > "/Users/lldb_build/lldbSlave/buildDir/lldb/packages/Python/lldbsuite/test/dotest.py", > line 1487, in run_suite > setupCrashInfoHook() > File > "/Users/lldb_build/lldbSlave/buildDir/lldb/packages/Python/lldbsuite/test/dotest.py", > line 390, in setupCrashInfoHook > import lock > ImportError: No module named lock > > > On Thu, Nov 5, 2015 at 11:22 AM, Zachary Turner via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >> Author: zturner >> Date: Thu Nov 5 13:22:28 2015 >> New Revision: 252191 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=252191&view=rev >> Log: >> Python 3 - Turn on absolute imports, and fix existing imports. >> >> Absolute imports were introduced in Python 2.5 as a feature >> (e.g. from __future__ import absolute_import), and made default >> in Python 3. >> >> When absolute imports are enabled, the import system changes in >> a couple of ways: >> >> 1) The `import foo` syntax will *only* search sys.path. If `foo` >>isn't in sys.path, it won't be found. Period. Without absolute >>imports, the import system will also search the same directory >>that the importing file resides in, so that you can easily >>import from the same folder. >> >> 2) From inside a package, you can use a dot syntax to refer to higher >>levels of the current package. For example, if you are in the >>package lldbsuite.test.utility, then ..foo refers to >>lldbsuite.test.foo. You can use this notation with the >>`from X import Y` syntax to write intra-package references. For >>example, using the previous locationa s a starting point, writing >>`from ..support import seven` would import lldbsuite.support.seven >> >> Since this is now the default behavior in Python 3, this means that >> importing from the same directory with `import foo` *no longer works*. >> As a result, the only way to have portable code is to force absolute >> imports for all versions of Python. >> >> See PEP 0328 [https://www.python.org/dev/peps/pep-0328/] for more >> information about absolute and relative imports. >> >> Differential Revision: http://reviews.llvm.org/D14342 >> Reviewed By: Todd Fiala >> >> Modified: >> lldb/trunk/packages/Python/lldbsuite/test/__init__.py >> lldb/trunk/packages/Python/lldbsuite/test/bench.py >> lldb/trunk/packages/Python/lldbsuite/test/curses_results.py >> lldb/trunk/packages/Python/lldbsuite/test/dosep.py >> lldb/trunk/packages/Python/lldbsuite/test/dotest.py >> lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py >> lldb/trunk/packages/Python/lldbsuite/test/dotest_channels.py >> lldb/trunk/packages/Python/lldbsuite/test/lldb_pylint_helper.py >> lldb/trunk/packages/Python/lldbsuite/test/lldbbench.py >> lldb/trunk/packages/Python/lldbsuite/test/lldbcurses.py >> lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py >> lldb/trunk/packages/Python/lldbsuite/test/lldbpexpect.py >> lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py >> lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py >> lldb/trunk/packages/Python/lldbsuite/test/lldbutil.py >> lldb/trunk/packages/Python/lldbsuite/test/test_categories.py >> lldb/trunk/packages/Python/lldbsuite/test/test_results.py >> >> Modified: lldb/trunk/packages/Python/lldbsuite/test/__init__.py >> URL: >> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/__init__.py?rev=252191&r1=252190&r2=252191&view=diff >> >> == >> --- lldb/trunk/packages/Python/lldbsuite/test/__init__.py (original) >> +++ lldb/trunk/packages/Python/lldbsuite/test/__init__.py Thu Nov 5 >> 13:22:28 2015 >> @@ -1,4 +1,6 @@ >> # Module level initialization for the `lldbsuite.test` module. >> >> -import dotest >> +from __future__ import absolute_import >> + >> +from . import dotest >> run_suite = dotest.run_suite >> >> Mod
[Lldb-commits] [lldb] r252230 - Another import fix for OS X.
Author: chaoren Date: Thu Nov 5 17:19:27 2015 New Revision: 252230 URL: http://llvm.org/viewvc/llvm-project?rev=252230&view=rev Log: Another import fix for OS X. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252230&r1=252229&r2=252230&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Thu Nov 5 17:19:27 2015 @@ -364,7 +364,7 @@ o GDB_REMOTE_LOG: if defined, specifies def setCrashInfoHook_Mac(text): -import crashinfo +from . import crashinfo crashinfo.setCrashReporterDescription(text) # implement this in some suitable way for your platform, and then bind it ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252353 - Fix Linux tests after r252348.
Author: chaoren Date: Fri Nov 6 16:30:30 2015 New Revision: 252353 URL: http://llvm.org/viewvc/llvm-project?rev=252353&view=rev Log: Fix Linux tests after r252348. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252353&r1=252352&r2=252353&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Fri Nov 6 16:30:30 2015 @@ -1727,6 +1727,7 @@ def run_suite(): if iterArchs or iterCompilers: # Translate ' ' to '-' for pathname component. if six.PY2: +import string tbl = string.maketrans(' ', '-') else: tbl = str.maketrans(' ', '-') ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14472: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.
chaoren created this revision. chaoren added reviewers: sivachandra, jingham. chaoren added a subscriber: lldb-commits. On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the previous stop. http://reviews.llvm.org/D14472 Files: source/Target/ThreadList.cpp Index: source/Target/ThreadList.cpp === --- source/Target/ThreadList.cpp +++ source/Target/ThreadList.cpp @@ -262,7 +262,11 @@ // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } Index: source/Target/ThreadList.cpp === --- source/Target/ThreadList.cpp +++ source/Target/ThreadList.cpp @@ -262,7 +262,11 @@ // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252391 - Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.
Author: chaoren Date: Fri Nov 6 20:16:31 2015 New Revision: 252391 URL: http://llvm.org/viewvc/llvm-project?rev=252391&view=rev Log: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355. Summary: On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the previous stop. Reviewers: sivachandra, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14472 Modified: lldb/trunk/source/Target/ThreadList.cpp Modified: lldb/trunk/source/Target/ThreadList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=252391&r1=252390&r2=252391&view=diff == --- lldb/trunk/source/Target/ThreadList.cpp (original) +++ lldb/trunk/source/Target/ThreadList.cpp Fri Nov 6 20:16:31 2015 @@ -262,7 +262,11 @@ ThreadList::ShouldStop (Event *event_ptr // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14472: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.
This revision was automatically updated to reflect the committed changes. Closed by commit rL252391: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D14472?vs=39615&id=39616#toc Repository: rL LLVM http://reviews.llvm.org/D14472 Files: lldb/trunk/source/Target/ThreadList.cpp Index: lldb/trunk/source/Target/ThreadList.cpp === --- lldb/trunk/source/Target/ThreadList.cpp +++ lldb/trunk/source/Target/ThreadList.cpp @@ -262,7 +262,11 @@ // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } Index: lldb/trunk/source/Target/ThreadList.cpp === --- lldb/trunk/source/Target/ThreadList.cpp +++ lldb/trunk/source/Target/ThreadList.cpp @@ -262,7 +262,11 @@ // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D19680: XFail TestBitfields.py Python API tests.
chaoren created this revision. chaoren added reviewers: labath, tfiala. chaoren added a subscriber: lldb-commits. Started failing after r267895. Possibly related to llvm.org/pr27510. http://reviews.llvm.org/D19680 Files: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py === --- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py +++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py @@ -108,6 +108,7 @@ @add_test_categories(['pyapi']) @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800) +@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"]) def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.build() Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py === --- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py +++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py @@ -108,6 +108,7 @@ @add_test_categories(['pyapi']) @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800) +@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"]) def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r267923 - XFail TestBitfields.py Python API tests.
Author: chaoren Date: Thu Apr 28 14:40:19 2016 New Revision: 267923 URL: http://llvm.org/viewvc/llvm-project?rev=267923&view=rev Log: XFail TestBitfields.py Python API tests. Summary: Started failing after rL267895. Possibly related to http://llvm.org/pr27510. Reviewers: labath, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D19680 Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py?rev=267923&r1=267922&r2=267923&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Thu Apr 28 14:40:19 2016 @@ -108,6 +108,7 @@ class BitfieldsTestCase(TestBase): @add_test_categories(['pyapi']) @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800) +@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"]) def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19680: XFail TestBitfields.py Python API tests.
chaoren updated this revision to Diff 55464. chaoren added a comment. Clickable links. http://reviews.llvm.org/D19680 Files: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py === --- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py +++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py @@ -108,6 +108,7 @@ @add_test_categories(['pyapi']) @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800) +@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"]) def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.build() Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py === --- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py +++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py @@ -108,6 +108,7 @@ @add_test_categories(['pyapi']) @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800) +@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"]) def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19680: XFail TestBitfields.py Python API tests.
This revision was automatically updated to reflect the committed changes. Closed by commit rL267923: XFail TestBitfields.py Python API tests. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D19680?vs=55464&id=55465#toc Repository: rL LLVM http://reviews.llvm.org/D19680 Files: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py === --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py @@ -108,6 +108,7 @@ @add_test_categories(['pyapi']) @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800) +@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"]) def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" self.build() Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py === --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py @@ -108,6 +108,7 @@ @add_test_categories(['pyapi']) @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800) +@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"]) def test_and_python_api(self): """Use Python APIs to inspect a bitfields variable.""" 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] r268098 - Make sure LLDB can deal with forward declarations to enums without crashing or asserting.
+self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', '*0x*']) +self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '']) +self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$', '*0x*']) +self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True) These break on 32 bit machines I think. We should probably use something like 0x0+. On Fri, Apr 29, 2016 at 1:48 PM, Greg Clayton via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: gclayton > Date: Fri Apr 29 15:48:39 2016 > New Revision: 268098 > > URL: http://llvm.org/viewvc/llvm-project?rev=268098&view=rev > Log: > Make sure LLDB can deal with forward declarations to enums without > crashing or asserting. > > > > > Modified: > > lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py > lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c > lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp > lldb/trunk/source/Symbol/ClangASTContext.cpp > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py?rev=268098&r1=268097&r2=268098&view=diff > > == > --- > lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py > (original) > +++ > lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py > Fri Apr 29 15:48:39 2016 > @@ -63,7 +63,14 @@ class EnumTypesTestCase(TestBase): > 'Sunday', > 'kNumDays', > '5']; > - > + > +# Make sure a pointer to an anonymous enum type does crash LLDB > and displays correctly using > +# frame variable and expression commands > +self.expect('frame variable f.op', > DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', > '0x']) > +self.expect('frame variable *f.op', > DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', ' NULL>']) > +self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs > = ['ops *', '$', '0x']) > +self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs > = ['error:'], error = True) > + > bkpt = self.target().FindBreakpointByID(bkpt_id) > for enum_value in enum_values: > self.expect("frame variable day", 'check for valid > enumeration value', > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c?rev=268098&r1=268097&r2=268098&view=diff > > == > --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c > (original) > +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/main.c Fri > Apr 29 15:48:39 2016 > @@ -8,6 +8,15 @@ > > > //===--===// > #include > > +#include > + > +// Forward declare an enumeration (only works in C, not C++) > +typedef enum ops ops; > + > +struct foo { > + ops *op; > +}; > + > int main (int argc, char const *argv[]) > { > enum days { > @@ -21,6 +30,8 @@ int main (int argc, char const *argv[]) > kNumDays > }; > enum days day; > +struct foo f; > + f.op = NULL; > for (day = Monday - 1; day <= kNumDays + 1; day++) > { > printf("day as int is %i\n", (int)day); // Set break point at > this line. > > Modified: > lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=268098&r1=268097&r2=268098&view=diff > > == > --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp > (original) > +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Fri > Apr 29 15:48:39 2016 > @@ -1011,9 +1011,18 @@ DWARFASTParserClang::ParseTypeFromDWARF > } > > if (!enumerator_clang_type) > -enumerator_clang_type = > m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize (NULL, > - > DW_ATE_signed, > - > byte_size * 8); > +{ > +if (byte_size > 0) > +{ > +enumerator_clang_type = > m_ast.GetBuiltinTypeForDWARFEncod
[Lldb-commits] [PATCH] D19751: Fix TestEnumTypes.py for 32 bit platforms.
chaoren created this revision. chaoren added a reviewer: clayborg. chaoren added a subscriber: lldb-commits. http://reviews.llvm.org/D19751 Files: packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py Index: packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py === --- packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py +++ packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py @@ -66,9 +66,9 @@ # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using # frame variable and expression commands -self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', '0x']) +self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$']) self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '']) -self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$', '0x']) +self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$']) self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True) bkpt = self.target().FindBreakpointByID(bkpt_id) Index: packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py === --- packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py +++ packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py @@ -66,9 +66,9 @@ # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using # frame variable and expression commands -self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', '0x']) +self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$']) self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '']) -self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$', '0x']) +self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$']) self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True) bkpt = self.target().FindBreakpointByID(bkpt_id) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19751: Fix TestEnumTypes.py for 32 bit platforms.
This revision was automatically updated to reflect the committed changes. Closed by commit rL268135: Fix TestEnumTypes.py for 32 bit platforms. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D19751?vs=55685&id=55686#toc Repository: rL LLVM http://reviews.llvm.org/D19751 Files: lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py === --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py @@ -66,9 +66,9 @@ # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using # frame variable and expression commands -self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', '0x']) +self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$']) self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '']) -self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$', '0x']) +self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$']) self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True) bkpt = self.target().FindBreakpointByID(bkpt_id) Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py === --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py @@ -66,9 +66,9 @@ # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using # frame variable and expression commands -self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', '0x']) +self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$']) self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '']) -self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$', '0x']) +self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$']) self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True) bkpt = self.target().FindBreakpointByID(bkpt_id) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r268135 - Fix TestEnumTypes.py for 32 bit platforms.
Author: chaoren Date: Fri Apr 29 18:34:44 2016 New Revision: 268135 URL: http://llvm.org/viewvc/llvm-project?rev=268135&view=rev Log: Fix TestEnumTypes.py for 32 bit platforms. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D19751 Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py?rev=268135&r1=268134&r2=268135&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py Fri Apr 29 18:34:44 2016 @@ -66,9 +66,9 @@ class EnumTypesTestCase(TestBase): # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using # frame variable and expression commands -self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op', '0x']) +self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$']) self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '']) -self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$', '0x']) +self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$']) self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True) bkpt = self.target().FindBreakpointByID(bkpt_id) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19751: Fix TestEnumTypes.py for 32 bit platforms.
chaoren added a subscriber: chaoren. chaoren added a comment. We don't test host-only Windows. It's passing Windows to Android though. What's the reason that it fails on Windows? Repository: rL LLVM http://reviews.llvm.org/D19751 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19751: Fix TestEnumTypes.py for 32 bit platforms.
We don't test host-only Windows. It's passing Windows to Android though. What's the reason that it fails on Windows? On Wed, May 4, 2016 at 2:31 PM, Adrian McCarthy wrote: > amccarth added a subscriber: amccarth. > amccarth added a comment. > > Chaoren: Did this completely fix the test for you? It's still failing > for me on Windows, but for a reason not addressed here. > > > Repository: > rL LLVM > > http://reviews.llvm.org/D19751 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D20540: Make sure TestRedefinitionsInInlines.py always actually inlines.
chaoren created this revision. chaoren added a reviewer: spyffe. chaoren added a subscriber: lldb-commits. http://reviews.llvm.org/D20540 Files: packages/Python/lldbsuite/test/lang/c/inlines/main.c Index: packages/Python/lldbsuite/test/lang/c/inlines/main.c === --- packages/Python/lldbsuite/test/lang/c/inlines/main.c +++ packages/Python/lldbsuite/test/lang/c/inlines/main.c @@ -1,7 +1,7 @@ #include -void test1(int) __attribute__ ((always_inline)); -void test2(int) __attribute__ ((always_inline)); +inline void test1(int) __attribute__ ((always_inline)); +inline void test2(int) __attribute__ ((always_inline)); void test2(int b) { printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"]) Index: packages/Python/lldbsuite/test/lang/c/inlines/main.c === --- packages/Python/lldbsuite/test/lang/c/inlines/main.c +++ packages/Python/lldbsuite/test/lang/c/inlines/main.c @@ -1,7 +1,7 @@ #include -void test1(int) __attribute__ ((always_inline)); -void test2(int) __attribute__ ((always_inline)); +inline void test1(int) __attribute__ ((always_inline)); +inline void test2(int) __attribute__ ((always_inline)); void test2(int b) { printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"]) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r270493 - Make sure TestRedefinitionsInInlines.py actually inlines.
Author: chaoren Date: Mon May 23 16:44:34 2016 New Revision: 270493 URL: http://llvm.org/viewvc/llvm-project?rev=270493&view=rev Log: Make sure TestRedefinitionsInInlines.py actually inlines. Reviewers: spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20540 Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c?rev=270493&r1=270492&r2=270493&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c Mon May 23 16:44:34 2016 @@ -1,7 +1,7 @@ #include -void test1(int) __attribute__ ((always_inline)); -void test2(int) __attribute__ ((always_inline)); +inline void test1(int) __attribute__ ((always_inline)); +inline void test2(int) __attribute__ ((always_inline)); void test2(int b) { printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"]) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20540: Make sure TestRedefinitionsInInlines.py actually inlines.
This revision was automatically updated to reflect the committed changes. Closed by commit rL270493: Make sure TestRedefinitionsInInlines.py actually inlines. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D20540?vs=58153&id=58156#toc Repository: rL LLVM http://reviews.llvm.org/D20540 Files: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c === --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c @@ -1,7 +1,7 @@ #include -void test1(int) __attribute__ ((always_inline)); -void test2(int) __attribute__ ((always_inline)); +inline void test1(int) __attribute__ ((always_inline)); +inline void test2(int) __attribute__ ((always_inline)); void test2(int b) { printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"]) Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c === --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/main.c @@ -1,7 +1,7 @@ #include -void test1(int) __attribute__ ((always_inline)); -void test2(int) __attribute__ ((always_inline)); +inline void test1(int) __attribute__ ((always_inline)); +inline void test2(int) __attribute__ ((always_inline)); void test2(int b) { printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"]) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275914 - Add missing headers after header cleanup in r275882.
Author: chaoren Date: Mon Jul 18 16:11:43 2016 New Revision: 275914 URL: http://llvm.org/viewvc/llvm-project?rev=275914&view=rev Log: Add missing headers after header cleanup in r275882. Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp?rev=275914&r1=275913&r2=275914&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp Mon Jul 18 16:11:43 2016 @@ -16,9 +16,11 @@ #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" #include "clang/Lex/Preprocessor.h" +#include "clang/Lex/PreprocessorOptions.h" #include "clang/Parse/Parser.h" #include "clang/Sema/Lookup.h" #include "clang/Serialization/ASTReader.h" +#include "llvm/Support/Path.h" // Project includes #include "ClangModulesDeclVendor.h" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24293: Use llvm's demangler
chaoren added a comment. Cool. Would it be a good idea to only use LLVM's demangler? We can get rid of all the messy ifdef business, and I assume the LLVM demangler would be better maintained and more up to date than any system demangler. https://reviews.llvm.org/D24293 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r259086 - Fix build after rL259070.
Author: chaoren Date: Thu Jan 28 14:25:46 2016 New Revision: 259086 URL: http://llvm.org/viewvc/llvm-project?rev=259086&view=rev Log: Fix build after rL259070. Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=259086&r1=259085&r2=259086&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Thu Jan 28 14:25:46 2016 @@ -1378,7 +1378,7 @@ FindObjCPropertyAndIvarDeclsWithOrigin ( StringRef name(name_str.c_str()); IdentifierInfo &name_identifier(origin_iface_decl->getASTContext().Idents.get(name)); -DeclFromUser origin_property_decl(origin_iface_decl->FindPropertyDeclaration(&name_identifier, ObjCPropertyDecl::OBJC_PR_query_instance)); +DeclFromUser origin_property_decl(origin_iface_decl->FindPropertyDeclaration(&name_identifier, ObjCPropertyQueryKind::OBJC_PR_query_instance)); bool found = false; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D16703: Fix TestDataFormatterScript for Linux.
chaoren created this revision. chaoren added a reviewer: granata.enrico. chaoren added a subscriber: lldb-commits. m_function_name will contain a dummy name for the auto-generated function from the python script on Linux. Check for script name first. http://reviews.llvm.org/D16703 Files: source/DataFormatters/TypeSummary.cpp Index: source/DataFormatters/TypeSummary.cpp === --- source/DataFormatters/TypeSummary.cpp +++ source/DataFormatters/TypeSummary.cpp @@ -263,21 +263,20 @@ SkipsPointers() ? " (skip pointers)" : "", SkipsReferences() ? " (skip references)" : "", HideNames(nullptr) ? " (hide member names)" : ""); -if (m_function_name.empty()) +if (m_python_script.empty()) { -if (m_python_script.empty()) +if (m_function_name.empty()) { sstr.PutCString("no backing script"); } else { -sstr.PutCString(m_python_script.c_str()); +sstr.PutCString(m_function_name.c_str()); } } else { -sstr.PutCString(m_function_name.c_str()); +sstr.PutCString(m_python_script.c_str()); } return sstr.GetString(); - } Index: source/DataFormatters/TypeSummary.cpp === --- source/DataFormatters/TypeSummary.cpp +++ source/DataFormatters/TypeSummary.cpp @@ -263,21 +263,20 @@ SkipsPointers() ? " (skip pointers)" : "", SkipsReferences() ? " (skip references)" : "", HideNames(nullptr) ? " (hide member names)" : ""); -if (m_function_name.empty()) +if (m_python_script.empty()) { -if (m_python_script.empty()) +if (m_function_name.empty()) { sstr.PutCString("no backing script"); } else { -sstr.PutCString(m_python_script.c_str()); +sstr.PutCString(m_function_name.c_str()); } } else { -sstr.PutCString(m_function_name.c_str()); +sstr.PutCString(m_python_script.c_str()); } return sstr.GetString(); - } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D16703: Fix TestDataFormatterScript for Linux.
This revision was automatically updated to reflect the committed changes. Closed by commit rL259153: Fix TestDataFormatterScript for Linux. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D16703?vs=46330&id=46340#toc Repository: rL LLVM http://reviews.llvm.org/D16703 Files: lldb/trunk/source/DataFormatters/TypeSummary.cpp Index: lldb/trunk/source/DataFormatters/TypeSummary.cpp === --- lldb/trunk/source/DataFormatters/TypeSummary.cpp +++ lldb/trunk/source/DataFormatters/TypeSummary.cpp @@ -263,21 +263,20 @@ SkipsPointers() ? " (skip pointers)" : "", SkipsReferences() ? " (skip references)" : "", HideNames(nullptr) ? " (hide member names)" : ""); -if (m_function_name.empty()) +if (m_python_script.empty()) { -if (m_python_script.empty()) +if (m_function_name.empty()) { sstr.PutCString("no backing script"); } else { -sstr.PutCString(m_python_script.c_str()); +sstr.PutCString(m_function_name.c_str()); } } else { -sstr.PutCString(m_function_name.c_str()); +sstr.PutCString(m_python_script.c_str()); } return sstr.GetString(); - } Index: lldb/trunk/source/DataFormatters/TypeSummary.cpp === --- lldb/trunk/source/DataFormatters/TypeSummary.cpp +++ lldb/trunk/source/DataFormatters/TypeSummary.cpp @@ -263,21 +263,20 @@ SkipsPointers() ? " (skip pointers)" : "", SkipsReferences() ? " (skip references)" : "", HideNames(nullptr) ? " (hide member names)" : ""); -if (m_function_name.empty()) +if (m_python_script.empty()) { -if (m_python_script.empty()) +if (m_function_name.empty()) { sstr.PutCString("no backing script"); } else { -sstr.PutCString(m_python_script.c_str()); +sstr.PutCString(m_function_name.c_str()); } } else { -sstr.PutCString(m_function_name.c_str()); +sstr.PutCString(m_python_script.c_str()); } return sstr.GetString(); - } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r259153 - Fix TestDataFormatterScript for Linux.
Author: chaoren Date: Thu Jan 28 21:48:08 2016 New Revision: 259153 URL: http://llvm.org/viewvc/llvm-project?rev=259153&view=rev Log: Fix TestDataFormatterScript for Linux. Summary: m_function_name will contain a dummy name for the auto-generated function from the python script on Linux. Check for script name first. Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16703 Modified: lldb/trunk/source/DataFormatters/TypeSummary.cpp Modified: lldb/trunk/source/DataFormatters/TypeSummary.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeSummary.cpp?rev=259153&r1=259152&r2=259153&view=diff == --- lldb/trunk/source/DataFormatters/TypeSummary.cpp (original) +++ lldb/trunk/source/DataFormatters/TypeSummary.cpp Thu Jan 28 21:48:08 2016 @@ -263,21 +263,20 @@ ScriptSummaryFormat::GetDescription () SkipsPointers() ? " (skip pointers)" : "", SkipsReferences() ? " (skip references)" : "", HideNames(nullptr) ? " (hide member names)" : ""); -if (m_function_name.empty()) +if (m_python_script.empty()) { -if (m_python_script.empty()) +if (m_function_name.empty()) { sstr.PutCString("no backing script"); } else { -sstr.PutCString(m_python_script.c_str()); +sstr.PutCString(m_function_name.c_str()); } } else { -sstr.PutCString(m_function_name.c_str()); +sstr.PutCString(m_python_script.c_str()); } return sstr.GetString(); - } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r261704 - When looking for symbols, find load addresses in a more robust way.
Hi Sean, On Linux with i386 inferiors, range.GetBaseAddress().GetCallableLoadAddress(target); returns the wrong load address for strlen, while candidate_sc.symbol->ResolveCallableAddress(*target); returns the correct load address. This is causing TestCStrings to fail on our bot: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11726 Do you know why this might be happening? May I revert back to using candidate_sc.symbol->ResolveCallableAddress(*target); and candidate_sc.symbol->GetAddress().GetLoadAddress(target); while you look into it? On Tue, Feb 23, 2016 at 3:13 PM Sean Callanan via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: spyffe > Date: Tue Feb 23 17:09:06 2016 > New Revision: 261704 > > URL: http://llvm.org/viewvc/llvm-project?rev=261704&view=rev > Log: > When looking for symbols, find load addresses in a more robust way. > > IRExecutionUnit previously replicated a bunch of logic that already > existed elsewhere for the purpose of getting a load address for a > symbol. This approach failed to resolve certain types of symbols. > Instead, we now use functions on SymbolContext to do the address > resolution. > > This is a cleanup of IRExecutionUnit::FindInSymbols, and also fixes a > latent bug where we looked at the wrong SymbolContext to determine > whether or not it is external. > > > > Modified: > lldb/trunk/source/Expression/IRExecutionUnit.cpp > > Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=261704&r1=261703&r2=261704&view=diff > > == > --- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original) > +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Tue Feb 23 17:09:06 > 2016 > @@ -769,9 +769,62 @@ IRExecutionUnit::CollectCandidateCPlusPl > lldb::addr_t > IRExecutionUnit::FindInSymbols(const > std::vector &specs, const > lldb_private::SymbolContext &sc) > { > +Target *target = sc.target_sp.get(); > + > +if (!target) > +{ > +// we shouldn't be doing any symbol lookup at all without a target > +return LLDB_INVALID_ADDRESS; > +} > + > for (const SearchSpec &spec : specs) > { > SymbolContextList sc_list; > + > +lldb::addr_t best_internal_load_address = LLDB_INVALID_ADDRESS; > + > +std::function lldb_private::SymbolContext &)> get_external_load_address = > +[&best_internal_load_address, target](lldb::addr_t > &load_address, > + SymbolContextList > &sc_list, > + const > lldb_private::SymbolContext &sc) -> lldb::addr_t > +{ > +load_address = LLDB_INVALID_ADDRESS; > + > +for (size_t si = 0, se = sc_list.GetSize(); si < se; ++si) > +{ > +SymbolContext candidate_sc; > + > +sc_list.GetContextAtIndex(si, candidate_sc); > + > +const bool is_external = (candidate_sc.function) || > + (candidate_sc.symbol && > candidate_sc.symbol->IsExternal()); > + > +AddressRange range; > + > +if > (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction | > lldb::eSymbolContextSymbol, > + 0, > + false, > + range)) > +{ > +load_address = > range.GetBaseAddress().GetCallableLoadAddress(target); > + > +if (load_address != LLDB_INVALID_ADDRESS) > +{ > +if (is_external) > +{ > +return true; > +} > +else if (best_internal_load_address == > LLDB_INVALID_ADDRESS) > +{ > +best_internal_load_address = load_address; > +load_address = LLDB_INVALID_ADDRESS; > +} > +} > +} > +} > + > +return false; > +}; > > if (sc.module_sp) > { > @@ -783,6 +836,17 @@ IRExecutionUnit::FindInSymbols(const std > true, // append > sc_list); > } > + > +lldb::addr_t load_address = LLDB_INVALID_ADDRESS; > + > +if (get_external_load_address(load_address, sc_list, sc)) > +{ > +return load_address; > +} > +else > +{ > +sc_list.Clear(); > +} > > if (sc_list.GetSize() == 0 && sc.target_sp) > { > @@ -794,49 +858,26 @@ IRExecutionUnit::FindInSymbols(const std >
[Lldb-commits] [PATCH] D17557: Fix TestCStrings for Linux with i386 inferiors.
chaoren created this revision. chaoren added a reviewer: spyffe. chaoren added a subscriber: lldb-commits. Temporarily revert part of r261704. http://reviews.llvm.org/D17557 Files: source/Expression/IRExecutionUnit.cpp Index: source/Expression/IRExecutionUnit.cpp === --- source/Expression/IRExecutionUnit.cpp +++ source/Expression/IRExecutionUnit.cpp @@ -213,7 +213,7 @@ InstructionList &instruction_list = disassembler_sp->GetInstructionList(); instruction_list.Dump(&stream, true, true, &exe_ctx); - + // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. // I'll fix that but for now, just clear the list and it will go away nicely. disassembler_sp->GetInstructionList().Clear(); @@ -297,7 +297,7 @@ { relocModel = llvm::Reloc::PIC_; } - + // This will be small for 32-bit and large for 64-bit. codeModel = llvm::CodeModel::JITDefault; @@ -325,7 +325,7 @@ mAttrs); m_execution_engine_ap.reset(builder.create(target_machine)); - + m_strip_underscore = (m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_'); if (!m_execution_engine_ap.get()) @@ -373,27 +373,27 @@ if (m_failed_lookups.size()) { StreamString ss; - + ss.PutCString("Couldn't lookup symbols:\n"); - + bool emitNewLine = false; - + for (const ConstString &failed_lookup : m_failed_lookups) { if (emitNewLine) ss.PutCString("\n"); emitNewLine = true; ss.PutCString(" "); ss.PutCString(Mangled(failed_lookup).GetDemangledName(lldb::eLanguageTypeObjC_plus_plus).AsCString()); } - + m_failed_lookups.clear(); - + error.SetErrorString(ss.GetData()); - + return; } - + m_function_load_addr = LLDB_INVALID_ADDRESS; m_function_end_load_addr = LLDB_INVALID_ADDRESS; @@ -446,7 +446,7 @@ else { record.dump(log); - + DataExtractor my_extractor ((const void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8); my_extractor.PutToLog(log, 0, record.m_size, record.m_host_address, 16, DataExtractor::TypeUInt8); } @@ -731,29 +731,29 @@ { Mangled mangled(name, true); ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus); - + if (demangled) { ConstString best_alternate_mangled_name = FindBestAlternateMangledName(demangled, lldb::eLanguageTypeC_plus_plus, sc); - + if (best_alternate_mangled_name) { CPP_specs.push_back(best_alternate_mangled_name); } - + CPP_specs.push_back(SearchSpec(demangled, lldb::eFunctionNameTypeFull)); } } - + // Maybe we're looking for a const symbol but the debug info told us it was const... if (!strncmp(name.GetCString(), "_ZN", 3) && strncmp(name.GetCString(), "_ZNK", 4)) { std::string fixed_scratch("_ZNK"); fixed_scratch.append(name.GetCString() + 3); CPP_specs.push_back(ConstString(fixed_scratch.c_str())); } - + // Maybe we're looking for a static symbol but we thought it was global... if (!strncmp(name.GetCString(), "_Z", 2) && strncmp(name.GetCString(), "_ZL", 3)) @@ -799,33 +799,28 @@ const bool is_external = (candidate_sc.function) || (candidate_sc.symbol && candidate_sc.symbol->IsExternal()); -AddressRange range; +load_address = candidate_sc.symbol->ResolveCallableAddress(*target); -if (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction | lldb::eSymbolContextSymbol, - 0, - false, - range)) -{ -load_address = range.GetBaseAddress().GetCallableLoadAddress(target); +if (load_address == LLDB_INVALID_ADDRESS) +load_address = candidate_sc.symbol->GetAddress().GetLoadAddress(sc.target_sp.get()); -if (load_address != LLDB_INVALID_ADDRESS) +if (load_address != LLDB_INVALID_ADDRESS) +{ +if (is_external) { -if (is_external) -{ -return true; -
Re: [Lldb-commits] [PATCH] D17557: Fix TestCStrings for Linux with i386 inferiors.
chaoren updated this revision to Diff 48867. chaoren added a comment. Use target instead of sc.target_sp.get(). http://reviews.llvm.org/D17557 Files: source/Expression/IRExecutionUnit.cpp Index: source/Expression/IRExecutionUnit.cpp === --- source/Expression/IRExecutionUnit.cpp +++ source/Expression/IRExecutionUnit.cpp @@ -213,7 +213,7 @@ InstructionList &instruction_list = disassembler_sp->GetInstructionList(); instruction_list.Dump(&stream, true, true, &exe_ctx); - + // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. // I'll fix that but for now, just clear the list and it will go away nicely. disassembler_sp->GetInstructionList().Clear(); @@ -297,7 +297,7 @@ { relocModel = llvm::Reloc::PIC_; } - + // This will be small for 32-bit and large for 64-bit. codeModel = llvm::CodeModel::JITDefault; @@ -325,7 +325,7 @@ mAttrs); m_execution_engine_ap.reset(builder.create(target_machine)); - + m_strip_underscore = (m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_'); if (!m_execution_engine_ap.get()) @@ -373,27 +373,27 @@ if (m_failed_lookups.size()) { StreamString ss; - + ss.PutCString("Couldn't lookup symbols:\n"); - + bool emitNewLine = false; - + for (const ConstString &failed_lookup : m_failed_lookups) { if (emitNewLine) ss.PutCString("\n"); emitNewLine = true; ss.PutCString(" "); ss.PutCString(Mangled(failed_lookup).GetDemangledName(lldb::eLanguageTypeObjC_plus_plus).AsCString()); } - + m_failed_lookups.clear(); - + error.SetErrorString(ss.GetData()); - + return; } - + m_function_load_addr = LLDB_INVALID_ADDRESS; m_function_end_load_addr = LLDB_INVALID_ADDRESS; @@ -446,7 +446,7 @@ else { record.dump(log); - + DataExtractor my_extractor ((const void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8); my_extractor.PutToLog(log, 0, record.m_size, record.m_host_address, 16, DataExtractor::TypeUInt8); } @@ -731,29 +731,29 @@ { Mangled mangled(name, true); ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus); - + if (demangled) { ConstString best_alternate_mangled_name = FindBestAlternateMangledName(demangled, lldb::eLanguageTypeC_plus_plus, sc); - + if (best_alternate_mangled_name) { CPP_specs.push_back(best_alternate_mangled_name); } - + CPP_specs.push_back(SearchSpec(demangled, lldb::eFunctionNameTypeFull)); } } - + // Maybe we're looking for a const symbol but the debug info told us it was const... if (!strncmp(name.GetCString(), "_ZN", 3) && strncmp(name.GetCString(), "_ZNK", 4)) { std::string fixed_scratch("_ZNK"); fixed_scratch.append(name.GetCString() + 3); CPP_specs.push_back(ConstString(fixed_scratch.c_str())); } - + // Maybe we're looking for a static symbol but we thought it was global... if (!strncmp(name.GetCString(), "_Z", 2) && strncmp(name.GetCString(), "_ZL", 3)) @@ -799,33 +799,28 @@ const bool is_external = (candidate_sc.function) || (candidate_sc.symbol && candidate_sc.symbol->IsExternal()); -AddressRange range; +load_address = candidate_sc.symbol->ResolveCallableAddress(*target); -if (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction | lldb::eSymbolContextSymbol, - 0, - false, - range)) -{ -load_address = range.GetBaseAddress().GetCallableLoadAddress(target); +if (load_address == LLDB_INVALID_ADDRESS) +load_address = candidate_sc.symbol->GetAddress().GetLoadAddress(target); -if (load_address != LLDB_INVALID_ADDRESS) +if (load_address != LLDB_INVALID_ADDRESS) +{ +if (is_external) { -if (is_external) -{ -return true; -} -else if (bes
Re: [Lldb-commits] [PATCH] D17557: Fix TestCStrings for Linux with i386 inferiors.
This revision was automatically updated to reflect the committed changes. Closed by commit rL261718: Fix TestCStrings for Linux with i386 inferiors. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D17557?vs=48867&id=48878#toc Repository: rL LLVM http://reviews.llvm.org/D17557 Files: lldb/trunk/source/Expression/IRExecutionUnit.cpp Index: lldb/trunk/source/Expression/IRExecutionUnit.cpp === --- lldb/trunk/source/Expression/IRExecutionUnit.cpp +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp @@ -213,7 +213,7 @@ InstructionList &instruction_list = disassembler_sp->GetInstructionList(); instruction_list.Dump(&stream, true, true, &exe_ctx); - + // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. // I'll fix that but for now, just clear the list and it will go away nicely. disassembler_sp->GetInstructionList().Clear(); @@ -297,7 +297,7 @@ { relocModel = llvm::Reloc::PIC_; } - + // This will be small for 32-bit and large for 64-bit. codeModel = llvm::CodeModel::JITDefault; @@ -325,7 +325,7 @@ mAttrs); m_execution_engine_ap.reset(builder.create(target_machine)); - + m_strip_underscore = (m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_'); if (!m_execution_engine_ap.get()) @@ -373,27 +373,27 @@ if (m_failed_lookups.size()) { StreamString ss; - + ss.PutCString("Couldn't lookup symbols:\n"); - + bool emitNewLine = false; - + for (const ConstString &failed_lookup : m_failed_lookups) { if (emitNewLine) ss.PutCString("\n"); emitNewLine = true; ss.PutCString(" "); ss.PutCString(Mangled(failed_lookup).GetDemangledName(lldb::eLanguageTypeObjC_plus_plus).AsCString()); } - + m_failed_lookups.clear(); - + error.SetErrorString(ss.GetData()); - + return; } - + m_function_load_addr = LLDB_INVALID_ADDRESS; m_function_end_load_addr = LLDB_INVALID_ADDRESS; @@ -446,7 +446,7 @@ else { record.dump(log); - + DataExtractor my_extractor ((const void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8); my_extractor.PutToLog(log, 0, record.m_size, record.m_host_address, 16, DataExtractor::TypeUInt8); } @@ -731,29 +731,29 @@ { Mangled mangled(name, true); ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus); - + if (demangled) { ConstString best_alternate_mangled_name = FindBestAlternateMangledName(demangled, lldb::eLanguageTypeC_plus_plus, sc); - + if (best_alternate_mangled_name) { CPP_specs.push_back(best_alternate_mangled_name); } - + CPP_specs.push_back(SearchSpec(demangled, lldb::eFunctionNameTypeFull)); } } - + // Maybe we're looking for a const symbol but the debug info told us it was const... if (!strncmp(name.GetCString(), "_ZN", 3) && strncmp(name.GetCString(), "_ZNK", 4)) { std::string fixed_scratch("_ZNK"); fixed_scratch.append(name.GetCString() + 3); CPP_specs.push_back(ConstString(fixed_scratch.c_str())); } - + // Maybe we're looking for a static symbol but we thought it was global... if (!strncmp(name.GetCString(), "_Z", 2) && strncmp(name.GetCString(), "_ZL", 3)) @@ -799,33 +799,28 @@ const bool is_external = (candidate_sc.function) || (candidate_sc.symbol && candidate_sc.symbol->IsExternal()); -AddressRange range; +load_address = candidate_sc.symbol->ResolveCallableAddress(*target); -if (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction | lldb::eSymbolContextSymbol, - 0, - false, - range)) -{ -load_address = range.GetBaseAddress().GetCallableLoadAddress(target); +if (load_address == LLDB_INVALID_ADDRESS) +load_address = candidate_sc.symbol->GetAddress().GetLoadAddress(target); -if (load_address != LLDB_INVALID_ADDRESS) +if (load_address != LLDB_INVALID_ADDRESS) +{ +if (is_e
[Lldb-commits] [lldb] r261718 - Fix TestCStrings for Linux with i386 inferiors.
Author: chaoren Date: Tue Feb 23 21:15:21 2016 New Revision: 261718 URL: http://llvm.org/viewvc/llvm-project?rev=261718&view=rev Log: Fix TestCStrings for Linux with i386 inferiors. Summary: Temporarily revert part of r261704. Reviewers: spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17557 Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=261718&r1=261717&r2=261718&view=diff == --- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original) +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Tue Feb 23 21:15:21 2016 @@ -213,7 +213,7 @@ IRExecutionUnit::DisassembleFunction (St InstructionList &instruction_list = disassembler_sp->GetInstructionList(); instruction_list.Dump(&stream, true, true, &exe_ctx); - + // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. // I'll fix that but for now, just clear the list and it will go away nicely. disassembler_sp->GetInstructionList().Clear(); @@ -297,7 +297,7 @@ IRExecutionUnit::GetRunnableInfo(Error & { relocModel = llvm::Reloc::PIC_; } - + // This will be small for 32-bit and large for 64-bit. codeModel = llvm::CodeModel::JITDefault; @@ -325,7 +325,7 @@ IRExecutionUnit::GetRunnableInfo(Error & mAttrs); m_execution_engine_ap.reset(builder.create(target_machine)); - + m_strip_underscore = (m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_'); if (!m_execution_engine_ap.get()) @@ -373,11 +373,11 @@ IRExecutionUnit::GetRunnableInfo(Error & if (m_failed_lookups.size()) { StreamString ss; - + ss.PutCString("Couldn't lookup symbols:\n"); - + bool emitNewLine = false; - + for (const ConstString &failed_lookup : m_failed_lookups) { if (emitNewLine) @@ -386,14 +386,14 @@ IRExecutionUnit::GetRunnableInfo(Error & ss.PutCString(" "); ss.PutCString(Mangled(failed_lookup).GetDemangledName(lldb::eLanguageTypeObjC_plus_plus).AsCString()); } - + m_failed_lookups.clear(); - + error.SetErrorString(ss.GetData()); - + return; } - + m_function_load_addr = LLDB_INVALID_ADDRESS; m_function_end_load_addr = LLDB_INVALID_ADDRESS; @@ -446,7 +446,7 @@ IRExecutionUnit::GetRunnableInfo(Error & else { record.dump(log); - + DataExtractor my_extractor ((const void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8); my_extractor.PutToLog(log, 0, record.m_size, record.m_host_address, 16, DataExtractor::TypeUInt8); } @@ -731,20 +731,20 @@ IRExecutionUnit::CollectCandidateCPlusPl { Mangled mangled(name, true); ConstString demangled = mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus); - + if (demangled) { ConstString best_alternate_mangled_name = FindBestAlternateMangledName(demangled, lldb::eLanguageTypeC_plus_plus, sc); - + if (best_alternate_mangled_name) { CPP_specs.push_back(best_alternate_mangled_name); } - + CPP_specs.push_back(SearchSpec(demangled, lldb::eFunctionNameTypeFull)); } } - + // Maybe we're looking for a const symbol but the debug info told us it was const... if (!strncmp(name.GetCString(), "_ZN", 3) && strncmp(name.GetCString(), "_ZNK", 4)) @@ -753,7 +753,7 @@ IRExecutionUnit::CollectCandidateCPlusPl fixed_scratch.append(name.GetCString() + 3); CPP_specs.push_back(ConstString(fixed_scratch.c_str())); } - + // Maybe we're looking for a static symbol but we thought it was global... if (!strncmp(name.GetCString(), "_Z", 2) && strncmp(name.GetCString(), "_ZL", 3)) @@ -799,33 +799,28 @@ IRExecutionUnit::FindInSymbols(const std const bool is_external = (candidate_sc.function) || (candidate_sc.symbol && candidate_sc.symbol->IsExternal()); -AddressRange range; +load_address = candidate_sc.symbol->ResolveCallableAddress(*target); -if (candidate_sc.GetAddressRange(lldb::eSymbolContextFunction | lldb::eSymbolContextSymbol, - 0, -
Re: [Lldb-commits] [lldb] r261953 - Add the "block" keyword to "thread step-in -e", and an alias that uses it: "sif " - i.e. step-into-function
Hi Jim, This broke a lot of our tests on Linux. E.g., "p foo" doesn't work. http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11803 Since the breakage is pretty severe, mind if I revert this first until the problem can be fixed? On Thu, Feb 25, 2016 at 5:42 PM Jim Ingham via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: jingham > Date: Thu Feb 25 19:37:30 2016 > New Revision: 261953 > > URL: http://llvm.org/viewvc/llvm-project?rev=261953&view=rev > Log: > Add the "block" keyword to "thread step-in -e", and an alias that uses it: > "sif " - i.e. step-into-function > to allow you to step through a complex calling sequence into a particular > function that may span multiple lines. Also some > test cases for this and the --step-target feature. > > > Added: > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/ > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile > > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/main.c > Modified: > lldb/trunk/source/Commands/CommandObjectThread.cpp > lldb/trunk/source/Interpreter/CommandInterpreter.cpp > > Added: > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile?rev=261953&view=auto > > == > --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile > (added) > +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile > Thu Feb 25 19:37:30 2016 > @@ -0,0 +1,5 @@ > +LEVEL = ../../../make > + > +C_SOURCES := main.c > + > +include $(LEVEL)/Makefile.rules > > Added: > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py?rev=261953&view=auto > > == > --- > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py > (added) > +++ > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py > Thu Feb 25 19:37:30 2016 > @@ -0,0 +1,113 @@ > +"""Test the 'step target' feature.""" > + > +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 TestStepTarget(TestBase): > + > +mydir = TestBase.compute_mydir(__file__) > + > +def getCategories(self): > +return ['basic_process'] > + > +def setUp(self): > +# Call super's setUp(). > +TestBase.setUp(self) > +# Find the line numbers that we will step to in main: > +self.main_source = "main.c" > +self.end_line = line_number(self.main_source, "All done") > + > +@add_test_categories(['pyapi']) > + > +def get_to_start (self): > +self.build() > +exe = os.path.join(os.getcwd(), "a.out") > + > +target = self.dbg.CreateTarget(exe) > +self.assertTrue(target, VALID_TARGET) > + > +self.main_source_spec = lldb.SBFileSpec (self.main_source) > + > +break_in_main = target.BreakpointCreateBySourceRegex ('Break here > to try targetted stepping', self.main_source_spec) > +self.assertTrue(break_in_main, VALID_BREAKPOINT) > +self.assertTrue(break_in_main.GetNumLocations() > 0,"Has > locations.") > + > +# Now launch the process, and do not stop at entry point. > +process = target.LaunchSimple (None, None, > self.get_process_working_directory()) > + > +self.assertTrue(process, PROCESS_IS_VALID) > + > +# The stop reason of the thread should be breakpoint. > +threads = lldbutil.get_threads_stopped_at_breakpoint (process, > break_in_main) > + > +if len(threads) != 1: > +self.fail ("Failed to stop at first breakpoint in main.") > + > +thread = threads[0] > +return thread > + > +def test_with_end_line(self): > +"""Test stepping over vrs. hitting breakpoints & subsequent > stepping in various forms.""" > + > +thread = self.get_to_start() > + > +error = lldb.SBError() > +thread.StepInto("lotsOfArgs", self.end_line, error) > +frame = thread.frames[0] > + > +self.assertTrue (frame.name == "lotsOfArgs", "Stepped to > lotsOfArgs.") > + > +def test_with_end_line_bad_name(self): > +"""Test stepping over vrs. hitting breakpoints & subsequent > stepping in various forms.""" > + > +thread = self.get_to_start() > + > +error = lldb.SBError() > +thread.StepInto("lotsOfArg", self.end_line, error) > +frame = thread.frames[0] > +self.assertTru
[Lldb-commits] [PATCH] D17634: Clear alias argument vector for 'p' alias.
chaoren created this revision. chaoren added a reviewer: jingham. chaoren added a subscriber: lldb-commits. This fixes the 'p' command which should be aliased to 'expresion --'. http://reviews.llvm.org/D17634 Files: source/Interpreter/CommandInterpreter.cpp Index: source/Interpreter/CommandInterpreter.cpp === --- source/Interpreter/CommandInterpreter.cpp +++ source/Interpreter/CommandInterpreter.cpp @@ -337,6 +337,8 @@ AddAlias ("image", cmd_obj_sp); +alias_arguments_vector_sp.reset(new OptionArgVector); + cmd_obj_sp = GetCommandSPExact ("expression", false); if (cmd_obj_sp) { Index: source/Interpreter/CommandInterpreter.cpp === --- source/Interpreter/CommandInterpreter.cpp +++ source/Interpreter/CommandInterpreter.cpp @@ -337,6 +337,8 @@ AddAlias ("image", cmd_obj_sp); +alias_arguments_vector_sp.reset(new OptionArgVector); + cmd_obj_sp = GetCommandSPExact ("expression", false); if (cmd_obj_sp) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17634: Clear alias argument vector for 'p' alias.
This revision was automatically updated to reflect the committed changes. Closed by commit rL261969: Clear alias argument vector for 'p' alias. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D17634?vs=49147&id=49148#toc Repository: rL LLVM http://reviews.llvm.org/D17634 Files: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Index: lldb/trunk/source/Interpreter/CommandInterpreter.cpp === --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp @@ -337,6 +337,8 @@ AddAlias ("image", cmd_obj_sp); +alias_arguments_vector_sp.reset(new OptionArgVector); + cmd_obj_sp = GetCommandSPExact ("expression", false); if (cmd_obj_sp) { Index: lldb/trunk/source/Interpreter/CommandInterpreter.cpp === --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp @@ -337,6 +337,8 @@ AddAlias ("image", cmd_obj_sp); +alias_arguments_vector_sp.reset(new OptionArgVector); + cmd_obj_sp = GetCommandSPExact ("expression", false); if (cmd_obj_sp) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r261969 - Clear alias argument vector for 'p' alias.
Author: chaoren Date: Thu Feb 25 21:36:27 2016 New Revision: 261969 URL: http://llvm.org/viewvc/llvm-project?rev=261969&view=rev Log: Clear alias argument vector for 'p' alias. Summary: This fixes the 'p' command which should be aliased to 'expresion --'. Reviewers: jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17634 Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=261969&r1=261968&r2=261969&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Thu Feb 25 21:36:27 2016 @@ -337,6 +337,8 @@ CommandInterpreter::Initialize () AddAlias ("image", cmd_obj_sp); +alias_arguments_vector_sp.reset(new OptionArgVector); + cmd_obj_sp = GetCommandSPExact ("expression", false); if (cmd_obj_sp) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r261953 - Add the "block" keyword to "thread step-in -e", and an alias that uses it: "sif " - i.e. step-into-function
It's okay. I think I fixed it with http://reviews.llvm.org/D17634 On Thu, Feb 25, 2016 at 6:55 PM, Jason Molenda wrote: > Jim just headed home - if you don't mind, please revert the commit. He'll > look into it tomorrow morning. > > J > > > > On Feb 25, 2016, at 6:51 PM, Chaoren Lin via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > > > Hi Jim, > > > > This broke a lot of our tests on Linux. E.g., "p foo" doesn't work. > > > http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11803 > > > > Since the breakage is pretty severe, mind if I revert this first until > the problem can be fixed? > > > > On Thu, Feb 25, 2016 at 5:42 PM Jim Ingham via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > > Author: jingham > > Date: Thu Feb 25 19:37:30 2016 > > New Revision: 261953 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=261953&view=rev > > Log: > > Add the "block" keyword to "thread step-in -e", and an alias that uses > it: "sif " - i.e. step-into-function > > to allow you to step through a complex calling sequence into a > particular function that may span multiple lines. Also some > > test cases for this and the --step-target feature. > > > > > > Added: > > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/ > > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile > > > > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py > > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/main.c > > Modified: > > lldb/trunk/source/Commands/CommandObjectThread.cpp > > lldb/trunk/source/Interpreter/CommandInterpreter.cpp > > > > Added: > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile > > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile?rev=261953&view=auto > > > == > > --- > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile > (added) > > +++ > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/Makefile Thu > Feb 25 19:37:30 2016 > > @@ -0,0 +1,5 @@ > > +LEVEL = ../../../make > > + > > +C_SOURCES := main.c > > + > > +include $(LEVEL)/Makefile.rules > > > > Added: > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py > > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py?rev=261953&view=auto > > > == > > --- > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py > (added) > > +++ > lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py > Thu Feb 25 19:37:30 2016 > > @@ -0,0 +1,113 @@ > > +"""Test the 'step target' feature.""" > > + > > +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 TestStepTarget(TestBase): > > + > > +mydir = TestBase.compute_mydir(__file__) > > + > > +def getCategories(self): > > +return ['basic_process'] > > + > > +def setUp(self): > > +# Call super's setUp(). > > +TestBase.setUp(self) > > +# Find the line numbers that we will step to in main: > > +self.main_source = "main.c" > > +self.end_line = line_number(self.main_source, "All done") > > + > > +@add_test_categories(['pyapi']) > > + > > +def get_to_start (self): > > +self.build() > > +exe = os.path.join(os.getcwd(), "a.out") > > + > > +target = self.dbg.CreateTarget(exe) > > +self.assertTrue(target, VALID_TARGET) > > + > > +self.main_source_spec = lldb.SBFileSpec (self.main_source) > > + > > +break_in_main = target.BreakpointCreateBySourceRegex ('Break > here to try targetted stepping', self.main_source_spec) > > +self.assertTrue(break_in_main, VALID_BREAKPOINT) > > +self.assertTrue(break_in_main.GetNumLocations() > 0,&qu
Re: [Lldb-commits] [lldb] r262041 - Fix bug with register values byte order in expression evaluation.
Hmm. Weird. That assert is failing on Linux: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833 On Fri, Feb 26, 2016 at 9:40 AM, Aidan Dodds via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: aidandodds > Date: Fri Feb 26 11:40:50 2016 > New Revision: 262041 > > URL: http://llvm.org/viewvc/llvm-project?rev=262041&view=rev > Log: > Fix bug with register values byte order in expression evaluation. > > The evaluation of expressions containing register values was broken for > targets for which endianness differs from host. > > Committed on behalf of: mamai > > Differential revision: http://reviews.llvm.org/D17167 > > Modified: > lldb/trunk/source/Expression/Materializer.cpp > > Modified: lldb/trunk/source/Expression/Materializer.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262041&r1=262040&r2=262041&view=diff > > == > --- lldb/trunk/source/Expression/Materializer.cpp (original) > +++ lldb/trunk/source/Expression/Materializer.cpp Fri Feb 26 11:40:50 2016 > @@ -26,6 +26,7 @@ > #include "lldb/Target/StackFrame.h" > #include "lldb/Target/Target.h" > #include "lldb/Target/Thread.h" > +#include "lldb/Utility/LLDBAssert.h" > > using namespace lldb_private; > > @@ -1275,9 +1276,14 @@ public: > m_register_contents.reset(new > DataBufferHeap(register_data.GetDataStart(), register_data.GetByteSize())); > > Error write_error; > - > -map.WriteMemory(load_addr, register_data.GetDataStart(), > register_data.GetByteSize(), write_error); > - > + > +Scalar scalar; > +reg_value.GetScalarValue(scalar); > + > +lldbassert(scalar.GetByteSize() == register_data.GetByteSize()); > + > +map.WriteScalarToMemory(load_addr, scalar, scalar.GetByteSize(), > write_error); > + > if (!write_error.Success()) > { > err.SetErrorStringWithFormat("couldn't write the contents of > register %s: %s", m_register_info.name, write_error.AsCString()); > > > ___ > 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] [PATCH] D17658: Register value is not necessarily scalar.
chaoren created this revision. chaoren added reviewers: aidan.dodds, mamai. chaoren added a subscriber: lldb-commits. http://reviews.llvm.org/D17658 Files: source/Expression/Materializer.cpp Index: source/Expression/Materializer.cpp === --- source/Expression/Materializer.cpp +++ source/Expression/Materializer.cpp @@ -35,35 +35,35 @@ { uint32_t size = entity.GetSize(); uint32_t alignment = entity.GetAlignment(); - + uint32_t ret; - + if (m_current_offset == 0) m_struct_alignment = alignment; - + if (m_current_offset % alignment) m_current_offset += (alignment - (m_current_offset % alignment)); - + ret = m_current_offset; - + m_current_offset += size; - + return ret; } void Materializer::Entity::SetSizeAndAlignmentFromType (CompilerType &type) { m_size = type.GetByteSize(nullptr); - + uint32_t bit_alignment = type.GetTypeBitAlign(); - + if (bit_alignment % 8) { bit_alignment += 8; bit_alignment &= ~((uint32_t)0x111u); } - + m_alignment = bit_alignment / 8; } @@ -80,117 +80,117 @@ m_size = 8; m_alignment = 8; } - + void MakeAllocation (IRMemoryMap &map, Error &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); // Allocate a spare memory area to store the persistent variable's contents. - + Error allocate_error; const bool zero_memory = false; - + lldb::addr_t mem = map.Malloc(m_persistent_variable_sp->GetByteSize(), 8, lldb::ePermissionsReadable | lldb::ePermissionsWritable, IRMemoryMap::eAllocationPolicyMirror, zero_memory, allocate_error); - + if (!allocate_error.Success()) { err.SetErrorStringWithFormat("couldn't allocate a memory area to store %s: %s", m_persistent_variable_sp->GetName().GetCString(), allocate_error.AsCString()); return; } - + if (log) log->Printf("Allocated %s (0x%" PRIx64 ") successfully", m_persistent_variable_sp->GetName().GetCString(), mem); - + // Put the location of the spare memory into the live data of the ValueObject. - + m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope(), m_persistent_variable_sp->GetCompilerType(), m_persistent_variable_sp->GetName(), mem, eAddressTypeLoad, map.GetAddressByteSize()); - + // Clear the flag if the variable will never be deallocated. - + if (m_persistent_variable_sp->m_flags & ExpressionVariable::EVKeepInTarget) { Error leak_error; map.Leak(mem, leak_error); m_persistent_variable_sp->m_flags &= ~ExpressionVariable::EVNeedsAllocation; } - + // Write the contents of the variable to the area. - + Error write_error; - + map.WriteMemory (mem, m_persistent_variable_sp->GetValueBytes(), m_persistent_variable_sp->GetByteSize(), write_error); - + if (!write_error.Success()) { err.SetErrorStringWithFormat ("couldn't write %s to the target: %s", m_persistent_variable_sp->GetName().AsCString(), write_error.AsCString()); return; } } - + void DestroyAllocation (IRMemoryMap &map, Error &err) { Error deallocate_error; - + map.Free((lldb::addr_t)m_persistent_variable_sp->m_live_sp->GetValue().GetScalar().ULongLong(), deallocate_error); - + m_persistent_variable_sp->m_live_sp.reset(); - + if (!deallocate_error.Success()) { err.SetErrorStringWithFormat ("couldn't deallocate memory for %s: %s", m_persistent_variable_sp->GetName().GetCString(), deallocate_error.AsCString()); } } - + void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) override { Log *log(lldb_private::GetLogIfAllCategoriesSet
Re: [Lldb-commits] [PATCH] D17658: Register value is not necessarily scalar.
chaoren updated this revision to Diff 49237. chaoren added a comment. Check return value of GetScalarValue directly. http://reviews.llvm.org/D17658 Files: source/Expression/Materializer.cpp Index: source/Expression/Materializer.cpp === --- source/Expression/Materializer.cpp +++ source/Expression/Materializer.cpp @@ -35,35 +35,35 @@ { uint32_t size = entity.GetSize(); uint32_t alignment = entity.GetAlignment(); - + uint32_t ret; - + if (m_current_offset == 0) m_struct_alignment = alignment; - + if (m_current_offset % alignment) m_current_offset += (alignment - (m_current_offset % alignment)); - + ret = m_current_offset; - + m_current_offset += size; - + return ret; } void Materializer::Entity::SetSizeAndAlignmentFromType (CompilerType &type) { m_size = type.GetByteSize(nullptr); - + uint32_t bit_alignment = type.GetTypeBitAlign(); - + if (bit_alignment % 8) { bit_alignment += 8; bit_alignment &= ~((uint32_t)0x111u); } - + m_alignment = bit_alignment / 8; } @@ -80,117 +80,117 @@ m_size = 8; m_alignment = 8; } - + void MakeAllocation (IRMemoryMap &map, Error &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); // Allocate a spare memory area to store the persistent variable's contents. - + Error allocate_error; const bool zero_memory = false; - + lldb::addr_t mem = map.Malloc(m_persistent_variable_sp->GetByteSize(), 8, lldb::ePermissionsReadable | lldb::ePermissionsWritable, IRMemoryMap::eAllocationPolicyMirror, zero_memory, allocate_error); - + if (!allocate_error.Success()) { err.SetErrorStringWithFormat("couldn't allocate a memory area to store %s: %s", m_persistent_variable_sp->GetName().GetCString(), allocate_error.AsCString()); return; } - + if (log) log->Printf("Allocated %s (0x%" PRIx64 ") successfully", m_persistent_variable_sp->GetName().GetCString(), mem); - + // Put the location of the spare memory into the live data of the ValueObject. - + m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope(), m_persistent_variable_sp->GetCompilerType(), m_persistent_variable_sp->GetName(), mem, eAddressTypeLoad, map.GetAddressByteSize()); - + // Clear the flag if the variable will never be deallocated. - + if (m_persistent_variable_sp->m_flags & ExpressionVariable::EVKeepInTarget) { Error leak_error; map.Leak(mem, leak_error); m_persistent_variable_sp->m_flags &= ~ExpressionVariable::EVNeedsAllocation; } - + // Write the contents of the variable to the area. - + Error write_error; - + map.WriteMemory (mem, m_persistent_variable_sp->GetValueBytes(), m_persistent_variable_sp->GetByteSize(), write_error); - + if (!write_error.Success()) { err.SetErrorStringWithFormat ("couldn't write %s to the target: %s", m_persistent_variable_sp->GetName().AsCString(), write_error.AsCString()); return; } } - + void DestroyAllocation (IRMemoryMap &map, Error &err) { Error deallocate_error; - + map.Free((lldb::addr_t)m_persistent_variable_sp->m_live_sp->GetValue().GetScalar().ULongLong(), deallocate_error); - + m_persistent_variable_sp->m_live_sp.reset(); - + if (!deallocate_error.Success()) { err.SetErrorStringWithFormat ("couldn't deallocate memory for %s: %s", m_persistent_variable_sp->GetName().GetCString(), deallocate_error.AsCString()); } } - + void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map, lldb::addr_t process_address, Error &err) override { Log *log(lldb_private::GetLogIfAllCategoriesSe
[Lldb-commits] [lldb] r262081 - Register value is not necessarily scalar.
Author: chaoren Date: Fri Feb 26 16:12:35 2016 New Revision: 262081 URL: http://llvm.org/viewvc/llvm-project?rev=262081&view=rev Log: Register value is not necessarily scalar. Reviewers: aidan.dodds, mamai Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17658 Modified: lldb/trunk/source/Expression/Materializer.cpp Modified: lldb/trunk/source/Expression/Materializer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262081&r1=262080&r2=262081&view=diff == --- lldb/trunk/source/Expression/Materializer.cpp (original) +++ lldb/trunk/source/Expression/Materializer.cpp Fri Feb 26 16:12:35 2016 @@ -35,19 +35,19 @@ Materializer::AddStructMember (Entity &e { uint32_t size = entity.GetSize(); uint32_t alignment = entity.GetAlignment(); - + uint32_t ret; - + if (m_current_offset == 0) m_struct_alignment = alignment; - + if (m_current_offset % alignment) m_current_offset += (alignment - (m_current_offset % alignment)); - + ret = m_current_offset; - + m_current_offset += size; - + return ret; } @@ -55,15 +55,15 @@ void Materializer::Entity::SetSizeAndAlignmentFromType (CompilerType &type) { m_size = type.GetByteSize(nullptr); - + uint32_t bit_alignment = type.GetTypeBitAlign(); - + if (bit_alignment % 8) { bit_alignment += 8; bit_alignment &= ~((uint32_t)0x111u); } - + m_alignment = bit_alignment / 8; } @@ -80,59 +80,59 @@ public: m_size = 8; m_alignment = 8; } - + void MakeAllocation (IRMemoryMap &map, Error &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); // Allocate a spare memory area to store the persistent variable's contents. - + Error allocate_error; const bool zero_memory = false; - + lldb::addr_t mem = map.Malloc(m_persistent_variable_sp->GetByteSize(), 8, lldb::ePermissionsReadable | lldb::ePermissionsWritable, IRMemoryMap::eAllocationPolicyMirror, zero_memory, allocate_error); - + if (!allocate_error.Success()) { err.SetErrorStringWithFormat("couldn't allocate a memory area to store %s: %s", m_persistent_variable_sp->GetName().GetCString(), allocate_error.AsCString()); return; } - + if (log) log->Printf("Allocated %s (0x%" PRIx64 ") successfully", m_persistent_variable_sp->GetName().GetCString(), mem); - + // Put the location of the spare memory into the live data of the ValueObject. - + m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope(), m_persistent_variable_sp->GetCompilerType(), m_persistent_variable_sp->GetName(), mem, eAddressTypeLoad, map.GetAddressByteSize()); - + // Clear the flag if the variable will never be deallocated. - + if (m_persistent_variable_sp->m_flags & ExpressionVariable::EVKeepInTarget) { Error leak_error; map.Leak(mem, leak_error); m_persistent_variable_sp->m_flags &= ~ExpressionVariable::EVNeedsAllocation; } - + // Write the contents of the variable to the area. - + Error write_error; - + map.WriteMemory (mem, m_persistent_variable_sp->GetValueBytes(), m_persistent_variable_sp->GetByteSize(), write_error); - + if (!write_error.Success()) { err.SetErrorStringWithFormat ("couldn't write %s to the target: %s", m_persistent_variable_sp->GetName().AsCString(), @@ -140,21 +140,21 @@ public: return; } } - + void DestroyAllocation (IRMemoryMap &map, Error &err) { Error deallocate_error; - + map.Free((lldb::addr_t)m_persistent_variable_sp->m_live_sp->GetValue().GetScalar().ULongLong(), deallocate_error); - + m_persistent_variable_sp->m_live_sp.reset(); - + if (!deallocate_error.Success()) { err.SetErrorStr
Re: [Lldb-commits] [PATCH] D17658: Register value is not necessarily scalar.
This revision was automatically updated to reflect the committed changes. Closed by commit rL262081: Register value is not necessarily scalar. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D17658?vs=49237&id=49238#toc Repository: rL LLVM http://reviews.llvm.org/D17658 Files: lldb/trunk/source/Expression/Materializer.cpp Index: lldb/trunk/source/Expression/Materializer.cpp === --- lldb/trunk/source/Expression/Materializer.cpp +++ lldb/trunk/source/Expression/Materializer.cpp @@ -35,35 +35,35 @@ { uint32_t size = entity.GetSize(); uint32_t alignment = entity.GetAlignment(); - + uint32_t ret; - + if (m_current_offset == 0) m_struct_alignment = alignment; - + if (m_current_offset % alignment) m_current_offset += (alignment - (m_current_offset % alignment)); - + ret = m_current_offset; - + m_current_offset += size; - + return ret; } void Materializer::Entity::SetSizeAndAlignmentFromType (CompilerType &type) { m_size = type.GetByteSize(nullptr); - + uint32_t bit_alignment = type.GetTypeBitAlign(); - + if (bit_alignment % 8) { bit_alignment += 8; bit_alignment &= ~((uint32_t)0x111u); } - + m_alignment = bit_alignment / 8; } @@ -80,117 +80,117 @@ m_size = 8; m_alignment = 8; } - + void MakeAllocation (IRMemoryMap &map, Error &err) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); // Allocate a spare memory area to store the persistent variable's contents. - + Error allocate_error; const bool zero_memory = false; - + lldb::addr_t mem = map.Malloc(m_persistent_variable_sp->GetByteSize(), 8, lldb::ePermissionsReadable | lldb::ePermissionsWritable, IRMemoryMap::eAllocationPolicyMirror, zero_memory, allocate_error); - + if (!allocate_error.Success()) { err.SetErrorStringWithFormat("couldn't allocate a memory area to store %s: %s", m_persistent_variable_sp->GetName().GetCString(), allocate_error.AsCString()); return; } - + if (log) log->Printf("Allocated %s (0x%" PRIx64 ") successfully", m_persistent_variable_sp->GetName().GetCString(), mem); - + // Put the location of the spare memory into the live data of the ValueObject. - + m_persistent_variable_sp->m_live_sp = ValueObjectConstResult::Create (map.GetBestExecutionContextScope(), m_persistent_variable_sp->GetCompilerType(), m_persistent_variable_sp->GetName(), mem, eAddressTypeLoad, map.GetAddressByteSize()); - + // Clear the flag if the variable will never be deallocated. - + if (m_persistent_variable_sp->m_flags & ExpressionVariable::EVKeepInTarget) { Error leak_error; map.Leak(mem, leak_error); m_persistent_variable_sp->m_flags &= ~ExpressionVariable::EVNeedsAllocation; } - + // Write the contents of the variable to the area. - + Error write_error; - + map.WriteMemory (mem, m_persistent_variable_sp->GetValueBytes(), m_persistent_variable_sp->GetByteSize(), write_error); - + if (!write_error.Success()) { err.SetErrorStringWithFormat ("couldn't write %s to the target: %s", m_persistent_variable_sp->GetName().AsCString(), write_error.AsCString()); return; } } - + void DestroyAllocation (IRMemoryMap &map, Error &err) { Error deallocate_error; - + map.Free((lldb::addr_t)m_persistent_variable_sp->m_live_sp->GetValue().GetScalar().ULongLong(), deallocate_error); - + m_persistent_variable_sp->m_live_sp.reset(); - + if (!deallocate_error.Success()) { err.SetErrorStringWithFormat ("couldn't deallocate memory for %s: %s", m_persistent_variable_sp->GetName().GetCString(), deallocate_error.AsCString()); } } - + void Materialize(lldb::StackFrameSP &frame_sp,
Re: [Lldb-commits] [lldb] r262041 - Fix bug with register values byte order in expression evaluation.
I thought I fixed it with http://reviews.llvm.org/D17658. Did you revert that as well? On Sat, Feb 27, 2016 at 3:14 PM, Todd Fiala wrote: > Hi all, > > The new assert was failing on the OS X testbot here: > http://lab.llvm.org:8080/green/job/lldb_build_test/ > > The nag mail didn't make it to you since we have it only fire on the > transition from good build to bad build, and Tamas had the privilege of > earning that with a minor Xcode breakage just shortly before this issue > showed up. However, that bot as been broken since this change went in. > > I reverted it in r262156. > > Feel free to reapply if you have a suggested fix for the test failure > introduced. > > Thanks! > > -Todd > > On Fri, Feb 26, 2016 at 12:08 PM, Chaoren Lin via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >> Hmm. Weird. That assert is failing on Linux: >> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833 >> >> On Fri, Feb 26, 2016 at 9:40 AM, Aidan Dodds via lldb-commits < >> lldb-commits@lists.llvm.org> wrote: >> >>> Author: aidandodds >>> Date: Fri Feb 26 11:40:50 2016 >>> New Revision: 262041 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=262041&view=rev >>> Log: >>> Fix bug with register values byte order in expression evaluation. >>> >>> The evaluation of expressions containing register values was broken for >>> targets for which endianness differs from host. >>> >>> Committed on behalf of: mamai >>> >>> Differential revision: http://reviews.llvm.org/D17167 >>> >>> Modified: >>> lldb/trunk/source/Expression/Materializer.cpp >>> >>> Modified: lldb/trunk/source/Expression/Materializer.cpp >>> URL: >>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262041&r1=262040&r2=262041&view=diff >>> >>> == >>> --- lldb/trunk/source/Expression/Materializer.cpp (original) >>> +++ lldb/trunk/source/Expression/Materializer.cpp Fri Feb 26 11:40:50 >>> 2016 >>> @@ -26,6 +26,7 @@ >>> #include "lldb/Target/StackFrame.h" >>> #include "lldb/Target/Target.h" >>> #include "lldb/Target/Thread.h" >>> +#include "lldb/Utility/LLDBAssert.h" >>> >>> using namespace lldb_private; >>> >>> @@ -1275,9 +1276,14 @@ public: >>> m_register_contents.reset(new >>> DataBufferHeap(register_data.GetDataStart(), register_data.GetByteSize())); >>> >>> Error write_error; >>> - >>> -map.WriteMemory(load_addr, register_data.GetDataStart(), >>> register_data.GetByteSize(), write_error); >>> - >>> + >>> +Scalar scalar; >>> +reg_value.GetScalarValue(scalar); >>> + >>> +lldbassert(scalar.GetByteSize() == register_data.GetByteSize()); >>> + >>> +map.WriteScalarToMemory(load_addr, scalar, >>> scalar.GetByteSize(), write_error); >>> + >>> if (!write_error.Success()) >>> { >>> err.SetErrorStringWithFormat("couldn't write the contents >>> of register %s: %s", m_register_info.name, write_error.AsCString()); >>> >>> >>> ___ >>> 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 >> >> > > > -- > -Todd > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r262041 - Fix bug with register values byte order in expression evaluation.
I think the issue is that on OS X, GetScalarValue fails to return false when the value is *not* actually scalar. When it's not scalar, it should be using WriteMemory instead, right? Or is it possible for GetScalarValue to succeed but return something with a different byte size? On Mon, Feb 29, 2016 at 10:05 AM, Marianne Mailhot-Sarrasin < marianne1...@hotmail.com> wrote: > Really sorry about the breakage. > > Is there anybody who understands what is the issue of using > WriteScalarToMemory when the register value is a scalar? > > From my understanding, using WriteScalarToMemory handles the byte swap > needed when the Host endianness is different from the Target endianness, > which is not done by WriteMemory. Therefor using WriteScalarToMemory is > fixing the evaluation of the registers on my out-of-tree target. > > > 2016-02-29 11:06 GMT-05:00 Aidan Dodds : > >> Sorry about the breakage, and thanks for working on a patch Chaoren. >> Hopefully Marianne will revise her merge request if this fix is still >> important for her. >> >> On 28/02/2016 00:06, Todd Fiala wrote: >> >> I brought the state of the lines changed there to what they were prior to >> the change. If you adjusted those same lines, then yes that got undone. >> >> We were failing different tests in those files. Your change may have >> fixed the new issues on Linux, but did not address the new failures on OS >> X. The OS X bot went green after the revert. >> >> -Todd >> >> On Feb 27, 2016, at 4:01 PM, Chaoren Lin < >> chaor...@google.com> wrote: >> >> I thought I fixed it with <http://reviews.llvm.org/D17658> >> http://reviews.llvm.org/D17658. Did you revert that as well? >> >> On Sat, Feb 27, 2016 at 3:14 PM, Todd Fiala < >> todd.fi...@gmail.com> wrote: >> >>> Hi all, >>> >>> The new assert was failing on the OS X testbot here: >>> http://lab.llvm.org:8080/green/job/lldb_build_test/ >>> >>> The nag mail didn't make it to you since we have it only fire on the >>> transition from good build to bad build, and Tamas had the privilege of >>> earning that with a minor Xcode breakage just shortly before this issue >>> showed up. However, that bot as been broken since this change went in. >>> >>> I reverted it in r262156. >>> >>> Feel free to reapply if you have a suggested fix for the test failure >>> introduced. >>> >>> Thanks! >>> >>> -Todd >>> >>> On Fri, Feb 26, 2016 at 12:08 PM, Chaoren Lin via lldb-commits < >>> lldb-commits@lists.llvm.org> wrote: >>> >>>> Hmm. Weird. That assert is failing on Linux: >>>> <http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833> >>>> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/11833 >>>> >>>> On Fri, Feb 26, 2016 at 9:40 AM, Aidan Dodds via lldb-commits < >>>> lldb-commits@lists.llvm.org> wrote: >>>> >>>>> Author: aidandodds >>>>> Date: Fri Feb 26 11:40:50 2016 >>>>> New Revision: 262041 >>>>> >>>>> URL: http://llvm.org/viewvc/llvm-project?rev=262041&view=rev >>>>> Log: >>>>> Fix bug with register values byte order in expression evaluation. >>>>> >>>>> The evaluation of expressions containing register values was broken >>>>> for targets for which endianness differs from host. >>>>> >>>>> Committed on behalf of: mamai < >>>>> marianne.mailhot.sarra...@gmail.com> >>>>> >>>>> Differential revision: <http://reviews.llvm.org/D17167> >>>>> http://reviews.llvm.org/D17167 >>>>> >>>>> Modified: >>>>> lldb/trunk/source/Expression/Materializer.cpp >>>>> >>>>> Modified: lldb/trunk/source/Expression/Materializer.cpp >>>>> URL: >>>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=262041&r1=262040&r2=262041&view=diff >>>>> >>>>> == >>>>> --- lldb/trunk/source/Expression/Materializer.cpp (original) >>>>> +++ lldb/trunk/source/Expression/Materializer.cpp Fri Feb 26 11:40:50 >>>>> 2016 >>>>> @@ -26,6 +26,7 @@ >>>>> #include "lldb/Target/StackFrame.h" >>>>&g
Re: [Lldb-commits] [PATCH] D17402: Shuffle an #undef to avoid a warning on FreeBSD
chaoren accepted this revision. chaoren added a comment. This revision is now accepted and ready to land. Seems legit. http://reviews.llvm.org/D17402 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D18481: Add argument to expectedFailureAll decorator to xfail for environment variables, and xfail tests for hard float abi and -mthumb on android arm
chaoren added a comment. In http://reviews.llvm.org/D18481#383694, @zturner wrote: > This seems very strange to me. What if someone specifies those flags on the > command line in the makefile instead of via some environment variables? I don't think there's anything we can do about that unless we parse the Makefiles from within the test suite. These kinds of flags are bad to hard code into the Makefiles anyway, unless there's a way to mark a test as thumb specific or hard float specific in the test suite, in which case we'd be using *those* indicators instead to filter for xfail. For now I think this is a pretty reasonable way to discriminate on the validity of failures based on compile flags. > It also seems like a very specialized argument that we might use once or > twice ever. This applies to arbitrary compile flags. Though you probably won't ever need it for x86/x86_64, I can see it being useful for ARM and MIPS due to the sheer number of variations. http://reviews.llvm.org/D18481 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r266702 - Fix Windows build.
Author: chaoren Date: Mon Apr 18 20:09:37 2016 New Revision: 266702 URL: http://llvm.org/viewvc/llvm-project?rev=266702&view=rev Log: Fix Windows build. Modified: lldb/trunk/source/Host/windows/Windows.cpp Modified: lldb/trunk/source/Host/windows/Windows.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Windows.cpp?rev=266702&r1=266701&r2=266702&view=diff == --- lldb/trunk/source/Host/windows/Windows.cpp (original) +++ lldb/trunk/source/Host/windows/Windows.cpp Mon Apr 18 20:09:37 2016 @@ -14,6 +14,7 @@ #include "llvm/Support/ConvertUTF.h" +#include #include #include #include ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r267478 - Fix StackFrame::GetVariables(...) function that was broken by 261858 when lambda functions were added to Block::AppendBlockVariables(). The Stackframe::GetVariables
Is g_global_var necessarily static? On Linux, we're only seeing 2 static variables when your test expects 3. > static_names = ['static_var', 'g_global_var', 'static_var'] I'm guessing g_global_var isn't treated as static. On Mon, Apr 25, 2016 at 2:54 PM, Greg Clayton via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: gclayton > Date: Mon Apr 25 16:54:10 2016 > New Revision: 267478 > > URL: http://llvm.org/viewvc/llvm-project?rev=267478&view=rev > Log: > Fix StackFrame::GetVariables(...) function that was broken by 261858 when > lambda functions were added to Block::AppendBlockVariables(). The > Stackframe::GetVariables(...) function should get all variables regardless > if they are in scope. > > This wasn't caught by the test suite so I added a test for it. > > > Added: > > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/ > > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c > Modified: > lldb/trunk/source/Target/StackFrame.cpp > > Added: > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile?rev=267478&view=auto > > == > --- > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > (added) > +++ > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > Mon Apr 25 16:54:10 2016 > @@ -0,0 +1,5 @@ > +LEVEL = ../../../make > + > +C_SOURCES := main.c > + > +include $(LEVEL)/Makefile.rules > > Added: > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267478&view=auto > > == > --- > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > (added) > +++ > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > Mon Apr 25 16:54:10 2016 > @@ -0,0 +1,190 @@ > +""" > +Test that SBFrame::GetVariables() calls work correctly. > +""" > + > +from __future__ import print_function > + > + > + > +import os, time > +import lldb > +from lldbsuite.test.decorators import * > +from lldbsuite.test.lldbtest import * > +from lldbsuite.test import lldbplatform > +from lldbsuite.test import lldbutil > + > +def get_names_from_value_list(value_list): > +names = list() > +for value in value_list: > +names.append(value.GetName()) > +return names > + > +class TestGetVariables(TestBase): > + > +mydir = TestBase.compute_mydir(__file__) > + > +def setUp(self): > +# Call super's setUp(). > +TestBase.setUp(self) > +self.source = 'main.c' > + > +def verify_variable_names(self, description, value_list, names): > +copy_names = list(names) > +actual_names = get_names_from_value_list(value_list) > +for name in actual_names: > +if name in copy_names: > +copy_names.remove(name) > +else: > +self.assertTrue(False, "didn't find '%s' in %s" % (name, > copy_names)) > +self.assertEqual(len(copy_names), 0, "%s: we didn't find > variables: %s in value list (%s)" % (description, copy_names, actual_names)) > + > +def test (self): > +self.build () > + > +# Set debugger into synchronous mode > +self.dbg.SetAsync(False) > + > +# Create a target by the debugger. > +exe = os.path.join(os.getcwd(), "a.out") > +target = self.dbg.CreateTarget(exe) > +self.assertTrue(target, VALID_TARGET) > + > +line1 = line_number(self.source, '// breakpoint 1') > +line2 = line_number(self.source, '// breakpoint 2') > +line3 = line_number(self.source, '// breakpoint 3') > + > +breakpoint1 = target.BreakpointCreateByLocation (self.source, > line1); > +breakpoint2 = target.BreakpointCreateByLocation (self.source, > line2); > +breakpoint3 = target.BreakpointCreateByLocation (self.source, > line3); > + > +self.assertTrue(breakpoint1.GetNumLocations() >= 1, > PROCESS_IS_VALID) > +self.assertTrue(breakpoint2.GetNumLocations() >= 1, > PROCESS_IS_VALID) > +self.assertTrue(breakpoint3.GetNumLocations() >= 1, > PROCESS_IS_VALID) > + > +# Register our shared libraries for remote targets so they get > automatically uploaded > +arguments = None > +environment = None > + > +# Now launch the process, and do not stop at entry p
Re: [Lldb-commits] [lldb] r267478 - Fix StackFrame::GetVariables(...) function that was broken by 261858 when lambda functions were added to Block::AppendBlockVariables(). The Stackframe::GetVariables
Ah, I see. Is that a known clang bug? On Mon, Apr 25, 2016 at 4:07 PM, Siva Chandra wrote: > AFAICT, happens only with Clang; Using g_static_var, say as "return > g_static_var - 123;", fixes for me. > > On Mon, Apr 25, 2016 at 3:50 PM, Chaoren Lin via lldb-commits > wrote: > > Is g_global_var necessarily static? > > > > On Linux, we're only seeing 2 static variables when your test expects 3. > > > >> static_names = ['static_var', 'g_global_var', 'static_var'] > > > > I'm guessing g_global_var isn't treated as static. > > > > On Mon, Apr 25, 2016 at 2:54 PM, Greg Clayton via lldb-commits > > wrote: > >> > >> Author: gclayton > >> Date: Mon Apr 25 16:54:10 2016 > >> New Revision: 267478 > >> > >> URL: http://llvm.org/viewvc/llvm-project?rev=267478&view=rev > >> Log: > >> Fix StackFrame::GetVariables(...) function that was broken by 261858 > when > >> lambda functions were added to Block::AppendBlockVariables(). The > >> Stackframe::GetVariables(...) function should get all variables > regardless > >> if they are in scope. > >> > >> This wasn't caught by the test suite so I added a test for it. > >> > >> > >> Added: > >> > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/ > >> > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > >> > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > >> > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c > >> Modified: > >> lldb/trunk/source/Target/StackFrame.cpp > >> > >> Added: > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > >> URL: > >> > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile?rev=267478&view=auto > >> > >> > == > >> --- > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > >> (added) > >> +++ > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > >> Mon Apr 25 16:54:10 2016 > >> @@ -0,0 +1,5 @@ > >> +LEVEL = ../../../make > >> + > >> +C_SOURCES := main.c > >> + > >> +include $(LEVEL)/Makefile.rules > >> > >> Added: > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > >> URL: > >> > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267478&view=auto > >> > >> > == > >> --- > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > >> (added) > >> +++ > >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > >> Mon Apr 25 16:54:10 2016 > >> @@ -0,0 +1,190 @@ > >> +""" > >> +Test that SBFrame::GetVariables() calls work correctly. > >> +""" > >> + > >> +from __future__ import print_function > >> + > >> + > >> + > >> +import os, time > >> +import lldb > >> +from lldbsuite.test.decorators import * > >> +from lldbsuite.test.lldbtest import * > >> +from lldbsuite.test import lldbplatform > >> +from lldbsuite.test import lldbutil > >> + > >> +def get_names_from_value_list(value_list): > >> +names = list() > >> +for value in value_list: > >> +names.append(value.GetName()) > >> +return names > >> + > >> +class TestGetVariables(TestBase): > >> + > >> +mydir = TestBase.compute_mydir(__file__) > >> + > >> +def setUp(self): > >> +# Call super's setUp(). > >> +TestBase.setUp(self) > >> +self.source = 'main.c' > >> + > >> +def verify_variable_names(self, description, value_list, names): > >> +copy_names = list(names) > >> +actual_names = get_names_from_va
[Lldb-commits] [PATCH] D19511: Fix TestGetVariables.py.
chaoren created this revision. chaoren added reviewers: sivachandra, clayborg. chaoren added a subscriber: lldb-commits. http://reviews.llvm.org/D19511 Files: packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c === --- packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c +++ packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c @@ -12,8 +12,9 @@ static int g_static_var = 123; int main (int argc, char const *argv[]) -{ +{ static int static_var = 123; +g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears. int i = 0; // breakpoint 1 for (i=0; i<1; ++i) { Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py === --- packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py +++ packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py @@ -79,7 +79,7 @@ arg_names = ['argc', 'argv'] local_names = ['i', 'j', 'k'] -static_names = ['static_var', 'g_global_var', 'static_var'] +static_names = ['static_var', 'g_global_var', 'g_static_var'] breakpoint1_locals = ['i'] breakpoint1_statics = ['static_var'] num_args = len(arg_names) Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c === --- packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c +++ packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c @@ -12,8 +12,9 @@ static int g_static_var = 123; int main (int argc, char const *argv[]) -{ +{ static int static_var = 123; +g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears. int i = 0; // breakpoint 1 for (i=0; i<1; ++i) { Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py === --- packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py +++ packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py @@ -79,7 +79,7 @@ arg_names = ['argc', 'argv'] local_names = ['i', 'j', 'k'] -static_names = ['static_var', 'g_global_var', 'static_var'] +static_names = ['static_var', 'g_global_var', 'g_static_var'] breakpoint1_locals = ['i'] breakpoint1_statics = ['static_var'] num_args = len(arg_names) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19511: Fix TestGetVariables.py.
This revision was automatically updated to reflect the committed changes. Closed by commit rL267492: Fix TestGetVariables.py. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D19511?vs=54940&id=54944#toc Repository: rL LLVM http://reviews.llvm.org/D19511 Files: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c Index: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c === --- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c +++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c @@ -12,8 +12,9 @@ static int g_static_var = 123; int main (int argc, char const *argv[]) -{ +{ static int static_var = 123; +g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears. int i = 0; // breakpoint 1 for (i=0; i<1; ++i) { Index: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py === --- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py +++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py @@ -79,7 +79,7 @@ arg_names = ['argc', 'argv'] local_names = ['i', 'j', 'k'] -static_names = ['static_var', 'g_global_var', 'static_var'] +static_names = ['static_var', 'g_global_var', 'g_static_var'] breakpoint1_locals = ['i'] breakpoint1_statics = ['static_var'] num_args = len(arg_names) Index: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c === --- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c +++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c @@ -12,8 +12,9 @@ static int g_static_var = 123; int main (int argc, char const *argv[]) -{ +{ static int static_var = 123; +g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears. int i = 0; // breakpoint 1 for (i=0; i<1; ++i) { Index: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py === --- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py +++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py @@ -79,7 +79,7 @@ arg_names = ['argc', 'argv'] local_names = ['i', 'j', 'k'] -static_names = ['static_var', 'g_global_var', 'static_var'] +static_names = ['static_var', 'g_global_var', 'g_static_var'] breakpoint1_locals = ['i'] breakpoint1_statics = ['static_var'] num_args = len(arg_names) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r267492 - Fix TestGetVariables.py.
Author: chaoren Date: Mon Apr 25 18:29:53 2016 New Revision: 267492 URL: http://llvm.org/viewvc/llvm-project?rev=267492&view=rev Log: Fix TestGetVariables.py. Reviewers: sivachandra, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D19511 Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267492&r1=267491&r2=267492&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py Mon Apr 25 18:29:53 2016 @@ -79,7 +79,7 @@ class TestGetVariables(TestBase): arg_names = ['argc', 'argv'] local_names = ['i', 'j', 'k'] -static_names = ['static_var', 'g_global_var', 'static_var'] +static_names = ['static_var', 'g_global_var', 'g_static_var'] breakpoint1_locals = ['i'] breakpoint1_statics = ['static_var'] num_args = len(arg_names) Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c?rev=267492&r1=267491&r2=267492&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c (original) +++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c Mon Apr 25 18:29:53 2016 @@ -12,8 +12,9 @@ int g_global_var = 123; static int g_static_var = 123; int main (int argc, char const *argv[]) -{ +{ static int static_var = 123; +g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears. int i = 0; // breakpoint 1 for (i=0; i<1; ++i) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r267478 - Fix StackFrame::GetVariables(...) function that was broken by 261858 when lambda functions were added to Block::AppendBlockVariables(). The Stackframe::GetVariables
Because it's compiled in debug mode? I wouldn't expect *any* optimization to be done in that case. On Mon, Apr 25, 2016 at 4:35 PM, Siva Chandra wrote: > Clang is probably right. Why bother to emit an unused file static scalar? > > On Mon, Apr 25, 2016 at 4:21 PM, Chaoren Lin wrote: > > Ah, I see. Is that a known clang bug? > > > > On Mon, Apr 25, 2016 at 4:07 PM, Siva Chandra > > wrote: > >> > >> AFAICT, happens only with Clang; Using g_static_var, say as "return > >> g_static_var - 123;", fixes for me. > >> > >> On Mon, Apr 25, 2016 at 3:50 PM, Chaoren Lin via lldb-commits > >> wrote: > >> > Is g_global_var necessarily static? > >> > > >> > On Linux, we're only seeing 2 static variables when your test expects > 3. > >> > > >> >> static_names = ['static_var', 'g_global_var', 'static_var'] > >> > > >> > I'm guessing g_global_var isn't treated as static. > >> > > >> > On Mon, Apr 25, 2016 at 2:54 PM, Greg Clayton via lldb-commits > >> > wrote: > >> >> > >> >> Author: gclayton > >> >> Date: Mon Apr 25 16:54:10 2016 > >> >> New Revision: 267478 > >> >> > >> >> URL: http://llvm.org/viewvc/llvm-project?rev=267478&view=rev > >> >> Log: > >> >> Fix StackFrame::GetVariables(...) function that was broken by 261858 > >> >> when > >> >> lambda functions were added to Block::AppendBlockVariables(). The > >> >> Stackframe::GetVariables(...) function should get all variables > >> >> regardless > >> >> if they are in scope. > >> >> > >> >> This wasn't caught by the test suite so I added a test for it. > >> >> > >> >> > >> >> Added: > >> >> > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/ > >> >> > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > >> >> > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > >> >> > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c > >> >> Modified: > >> >> lldb/trunk/source/Target/StackFrame.cpp > >> >> > >> >> Added: > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > >> >> URL: > >> >> > >> >> > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile?rev=267478&view=auto > >> >> > >> >> > >> >> > == > >> >> --- > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > >> >> (added) > >> >> +++ > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile > >> >> Mon Apr 25 16:54:10 2016 > >> >> @@ -0,0 +1,5 @@ > >> >> +LEVEL = ../../../make > >> >> + > >> >> +C_SOURCES := main.c > >> >> + > >> >> +include $(LEVEL)/Makefile.rules > >> >> > >> >> Added: > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > >> >> URL: > >> >> > >> >> > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267478&view=auto > >> >> > >> >> > >> >> > == > >> >> --- > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py > >> >> (added) > >> >> +++ > >> >> > >> >> > lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVa
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren added inline comments. Comment at: test/dosep.py:82 @@ +81,3 @@ +with output_lock: +print >> sys.stderr, stdout +print >> sys.stderr, "[%s] FAILED" % name Why did you move this here? Could you please move stderr here too? It seems weird stderr is labeled but stdout isn't. Comment at: test/dosep.py:102 @@ -89,2 +101,3 @@ test_counter.value += 1 +sys.stdout.flush() sys.stderr.flush() This and `sys.stderr.flush()` should be under the `with output_lock:`. My mistake. Sorry. Comment at: test/dosep.py:142 @@ -128,2 +141,3 @@ passes, failures = parse_test_results(output) -update_status(name, command, output if exit_status != 0 else None) +if exit_status == 0: +report_test_pass(name, output[1]) Could you please do: ``` if exit_status != 0: report_test_failure(...) elif output_on_success: report_test_pass(...) ``` so it's completely silent on success? Comment at: test/dosep.py:143 @@ +142,3 @@ +if exit_status == 0: +report_test_pass(name, output[1]) +else: Do you mean `output[0]`? For consistency, should we print stderr for success too? Even if it's mostly empty. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren added inline comments. Comment at: test/dosep.py:142 @@ -128,2 +141,3 @@ passes, failures = parse_test_results(output) -update_status(name, command, output if exit_status != 0 else None) +if exit_status == 0: +report_test_pass(name, output[1]) zturner wrote: > chaoren wrote: > > Could you please do: > > > > ``` > > if exit_status != 0: > > report_test_failure(...) > > elif output_on_success: > > report_test_pass(...) > > ``` > > > > so it's completely silent on success? > I don't know that it should be completely silent. For starters, if you do it > the way you suggest, it won't end up updating the progress, which is > something you definitely need to see. But I think it's worthwhile to see the > names of the individual tests that are running. The way I've written it now, > you if `output_on_success` is False, you will only see one additional line, > which is the name of the test being run. I think that's useful and does not > add any noise to the output Ah, I was thinking there would still be ``` \r x out of y test suites processed ``` my bad. Could you change that to something like: ``` \r x out of y test suites processed - [test name] ``` with the carriage return (\r), so the screen doesn't scroll on success? http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren added inline comments. Comment at: test/dosep.py:142 @@ +141,3 @@ +if exit_status == 0: +# stdout does not have any useful information from 'dotest.py', only stderr does. +report_test_pass(name, output[1]) To clarify, I mean something like: ``` with output_lock: if output_on_success: print >> sys.stderr, output print >> sys.stderr, "[%s] PASSED" % name # silent update_progress() ``` in `report_test_pass`. and ``` sys.stderr.write("\r%*d out of %d test suites processed - [%s]\n" % (len(str(total_tests)), test_counter.value, total_tests), name) ``` in `update_progress`. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren accepted this revision. chaoren added a comment. This revision is now accepted and ready to land. LGTM. I'll do the overwritable lines in a follow up patch. You don't really need a stateful printer, just need to get the length of the longest test name. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D11825: Add -latomic to Android mips build to avoid http://b.android.com/182094.
chaoren created this revision. chaoren added a reviewer: ovyalov. chaoren added a subscriber: lldb-commits. Herald added subscribers: srhines, danalbert, tberghammer. http://reviews.llvm.org/D11825 Files: cmake/platforms/Android.cmake Index: cmake/platforms/Android.cmake === --- cmake/platforms/Android.cmake +++ cmake/platforms/Android.cmake @@ -107,6 +107,9 @@ # Temporary workaround for static linking with the latest API. set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" ) endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) endif() if( NOT LLVM_BUILD_STATIC ) Index: cmake/platforms/Android.cmake === --- cmake/platforms/Android.cmake +++ cmake/platforms/Android.cmake @@ -107,6 +107,9 @@ # Temporary workaround for static linking with the latest API. set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" ) endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) endif() if( NOT LLVM_BUILD_STATIC ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11825: Add -latomic to Android mips build to avoid http://b.android.com/182094.
This revision was automatically updated to reflect the committed changes. Closed by commit rL244298: Add -latomic to Android mips build to avoid http://b.android.com/182094. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D11825?vs=31493&id=31494#toc Repository: rL LLVM http://reviews.llvm.org/D11825 Files: lldb/trunk/cmake/platforms/Android.cmake Index: lldb/trunk/cmake/platforms/Android.cmake === --- lldb/trunk/cmake/platforms/Android.cmake +++ lldb/trunk/cmake/platforms/Android.cmake @@ -107,6 +107,9 @@ # Temporary workaround for static linking with the latest API. set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" ) endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) endif() if( NOT LLVM_BUILD_STATIC ) Index: lldb/trunk/cmake/platforms/Android.cmake === --- lldb/trunk/cmake/platforms/Android.cmake +++ lldb/trunk/cmake/platforms/Android.cmake @@ -107,6 +107,9 @@ # Temporary workaround for static linking with the latest API. set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" ) endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) endif() if( NOT LLVM_BUILD_STATIC ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11825: Add -latomic to Android mips build to avoid http://b.android.com/182094.
chaoren marked an inline comment as done. Comment at: lldb/trunk/cmake/platforms/Android.cmake:110 @@ -109,1 +109,3 @@ endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 ovyalov wrote: > Do we need the same workaround for mips64? Nope. Repository: rL LLVM http://reviews.llvm.org/D11825 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D11840: Update to D11825.
chaoren created this revision. chaoren added a reviewer: Andrzej. chaoren added a subscriber: lldb-commits. Herald added subscribers: srhines, danalbert, tberghammer. Adding `-latomic` to `ANDROID_LINKER_FLAGS` doesn't actually work. Adding `atomic` to `LLDB_SYSTEM_LIBS` does. Related: D11831. http://reviews.llvm.org/D11840 Files: cmake/platforms/Android.cmake Index: cmake/platforms/Android.cmake === --- cmake/platforms/Android.cmake +++ cmake/platforms/Android.cmake @@ -109,7 +109,11 @@ endif() elseif( ANDROID_ABI STREQUAL "mips" ) # http://b.android.com/182094 - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) + list( FIND LLDB_SYSTEM_LIBS atomic index ) + if( index EQUAL -1 ) + list( APPEND LLDB_SYSTEM_LIBS atomic ) + set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE ) + endif() endif() if( NOT LLVM_BUILD_STATIC ) Index: cmake/platforms/Android.cmake === --- cmake/platforms/Android.cmake +++ cmake/platforms/Android.cmake @@ -109,7 +109,11 @@ endif() elseif( ANDROID_ABI STREQUAL "mips" ) # http://b.android.com/182094 - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) + list( FIND LLDB_SYSTEM_LIBS atomic index ) + if( index EQUAL -1 ) + list( APPEND LLDB_SYSTEM_LIBS atomic ) + set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE ) + endif() endif() if( NOT LLVM_BUILD_STATIC ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren requested changes to this revision. This revision now requires changes to proceed. Comment at: test/dosep.py:1 @@ -1,2 +1,2 @@ -#!/usr/bin/env python +#!/usr/bin/env python I think you added a character here. Could you please double check before submitting? http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.
chaoren created this revision. chaoren added a reviewer: zturner. chaoren added a subscriber: lldb-commits. Update to D11816. http://reviews.llvm.org/D11843 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -66,41 +66,47 @@ output_lock = None test_counter = None total_tests = None +test_name_len = None dotest_options = None output_on_success = False -def setup_global_variables(lock, counter, total, options): -global output_lock, test_counter, total_tests, dotest_options +def setup_global_variables(lock, counter, total, name_len, options): +global output_lock, test_counter, total_tests, test_name_len +global dotest_options output_lock = lock test_counter = counter total_tests = total +test_name_len = name_len dotest_options = options def report_test_failure(name, command, output): global output_lock with output_lock: -print >> sys.stderr, "\n" +print >> sys.stderr print >> sys.stderr, output +print >> sys.stderr, "[%s FAILED]" % name print >> sys.stderr, "Command invoked: %s" % ' '.join(command) -update_progress("FAILED", name) +update_progress(name) def report_test_pass(name, output): global output_lock, output_on_success with output_lock: if output_on_success: -print >> sys.stderr, "\n" +print >> sys.stderr print >> sys.stderr, output -update_progress("PASSED", name) +print >> sys.stderr, "[%s PASSED]" % name +update_progress(name) -def update_progress(test_name, result): -global output_lock, test_counter, total_tests +def update_progress(test_name=""): +global output_lock, test_counter, total_tests, test_name_len with output_lock: -if test_name != None: -sys.stderr.write("\n[%s %s] - %d out of %d test suites processed" % -(result, test_name, test_counter.value, total_tests)) -else: -sys.stderr.write("\n%d out of %d test suites processed" % -(test_counter.value, total_tests)) +counter_len = len(str(total_tests)) +sys.stderr.write( +"\r%*d test suites out of %d directories processed - %-*s" % +(counter_len, test_counter.value, total_tests, + test_name_len.value, test_name)) +if len(test_name) > test_name_len.value: +test_name_len.value = len(test_name) test_counter.value += 1 sys.stdout.flush() sys.stderr.flush() @@ -213,19 +219,23 @@ for root, dirs, files in os.walk(test_subdir, topdown=False): test_work_items.append((root, files, test_directory, dotest_argv)) -global output_lock, test_counter, total_tests +global output_lock, test_counter, total_tests, test_name_len output_lock = multiprocessing.RLock() total_tests = len(test_work_items) test_counter = multiprocessing.Value('i', 0) -print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests, num_threads) -update_progress(None, None) +test_name_len = multiprocessing.Value('i', 0) +print >> sys.stderr, "Testing: %d directories, %d threads" % ( +total_tests, num_threads) +update_progress() # Run the items, either in a pool (for multicore speedup) or # calling each individually. if num_threads > 1: -pool = multiprocessing.Pool(num_threads, -initializer = setup_global_variables, -initargs = (output_lock, test_counter, total_tests, dotest_options)) +pool = multiprocessing.Pool( +num_threads, +initializer=setup_global_variables, +initargs=(output_lock, test_counter, total_tests, test_name_len, + dotest_options)) test_results = pool.map(process_dir_worker, test_work_items) else: test_results = [] Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -66,41 +66,47 @@ output_lock = None test_counter = None total_tests = None +test_name_len = None dotest_options = None output_on_success = False -def setup_global_variables(lock, counter, total, options): -global output_lock, test_counter, total_tests, dotest_options +def setup_global_variables(lock, counter, total, name_len, options): +global output_lock, test_counter, total_tests, test_name_len +global dotest_options output_lock = lock test_counter = counter total_tests = total +test_name_len = name_len dotest_options = options def report_test_failure(name, command, output): global output_lock with output_lock: -print >> sys.stderr, "\n" +print >> sys.stderr print >> sys.stderr, output +print >> sys.stderr, "[%s FAILED]" % name print >> sys.stderr, "C
Re: [Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.
chaoren added a comment. > I was hoping to get my change in first, what do you think? What do you mean? This is an update to http://reviews.llvm.org/D11816. I can't commit it without your change. http://reviews.llvm.org/D11843 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D11846: Make dosep.py PEP8 compliant. NFC.
chaoren created this revision. chaoren added a reviewer: zturner. chaoren added a subscriber: lldb-commits. Update to D11843. http://reviews.llvm.org/D11846 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -20,7 +20,8 @@ E.g., export LLDB_TEST_TIMEOUT=0 orexport LLDB_TESTCONCURRENTEVENTS_TIMEOUT=0 -To collect core files for timed out tests, do the following before running dosep.py +To collect core files for timed out tests, +do the following before running dosep.py OSX ulimit -c unlimited @@ -43,6 +44,7 @@ from optparse import OptionParser + def get_timeout_command(): """Search for a suitable timeout command.""" if not sys.platform.startswith("win32"): @@ -70,6 +72,7 @@ dotest_options = None output_on_success = False + def setup_global_variables(lock, counter, total, name_len, options): global output_lock, test_counter, total_tests, test_name_len global dotest_options @@ -79,6 +82,7 @@ test_name_len = name_len dotest_options = options + def report_test_failure(name, command, output): global output_lock with output_lock: @@ -88,6 +92,7 @@ print >> sys.stderr, "Command invoked: %s" % ' '.join(command) update_progress(name) + def report_test_pass(name, output): global output_lock, output_on_success with output_lock: @@ -97,6 +102,7 @@ print >> sys.stderr, "[%s PASSED]" % name update_progress(name) + def update_progress(test_name=""): global output_lock, test_counter, total_tests, test_name_len with output_lock: @@ -111,50 +117,60 @@ sys.stdout.flush() sys.stderr.flush() + def parse_test_results(output): passes = 0 failures = 0 for result in output: -pass_count = re.search("^RESULT:.*([0-9]+) passes", result, re.MULTILINE) -fail_count = re.search("^RESULT:.*([0-9]+) failures", result, re.MULTILINE) -error_count = re.search("^RESULT:.*([0-9]+) errors", result, re.MULTILINE) +pass_count = re.search("^RESULT:.*([0-9]+) passes", + result, re.MULTILINE) +fail_count = re.search("^RESULT:.*([0-9]+) failures", + result, re.MULTILINE) +error_count = re.search("^RESULT:.*([0-9]+) errors", +result, re.MULTILINE) this_fail_count = 0 this_error_count = 0 -if pass_count != None: +if pass_count is not None: passes = passes + int(pass_count.group(1)) -if fail_count != None: +if fail_count is not None: failures = failures + int(fail_count.group(1)) -if error_count != None: +if error_count is not None: failures = failures + int(error_count.group(1)) pass return passes, failures + def call_with_timeout(command, timeout, name): """Run command with a timeout if possible.""" """-s QUIT will create a coredump if they are enabled on your system""" process = None if timeout_command and timeout != "0": command = [timeout_command, '-s', 'QUIT', timeout] + command -# Specifying a value for close_fds is unsupported on Windows when using subprocess.PIPE +# Specifying a value for close_fds is unsupported on Windows when using +# subprocess.PIPE if os.name != "nt": -process = subprocess.Popen(command, stdin=subprocess.PIPE, -stdout=subprocess.PIPE, -stderr=subprocess.PIPE, -close_fds=True) +process = subprocess.Popen(command, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + close_fds=True) else: -process = subprocess.Popen(command, stdin=subprocess.PIPE, -stdout=subprocess.PIPE, -stderr=subprocess.PIPE) +process = subprocess.Popen(command, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) output = process.communicate() exit_status = process.returncode passes, failures = parse_test_results(output) if exit_status == 0: -# stdout does not have any useful information from 'dotest.py', only stderr does. +# stdout does not have any useful information from 'dotest.py', +# only stderr does. report_test_pass(name, output[1]) else: report_test_failure(name, command, output[1]) return exit_status, passes, failures + def process_dir(root, files, test_root, dotest_argv
Re: [Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.
chaoren updated this revision to Diff 31558. chaoren added a comment. - Rename counter in terms of directories. http://reviews.llvm.org/D11843 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -64,44 +64,49 @@ eTimedOut, ePassed, eFailed = 124, 0, 1 output_lock = None -test_counter = None -total_tests = None +directory_counter = None +total_directories = None +test_name_len = None dotest_options = None output_on_success = False -def setup_global_variables(lock, counter, total, options): -global output_lock, test_counter, total_tests, dotest_options +def setup_global_variables(lock, counter, total, name_len, options): +global output_lock, directory_counter, total_directories, test_name_len +global dotest_options output_lock = lock -test_counter = counter -total_tests = total +directory_counter = counter +total_directories = total +test_name_len = name_len dotest_options = options def report_test_failure(name, command, output): global output_lock with output_lock: -print >> sys.stderr, "\n" +print >> sys.stderr print >> sys.stderr, output +print >> sys.stderr, "[%s FAILED]" % name print >> sys.stderr, "Command invoked: %s" % ' '.join(command) -update_progress("FAILED", name) +update_progress(name) def report_test_pass(name, output): global output_lock, output_on_success with output_lock: if output_on_success: -print >> sys.stderr, "\n" +print >> sys.stderr print >> sys.stderr, output -update_progress("PASSED", name) +print >> sys.stderr, "[%s PASSED]" % name +update_progress(name) -def update_progress(test_name, result): -global output_lock, test_counter, total_tests +def update_progress(test_name=""): +global output_lock, directory_counter, total_directories, test_name_len with output_lock: -if test_name != None: -sys.stderr.write("\n[%s %s] - %d out of %d test suites processed" % -(result, test_name, test_counter.value, total_tests)) -else: -sys.stderr.write("\n%d out of %d test suites processed" % -(test_counter.value, total_tests)) -test_counter.value += 1 +counter_len = len(str(total_directories)) +sys.stderr.write( +"\r%*d out of %d directories processed - %-*s" % +(counter_len, directory_counter.value, total_directories, + test_name_len.value, test_name)) +if len(test_name) > test_name_len.value: +test_name_len.value = len(test_name) sys.stdout.flush() sys.stderr.flush() @@ -187,6 +192,8 @@ if eTimedOut == exit_status: timed_out.append(name) failed.append(name) +with directory_counter.get_lock(): +directory_counter.value += 1 return (timed_out, failed, passed, fail_sub_count, pass_sub_count) in_q = None @@ -213,19 +220,23 @@ for root, dirs, files in os.walk(test_subdir, topdown=False): test_work_items.append((root, files, test_directory, dotest_argv)) -global output_lock, test_counter, total_tests +global output_lock, directory_counter, total_directories, test_name_len output_lock = multiprocessing.RLock() -total_tests = len(test_work_items) -test_counter = multiprocessing.Value('i', 0) -print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests, num_threads) -update_progress(None, None) +total_directories = len(test_work_items) +directory_counter = multiprocessing.Value('i', 0) +test_name_len = multiprocessing.Value('i', 0) +print >> sys.stderr, "Testing: %d directories, %d threads" % ( +total_directories, num_threads) +update_progress() # Run the items, either in a pool (for multicore speedup) or # calling each individually. if num_threads > 1: -pool = multiprocessing.Pool(num_threads, -initializer = setup_global_variables, -initargs = (output_lock, test_counter, total_tests, dotest_options)) +pool = multiprocessing.Pool( +num_threads, +initializer=setup_global_variables, +initargs=(output_lock, directory_counter, total_directories, + test_name_len, dotest_options)) test_results = pool.map(process_dir_worker, test_work_items) else: test_results = [] ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.
chaoren updated this revision to Diff 31633. chaoren added a comment. - Proper counting of total number of tests. http://reviews.llvm.org/D11843 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -66,41 +66,47 @@ output_lock = None test_counter = None total_tests = None +test_name_len = None dotest_options = None output_on_success = False -def setup_global_variables(lock, counter, total, options): -global output_lock, test_counter, total_tests, dotest_options +def setup_global_variables(lock, counter, total, name_len, options): +global output_lock, test_counter, total_tests, test_name_len +global dotest_options output_lock = lock test_counter = counter total_tests = total +test_name_len = name_len dotest_options = options def report_test_failure(name, command, output): global output_lock with output_lock: -print >> sys.stderr, "\n" +print >> sys.stderr print >> sys.stderr, output +print >> sys.stderr, "[%s FAILED]" % name print >> sys.stderr, "Command invoked: %s" % ' '.join(command) -update_progress("FAILED", name) +update_progress(name) def report_test_pass(name, output): global output_lock, output_on_success with output_lock: if output_on_success: -print >> sys.stderr, "\n" +print >> sys.stderr print >> sys.stderr, output -update_progress("PASSED", name) +print >> sys.stderr, "[%s PASSED]" % name +update_progress(name) -def update_progress(test_name, result): -global output_lock, test_counter, total_tests +def update_progress(test_name=""): +global output_lock, test_counter, total_tests, test_name_len with output_lock: -if test_name != None: -sys.stderr.write("\n[%s %s] - %d out of %d test suites processed" % -(result, test_name, test_counter.value, total_tests)) -else: -sys.stderr.write("\n%d out of %d test suites processed" % -(test_counter.value, total_tests)) +counter_len = len(str(total_tests)) +sys.stderr.write( +"\r%*d out of %d test suites processed - %-*s" % +(counter_len, test_counter.value, total_tests, + test_name_len.value, test_name)) +if len(test_name) > test_name_len.value: +test_name_len.value = len(test_name) test_counter.value += 1 sys.stdout.flush() sys.stderr.flush() @@ -157,16 +163,6 @@ pass_sub_count = 0 fail_sub_count = 0 for name in files: -path = os.path.join(root, name) - -# We're only interested in the test file with the "Test*.py" naming pattern. -if not name.startswith("Test") or not name.endswith(".py"): -continue - -# Neither a symbolically linked file. -if os.path.islink(path): -continue - script_file = os.path.join(test_root, "dotest.py") command = ([sys.executable, script_file] + dotest_argv + @@ -211,21 +207,34 @@ # Collect the test files that we'll run. test_work_items = [] for root, dirs, files in os.walk(test_subdir, topdown=False): -test_work_items.append((root, files, test_directory, dotest_argv)) +def is_test(name): +# Not interested in symbolically linked files. +if os.path.islink(os.path.join(root, name)): +return False +# Only interested in test files with the "Test*.py" naming pattern. +return name.startswith("Test") and name.endswith(".py") + +tests = filter(is_test, files) +test_work_items.append((root, tests, test_directory, dotest_argv)) -global output_lock, test_counter, total_tests +global output_lock, test_counter, total_tests, test_name_len output_lock = multiprocessing.RLock() -total_tests = len(test_work_items) +# item = (root, tests, test_directory, dotest_argv) +total_tests = sum([len(item[1]) for item in test_work_items]) test_counter = multiprocessing.Value('i', 0) -print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests, num_threads) -update_progress(None, None) +test_name_len = multiprocessing.Value('i', 0) +print >> sys.stderr, "Testing: %d test suites, %d thread%s" % ( +total_tests, num_threads, (num_threads > 1) * "s") +update_progress() # Run the items, either in a pool (for multicore speedup) or # calling each individually. if num_threads > 1: -pool = multiprocessing.Pool(num_threads, -initializer = setup_global_variables, -initargs = (output_lock, test_counter, total_tests, dotest_options)) +pool = multiprocessing.Pool( +num_threads, +initializer=setup_global_variables, +
[Lldb-commits] [PATCH] D11909: Don't print number of failures and percentage if no tests ran.
chaoren created this revision. chaoren added a reviewer: zturner. chaoren added a subscriber: lldb-commits. http://reviews.llvm.org/D11909 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -444,10 +444,16 @@ touch(os.path.join(session_dir, "{}-{}".format(result, test_name))) print -print "Ran %d test suites (%d failed) (%f%%)" % (num_test_files, len(failed), -(100.0 * len(failed) / num_test_files) if num_test_files > 0 else float('NaN')) -print "Ran %d test cases (%d failed) (%f%%)" % (num_tests, all_fails, -(100.0 * all_fails / num_tests) if num_tests > 0 else float('NaN')) +sys.stdout.write("Ran %d test suites" % num_test_files) +if num_test_files > 0: +sys.stdout.write(" (%d failed) (%f%%)" % ( +len(failed), 100.0 * len(failed) / num_test_files)) +print +sys.stdout.write("Ran %d test cases" % num_tests) +if num_tests > 0: +sys.stdout.write(" (%d failed) (%f%%)" % ( +all_fails, 100.0 * all_fails / num_tests)) +print if len(failed) > 0: failed.sort() print "Failing Tests (%d)" % len(failed) Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -444,10 +444,16 @@ touch(os.path.join(session_dir, "{}-{}".format(result, test_name))) print -print "Ran %d test suites (%d failed) (%f%%)" % (num_test_files, len(failed), -(100.0 * len(failed) / num_test_files) if num_test_files > 0 else float('NaN')) -print "Ran %d test cases (%d failed) (%f%%)" % (num_tests, all_fails, -(100.0 * all_fails / num_tests) if num_tests > 0 else float('NaN')) +sys.stdout.write("Ran %d test suites" % num_test_files) +if num_test_files > 0: +sys.stdout.write(" (%d failed) (%f%%)" % ( +len(failed), 100.0 * len(failed) / num_test_files)) +print +sys.stdout.write("Ran %d test cases" % num_tests) +if num_tests > 0: +sys.stdout.write(" (%d failed) (%f%%)" % ( +all_fails, 100.0 * all_fails / num_tests)) +print if len(failed) > 0: failed.sort() print "Failing Tests (%d)" % len(failed) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits