aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
diff options
context:
space:
mode:
Diffstat (limited to 'erts/etc')
-rw-r--r--erts/etc/common/erlexec.c4
-rw-r--r--erts/etc/unix/Makefile2
-rw-r--r--erts/etc/unix/cerl.src28
-rw-r--r--erts/etc/unix/run_erl.c9
4 files changed, 37 insertions, 6 deletions
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index 30560f5a2f..c9908caf20 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -109,6 +109,10 @@ static char *plusM_other_switches[] = {
"Mamcbf",
"Mrmcbf",
"Mmcs",
+ "Mscs",
+ "Mscmgc",
+ "Msco",
+ "Mscrpm",
"Ye",
"Ym",
"Ytp",
diff --git a/erts/etc/unix/Makefile b/erts/etc/unix/Makefile
index e85d2fab0c..c137a31ec2 100644
--- a/erts/etc/unix/Makefile
+++ b/erts/etc/unix/Makefile
@@ -29,7 +29,7 @@ opt debug: etc
etc: etp-commands
etp-commands: etp-commands.in
- sed 's:@ERL_TOP@:${ERL_TOP}:g' etp-commands.in > etp-commands
+ $(gen_verbose)sed 's:@ERL_TOP@:${ERL_TOP}:g' etp-commands.in > etp-commands
.PHONY: docs
docs:
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index 2d18b9f310..be8343e87e 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -33,6 +33,7 @@
# You have to start beam in gdb using "run".
# -rgdb Run the debug compiled emulator in gdb.
# You have to start beam in gdb using "run".
+# -dump Dump the bt of all threads in a core.
# -break F Run the debug compiled emulator in emacs and gdb and set break.
# The session is started, i.e. "run" is already don for you.
# -xxgdb FIXME currently disabled
@@ -178,6 +179,12 @@ while [ $# -gt 0 ]; do
cargs="$cargs -frmptr"
TYPE=.frmptr
;;
+ "-dump")
+ shift
+ GDB=dump
+ core="$1"
+ shift
+ ;;
"-gdb")
shift
GDB=egdb
@@ -331,7 +338,7 @@ elif [ "x$GDB" = "xgdb" ]; then
echo "source $ROOTDIR/erts/etc/unix/etp-commands" > $cmdfile
# Fire up gdb in emacs...
exec gdb $GDBBP -x $cmdfile $gdbcmd
-else
+elif [ "x$GDB" = "xegdb" ]; then
if [ "x$EMACS" = "x" ]; then
EMACS=emacs
fi
@@ -372,4 +379,23 @@ else
(comint-send-input)"
# Fire up gdb in emacs...
exec $EMACS --eval "(progn (gdb \"gdb $GDBARGS$EMU_NAME\") $gdbcmd)"
+elif [ "x$GDB" = "xdump" ]; then
+ cmdfile="/tmp/.cerlgdb.$$"
+ case "x$core" in
+ x/*)
+ gdbcmd="$EMU_NAME ${core}"
+ ;;
+ *)
+ dir=`pwd`
+ gdbcmd="$EMU_NAME ${dir}/${core}"
+ ;;
+ esac
+ echo "set width 0
+set height 0
+set verbose off
+
+source $ROOTDIR/erts/etc/unix/etp-commands
+thread apply all bt
+" > $cmdfile
+ exec gdb --batch --command=$cmdfile $gdbcmd
fi
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c
index b69e31f784..2018bc007c 100644
--- a/erts/etc/unix/run_erl.c
+++ b/erts/etc/unix/run_erl.c
@@ -60,7 +60,7 @@
#include <dirent.h>
#include <termios.h>
#include <time.h>
-#ifndef NO_SYSLOG
+#ifdef HAVE_SYSLOG_H
# include <syslog.h>
#endif
#ifdef HAVE_PTY_H
@@ -197,8 +197,9 @@ static char* outbuf_in;
#endif
-#ifdef NO_SYSLOG
+#ifndef HAVE_SYSLOG_H
# define OPEN_SYSLOG() ((void) 0)
+# define LOG_ERR NULL
#else
# define OPEN_SYSLOG() openlog(simple_basename(program_name), \
LOG_PID|LOG_CONS|LOG_NOWAIT,LOG_USER)
@@ -415,7 +416,7 @@ int main(int argc, char **argv)
}
#endif
-#ifndef NO_SYSLOG
+#ifdef HAVE_SYSLOG_H
/* Before fiddling with file descriptors we make sure syslog is turned off
or "closed". In the single case where we might want it again,
we will open it again instead. Would not want syslog to
@@ -1163,7 +1164,7 @@ static void error_logf(int priority, int line, const char *format, ...)
va_list args;
va_start(args, format);
-#ifndef NO_SYSLOG
+#ifdef HAVE_SYSLOG_H
if (run_daemon) {
vsyslog(priority,format,args);
}