Enable dwarf test on non-mac platforms
http://reviews.llvm.org/D7550
Files:
scripts/Python/finish-swig-Python-LLDB.sh
scripts/Python/finishSwigPythonLLDB.py
test/functionalities/launch_with_glob/TestLaunchWithGlob.py
tools/CMakeLists.txt
tools/argdumper/CMakeLists.txt
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
Index: scripts/Python/finish-swig-Python-LLDB.sh
===================================================================
--- scripts/Python/finish-swig-Python-LLDB.sh
+++ scripts/Python/finish-swig-Python-LLDB.sh
@@ -167,6 +167,7 @@
fi
fi
+# Make symlink for darwin-debug on Darwin
if [ ${OS_NAME} = "Darwin" ] && [ $MakefileCalled -ne 0 ]
then
# We are being built by CMake on Darwin
@@ -187,6 +188,27 @@
fi
fi
+# Make symlink for argdumper on any platform
+if [ $MakefileCalled -ne 0 ]
+then
+ # We are being built by CMake
+
+ if [ ! -L "${framework_python_dir}/argdumper" ]
+ then
+ if [ $Debug -eq 1 ]
+ then
+ echo "Creating symlink for argdumper"
+ fi
+ cd "${framework_python_dir}"
+ ln -s "../../../../bin/argdumper" argdumper
+ else
+ if [ $Debug -eq 1 ]
+ then
+ echo "${framework_python_dir}/argdumper already exists."
+ fi
+ fi
+fi
+
create_python_package () {
package_dir="${framework_python_dir}$1"
package_files="$2"
Index: scripts/Python/finishSwigPythonLLDB.py
===================================================================
--- scripts/Python/finishSwigPythonLLDB.py
+++ scripts/Python/finishSwigPythonLLDB.py
@@ -377,6 +377,53 @@
return (bOk, strMsg);
#++---------------------------------------------------------------------------
+# Details: Make the symbolic link to the argdumper. Code for all platforms
+# apart from Windows.
+# Args: vDictArgs - (R) Program input parameters.
+# vstrFrameworkPythonDir - (R) Python framework directory.
+# vstrArgdumperFileName - (R) File name for argdumper.
+# Returns: Bool - True = function success, False = failure.
+# Str - Error description on task failure.
+# Throws: None.
+#--
+def make_symlink_argdumper( vDictArgs, vstrFrameworkPythonDir, vstrArgdumperFileName ):
+ dbg = utilsDebug.CDebugFnVerbose( "Python script make_symlink_other_platforms()" );
+ bOk = True;
+ strMsg = "";
+ bDbg = vDictArgs.has_key( "-d" );
+ strTarget = vstrArgdumperFileName
+ strArgdumperPath = "%s/%s" % (vstrFrameworkPythonDir, strTarget);
+ strTarget = os.path.normcase( strArgdumperPath );
+ strSrc = "";
+
+ os.chdir( vstrFrameworkPythonDir );
+ bMakeFileCalled = vDictArgs.has_key( "-m" );
+ if not bMakeFileCalled:
+ return (bOk, strMsg);
+ else:
+ strSrc = os.path.normcase( "../../../../bin/argdumper" );
+
+ if os.path.islink( strTarget ):
+ if bDbg:
+ print strMsglldbsoExists % strTarget;
+ return (bOk, strMsg);
+
+ if bDbg:
+ print strMsglldbsoMk;
+
+ try:
+ os.symlink( strSrc, strTarget );
+ except OSError as e:
+ bOk = False;
+ strMsg = "OSError( %d ): %s %s" % (e.errno, e.strerror, strErrMsgMakeSymlink);
+ strMsg += " Src:'%s' Target:'%s'" % (strSrc, strTarget);
+ except:
+ bOk = False;
+ strMsg = strErrMsgUnexpected % sys.exec_info()[ 0 ];
+
+ return (bOk, strMsg);
+
+#++---------------------------------------------------------------------------
# Details: Make the symlink that the script bridge for Python will need in
# the Python framework directory.
# Args: vDictArgs - (R) Program input parameters.
@@ -406,13 +453,20 @@
vstrFrameworkPythonDir,
strSoFileName );
- # Make symlink for darwin-debug
+ # Make symlink for darwin-debug on Darwin
strDarwinDebugFileName = "darwin-debug"
if bOk and eOSType == utilsOsType.EnumOsType.Darwin:
bOk, strErrMsg = make_symlink_darwin_debug( vDictArgs,
vstrFrameworkPythonDir,
strDarwinDebugFileName );
+ # Make symlink for argdumper on any platform
+ strArgdumperFileName = "argdumper"
+ if bOk:
+ bOk, strErrMsg = make_symlink_argdumper( vDictArgs,
+ vstrFrameworkPythonDir,
+ strArgdumperFileName );
+
return (bOk, strErrMsg);
#++---------------------------------------------------------------------------
Index: test/functionalities/launch_with_glob/TestLaunchWithGlob.py
===================================================================
--- test/functionalities/launch_with_glob/TestLaunchWithGlob.py
+++ test/functionalities/launch_with_glob/TestLaunchWithGlob.py
@@ -21,7 +21,6 @@
self.do_test ()
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dwarf_test
def test_with_dwarf (self):
self.buildDwarf()
Index: tools/CMakeLists.txt
===================================================================
--- tools/CMakeLists.txt
+++ tools/CMakeLists.txt
@@ -2,6 +2,7 @@
add_subdirectory(darwin-debug)
add_subdirectory(debugserver)
endif()
+ add_subdirectory(argdumper)
add_subdirectory(driver)
if (NOT __ANDROID_NDK__)
add_subdirectory(lldb-mi)
Index: tools/argdumper/CMakeLists.txt
===================================================================
--- /dev/null
+++ tools/argdumper/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_lldb_executable(argdumper
+ argdumper.cpp
+ )
+
+target_link_libraries(argdumper liblldb)
+
+install(TARGETS argdumper
+ RUNTIME DESTINATION bin)
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits