Index: contrib/Win32/win32-packager.pl
===================================================================
--- contrib/Win32/win32-packager.pl	(revision 15433)
+++ contrib/Win32/win32-packager.pl	(working copy)
@@ -455,6 +455,131 @@
 ' ],comment => 'write a script that we can source later when inside msys to setup the environment variables'],
 
 # 
+[ file => $mythtv.'gdb_mythfrontend.bat_', write => [$mythtv.'gdb_mythfrontend.bat',
+'@Echo off
+::
+:: Script to run mythfrontend through gdb 
+::
+Echo COMMENTS: --------------------------------------
+Echo COMMENTS: This script is used for gathering backtraces using gdb
+Echo COMMENTS: See: http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
+Echo COMMENTS: See: http://www.mythtv.org/wiki/index.php/Windows_Port
+Echo COMMENTS: --------------------------------------
+Echo.
+::
+:gdbcommands
+::
+:: Check for and Create if needed the .\gdbcommands.txt 
+::
+:: syntax taken from [ http://www.mythtv.org/docs/mythtv-HOWTO.html#toc22.2 ] 
+::
+if not exist ./gdbcommands.txt (
+	echo handle SIGPIPE nostop noprint > .\gdbcommands.txt
+	echo handle SIG33 nostop noprint >> .\gdbcommands.txt
+	echo set logging on >> .\gdbcommands.txt
+	echo set pagination off >> .\gdbcommands.txt
+	echo set args -l myth.log --noupnp --nosched --nojobqueue --nohousekeeper --noautoexpire -v all >> .\gdbcommands.txt
+	echo run >> .\gdbcommands.txt
+	echo thread apply all bt full >> .\gdbcommands.txt
+	echo set logging off >> .\gdbcommands.txt )
+@Echo off
+
+Echo COMMENTS: --------------------------------------
+Echo COMMENTS: Clearing old gdb.txt before running gdb again.
+Echo COMMENTS: --------------------------------------
+Echo. 
+::
+:: add current data/time to gdb.txt 
+:: will this be a bad idea? who knows? =) 
+::
+date /t > .\gdb.txt
+time /t >> .\gdb.txt
+
+:gdb
+::
+:: gdb should be in c:\msys\1.0\bin
+::
+Echo COMMENTS: --------------------------------------
+Echo COMMENTS: If you need to add any switches to mythfrontend edit gdbcommands.txt
+Echo COMMENTS: see: "mythfrontend.exe --help" for options
+Echo COMMENTS: --------------------------------------
+Echo.
+Echo COMMENTS: --------------------------------------
+Echo COMMENTS: Starting: mythfrontend with gdb
+Echo COMMENTS: --------------------------------------
+c:\msys\1.0\bin\gdb.exe .\mythfrontend.exe -x .\gdbcommands.txt 
+Echo.
+Echo The backtrace can be found in .\gdb.txt
+Echo.
+pause
+','nocheck' 
+],comment => 'write a script that will run mythfrontend using GDB for getting backtraces'],
+
+# 
+[ file => $mythtv.'gdb_mythbackend.bat_', write => [$mythtv.'gdb_mythbackend.bat',
+'@Echo off
+::
+:: Script to run mythbackend through gdb (easily?)
+:: There is likely a more efficient way of doing this, 
+:: but we have to start somewhere.
+::
+Echo COMMENTS: --------------------------------------
+Echo COMMENTS: This script is used for gathering backtraces using gdb
+Echo COMMENTS: See: http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
+Echo COMMENTS: See: http://www.mythtv.org/wiki/index.php/Windows_Port
+Echo COMMENTS: --------------------------------------
+Echo.
+::
+:gdbcommands
+::
+:: Check for and Create if needed the .\gdbcommands.txt 
+::
+:: syntax taken from [ http://www.mythtv.org/docs/mythtv-HOWTO.html#toc22.2 ] 
+::
+if not exist ./gdbcommands.txt (
+	echo handle SIGPIPE nostop noprint > .\gdbcommands.txt
+	echo handle SIG33 nostop noprint >> .\gdbcommands.txt
+	echo set logging on >> .\gdbcommands.txt
+	echo set pagination off >> .\gdbcommands.txt
+	echo set args -l myth.log --noupnp --nosched --nojobqueue --nohousekeeper --noautoexpire -v all >> .\gdbcommands.txt
+	echo run >> .\gdbcommands.txt
+	echo thread apply all bt full >> .\gdbcommands.txt
+	echo set logging off >> .\gdbcommands.txt )
+@Echo off
+
+Echo COMMENTS: --------------------------------------
+Echo COMMENTS: Clearing old gdb.txt before running gdb again.
+Echo COMMENTS: --------------------------------------
+Echo. 
+::
+:: add current data/time to gdb.txt 
+:: will this be a bad idea? who knows? =) 
+::
+date /t > .\gdb.txt
+time /t >> .\gdb.txt
+
+:gdb
+::
+:: gdb should be in c:\msys\1.0\bin
+::
+Echo COMMENTS: --------------------------------------
+Echo COMMENTS: If you need to add any switches to mythbackend edit gdbcommands.txt
+Echo COMMENTS: see: "mythbackend.exe --help" for options
+Echo COMMENTS: --------------------------------------
+Echo.
+Echo COMMENTS: --------------------------------------
+Echo COMMENTS: Starting: mythbackend with gdb
+Echo COMMENTS: --------------------------------------
+c:\msys\1.0\bin\gdb.exe .\mythbackend.exe -x .\gdbcommands.txt
+
+Echo.
+Echo The backtrace can be found in .\gdb.txt
+Echo.
+pause
+','nocheck' 
+],comment => 'write a script that will run mythbackend using GDB for getting backtraces'],
+
+# 
 [ file => $mythtv.'make_run.sh', write => [$mythtv.'make_run.sh',
 '#!/bin/bash
 source '.$unixmythtv.'qt_env.sh
@@ -475,6 +600,7 @@
 cp '.$unixmsys.'qt-3.3.x-p8/plugins/sqldrivers/libqsqlmysql.dll '.$unixmythtv.'mythtv/run/sqldrivers 
 # pthread dlls and mingwm10.dll are copied from here:
 cp '.$unixmingw.'bin/*.dll '.$unixmythtv.'mythtv/run
+cp '.$unixmythtv.'gdb_*.bat '.$unixmythtv.'mythtv/run
 ' ],comment => 'script that will copy all the files necessary for running mythtv out of the build folder into the ./run folder'],
 
 #
