mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(apps/scripts): set a logging file for gdb using starter app (#16278)
This commit is contained in:
@@ -61,9 +61,9 @@ function run() {
|
||||
|
||||
echo "> Starting with screen ( screen $OPTIONS )"
|
||||
|
||||
screen $OPTIONS $1 "$RUN_ENGINE_PATH/starter" $2 $3 "$4" "$5" "$6" $7
|
||||
screen $OPTIONS $1 "$RUN_ENGINE_PATH/starter" $2 $3 "$4" "$5" "$6" $7 "$BINPATH/crashes"
|
||||
else
|
||||
$RUN_ENGINE_PATH/starter $2 $3 "$4" "$5" "$6" $7
|
||||
$RUN_ENGINE_PATH/starter $2 $3 "$4" "$5" "$6" $7 "$BINPATH/crashes"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ function starter() {
|
||||
cd $BINPATH
|
||||
|
||||
mkdir -p "$LOGS_PATH"
|
||||
mkdir -p "$BINPATH"/crashes
|
||||
|
||||
configureFiles
|
||||
|
||||
@@ -82,6 +83,7 @@ function restarter() {
|
||||
cd $BINPATH
|
||||
|
||||
mkdir -p "$LOGS_PATH"
|
||||
mkdir -p "$BINPATH"/crashes
|
||||
|
||||
configureFiles
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@ CONFIG="$3"
|
||||
SYSLOG="$4"
|
||||
SYSERR="$5"
|
||||
GDB_ENABLED="$6"
|
||||
CRASHES_PATH="$7"
|
||||
|
||||
if [ $GDB_ENABLED -eq 1 ]; then
|
||||
echo "set logging on" > "$GDB_FILE"
|
||||
echo "set logging file "$CRASHES_PATH"/gdb-$(date +%Y-%m-%d-%H-%M-%S).txt" > "$GDB_FILE"
|
||||
echo "set logging on" >> "$GDB_FILE"
|
||||
echo "set debug timestamp" >> "$GDB_FILE"
|
||||
echo "run -c $3" >> "$GDB_FILE"
|
||||
echo "bt" >> "$GDB_FILE"
|
||||
|
||||
Reference in New Issue
Block a user