You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by nn...@apache.org on 2014/01/29 01:02:31 UTC

git commit: Added LLDB convenience scripts.

Updated Branches:
  refs/heads/master 6f92fecc0 -> 2aad6c9ae


Added LLDB convenience scripts.

This patch adds lldb-mesos-tests, lldb-mesos-local, lldb-mesos-master
and lldb-mesos-slave in similar style as gdb-mesos-* as GDB seems to
have been out phased on OS X Mavericks.

Review: https://reviews.apache.org/r/17445


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2aad6c9a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2aad6c9a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2aad6c9a

Branch: refs/heads/master
Commit: 2aad6c9ae894fca95114f18ddb8d5a055bdd2b0e
Parents: 6f92fec
Author: Niklas Q. Nielsen <ni...@mesosphere.io>
Authored: Tue Jan 28 15:22:59 2014 -0800
Committer: Niklas Q. Nielsen <ni...@mesosphere.io>
Committed: Tue Jan 28 16:01:53 2014 -0800

----------------------------------------------------------------------
 bin/lldb-mesos-local.sh.in  | 41 ++++++++++++++++++++++++++++++++++++++++
 bin/lldb-mesos-master.sh.in | 41 ++++++++++++++++++++++++++++++++++++++++
 bin/lldb-mesos-slave.sh.in  | 41 ++++++++++++++++++++++++++++++++++++++++
 bin/lldb-mesos-tests.sh.in  | 41 ++++++++++++++++++++++++++++++++++++++++
 configure.ac                |  4 ++++
 5 files changed, 168 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2aad6c9a/bin/lldb-mesos-local.sh.in
----------------------------------------------------------------------
diff --git a/bin/lldb-mesos-local.sh.in b/bin/lldb-mesos-local.sh.in
new file mode 100644
index 0000000..35011fd
--- /dev/null
+++ b/bin/lldb-mesos-local.sh.in
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a wrapper for running lldb on mesos-local before it is
+# installed that first sets up some flags via environment variables.
+
+# Use colors for errors.
+. @abs_top_srcdir@/support/colors.sh
+
+LIBTOOL=@abs_top_builddir@/libtool
+
+test ! -e ${LIBTOOL} && \
+  echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" && \
+  exit 1
+
+# Confirm libtool has "lldb" support.
+${LIBTOOL} --mode=execute lldb -batch >/dev/null 2>&1
+
+test $? != 0 && \
+  echo "${RED}Generated libtool doesn't appear to support lldb${NORMAL}" && \
+  exit 1
+
+. @abs_top_builddir@/bin/mesos-local-flags.sh
+
+exec ${LIBTOOL} --mode=execute lldb -- \
+  @abs_top_builddir@/src/mesos-local "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/2aad6c9a/bin/lldb-mesos-master.sh.in
----------------------------------------------------------------------
diff --git a/bin/lldb-mesos-master.sh.in b/bin/lldb-mesos-master.sh.in
new file mode 100644
index 0000000..b1c7f9f
--- /dev/null
+++ b/bin/lldb-mesos-master.sh.in
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a wrapper for running lldb on mesos-master before it is
+# installed that first sets up some flags via environment variables.
+
+# Use colors for errors.
+. @abs_top_srcdir@/support/colors.sh
+
+LIBTOOL=@abs_top_builddir@/libtool
+
+test ! -e ${LIBTOOL} && \
+  echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" && \
+  exit 1
+
+# Confirm libtool has "lldb" support.
+${LIBTOOL} --mode=execute lldb -batch >/dev/null 2>&1
+
+test $? != 0 && \
+  echo "${RED}Generated libtool doesn't appear to support lldb${NORMAL}" && \
+  exit 1
+
+. @abs_top_builddir@/bin/mesos-master-flags.sh
+
+exec ${LIBTOOL} --mode=execute lldb -- \
+  @abs_top_builddir@/src/mesos-master "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/2aad6c9a/bin/lldb-mesos-slave.sh.in
----------------------------------------------------------------------
diff --git a/bin/lldb-mesos-slave.sh.in b/bin/lldb-mesos-slave.sh.in
new file mode 100644
index 0000000..896c411
--- /dev/null
+++ b/bin/lldb-mesos-slave.sh.in
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a wrapper for running lldb on mesos-slave before it is
+# installed that first sets up some flags via environment variables.
+
+# Use colors for errors.
+. @abs_top_srcdir@/support/colors.sh
+
+LIBTOOL=@abs_top_builddir@/libtool
+
+test ! -e ${LIBTOOL} && \
+  echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" && \
+  exit 1
+
+# Confirm libtool has "lldb" support.
+${LIBTOOL} --mode=execute lldb -batch >/dev/null 2>&1
+
+test $? != 0 && \
+  echo "${RED}Generated libtool doesn't appear to support lldb${NORMAL}" && \
+  exit 1
+
+. @abs_top_builddir@/bin/mesos-slave-flags.sh
+
+exec ${LIBTOOL} --mode=execute lldb -- \
+  @abs_top_builddir@/src/mesos-slave "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/2aad6c9a/bin/lldb-mesos-tests.sh.in
----------------------------------------------------------------------
diff --git a/bin/lldb-mesos-tests.sh.in b/bin/lldb-mesos-tests.sh.in
new file mode 100644
index 0000000..f001b0b
--- /dev/null
+++ b/bin/lldb-mesos-tests.sh.in
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a wrapper for running lldb on mesos-tests that first sets up
+# some flags via environment variables.
+
+# Use colors for errors.
+. @abs_top_srcdir@/support/colors.sh
+
+LIBTOOL=@abs_top_builddir@/libtool
+
+test ! -e ${LIBTOOL} && \
+  echo "${RED}Failed to find ${LIBTOOL}, have you run configure?${NORMAL}" && \
+  exit 1
+
+# Confirm libtool has "lldb" support.
+${LIBTOOL} --mode=execute lldb -batch >/dev/null 2>&1
+
+test $? != 0 && \
+  echo "${RED}Generated libtool doesn't appear to support lldb${NORMAL}" && \
+  exit 1
+
+. @abs_top_builddir@/bin/mesos-tests-flags.sh
+
+exec ${LIBTOOL} --mode=execute lldb -- \
+  @abs_top_builddir@/src/mesos-tests "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/2aad6c9a/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 5666e93..18bf4bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,6 +94,10 @@ AC_CONFIG_FILES([bin/gdb-mesos-local.sh], [chmod +x bin/gdb-mesos-local.sh])
 AC_CONFIG_FILES([bin/gdb-mesos-master.sh], [chmod +x bin/gdb-mesos-master.sh])
 AC_CONFIG_FILES([bin/gdb-mesos-slave.sh], [chmod +x bin/gdb-mesos-slave.sh])
 AC_CONFIG_FILES([bin/gdb-mesos-tests.sh], [chmod +x bin/gdb-mesos-tests.sh])
+AC_CONFIG_FILES([bin/lldb-mesos-local.sh], [chmod +x bin/lldb-mesos-local.sh])
+AC_CONFIG_FILES([bin/lldb-mesos-master.sh], [chmod +x bin/lldb-mesos-master.sh])
+AC_CONFIG_FILES([bin/lldb-mesos-slave.sh], [chmod +x bin/lldb-mesos-slave.sh])
+AC_CONFIG_FILES([bin/lldb-mesos-tests.sh], [chmod +x bin/lldb-mesos-tests.sh])
 
 AC_CONFIG_FILES([src/deploy/mesos-daemon.sh])
 AC_CONFIG_FILES([src/deploy/mesos-start-cluster.sh])