Ticket #4710: gdb_mythfrontend-gdb_mythbackend.patch

File gdb_mythfrontend-gdb_mythbackend.patch, 5.2 KB (added by Jeff Black <jmblack256@…>, 18 years ago)

patch against win32-packager.pl to add gdb_myth*.bat scripts to run

  • contrib/Win32/win32-packager.pl

     
    455455' ],comment => 'write a script that we can source later when inside msys to setup the environment variables'],
    456456
    457457#
     458[ file => $mythtv.'gdb_mythfrontend.bat_', write => [$mythtv.'gdb_mythfrontend.bat',
     459'@Echo off
     460::
     461:: Script to run mythfrontend through gdb
     462::
     463Echo COMMENTS: --------------------------------------
     464Echo COMMENTS: This script is used for gathering backtraces using gdb
     465Echo COMMENTS: See: http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
     466Echo COMMENTS: See: http://www.mythtv.org/wiki/index.php/Windows_Port
     467Echo COMMENTS: --------------------------------------
     468Echo.
     469::
     470:gdbcommands
     471::
     472:: Check for and Create if needed the .\gdbcommands.txt
     473::
     474:: syntax taken from [ http://www.mythtv.org/docs/mythtv-HOWTO.html#toc22.2 ]
     475::
     476if not exist ./gdbcommands.txt (
     477        echo handle SIGPIPE nostop noprint > .\gdbcommands.txt
     478        echo handle SIG33 nostop noprint >> .\gdbcommands.txt
     479        echo set logging on >> .\gdbcommands.txt
     480        echo set pagination off >> .\gdbcommands.txt
     481        echo set args -l myth.log --noupnp --nosched --nojobqueue --nohousekeeper --noautoexpire -v all >> .\gdbcommands.txt
     482        echo run >> .\gdbcommands.txt
     483        echo thread apply all bt full >> .\gdbcommands.txt
     484        echo set logging off >> .\gdbcommands.txt )
     485@Echo off
     486
     487Echo COMMENTS: --------------------------------------
     488Echo COMMENTS: Clearing old gdb.txt before running gdb again.
     489Echo COMMENTS: --------------------------------------
     490Echo.
     491::
     492:: add current data/time to gdb.txt
     493:: will this be a bad idea? who knows? =)
     494::
     495date /t > .\gdb.txt
     496time /t >> .\gdb.txt
     497
     498:gdb
     499::
     500:: gdb should be in c:\msys\1.0\bin
     501::
     502Echo COMMENTS: --------------------------------------
     503Echo COMMENTS: If you need to add any switches to mythfrontend edit gdbcommands.txt
     504Echo COMMENTS: see: "mythfrontend.exe --help" for options
     505Echo COMMENTS: --------------------------------------
     506Echo.
     507Echo COMMENTS: --------------------------------------
     508Echo COMMENTS: Starting: mythfrontend with gdb
     509Echo COMMENTS: --------------------------------------
     510c:\msys\1.0\bin\gdb.exe .\mythfrontend.exe -x .\gdbcommands.txt
     511Echo.
     512Echo The backtrace can be found in .\gdb.txt
     513Echo.
     514pause
     515','nocheck'
     516],comment => 'write a script that will run mythfrontend using GDB for getting backtraces'],
     517
     518#
     519[ file => $mythtv.'gdb_mythbackend.bat_', write => [$mythtv.'gdb_mythbackend.bat',
     520'@Echo off
     521::
     522:: Script to run mythbackend through gdb (easily?)
     523:: There is likely a more efficient way of doing this,
     524:: but we have to start somewhere.
     525::
     526Echo COMMENTS: --------------------------------------
     527Echo COMMENTS: This script is used for gathering backtraces using gdb
     528Echo COMMENTS: See: http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
     529Echo COMMENTS: See: http://www.mythtv.org/wiki/index.php/Windows_Port
     530Echo COMMENTS: --------------------------------------
     531Echo.
     532::
     533:gdbcommands
     534::
     535:: Check for and Create if needed the .\gdbcommands.txt
     536::
     537:: syntax taken from [ http://www.mythtv.org/docs/mythtv-HOWTO.html#toc22.2 ]
     538::
     539if not exist ./gdbcommands.txt (
     540        echo handle SIGPIPE nostop noprint > .\gdbcommands.txt
     541        echo handle SIG33 nostop noprint >> .\gdbcommands.txt
     542        echo set logging on >> .\gdbcommands.txt
     543        echo set pagination off >> .\gdbcommands.txt
     544        echo set args -l myth.log --noupnp --nosched --nojobqueue --nohousekeeper --noautoexpire -v all >> .\gdbcommands.txt
     545        echo run >> .\gdbcommands.txt
     546        echo thread apply all bt full >> .\gdbcommands.txt
     547        echo set logging off >> .\gdbcommands.txt )
     548@Echo off
     549
     550Echo COMMENTS: --------------------------------------
     551Echo COMMENTS: Clearing old gdb.txt before running gdb again.
     552Echo COMMENTS: --------------------------------------
     553Echo.
     554::
     555:: add current data/time to gdb.txt
     556:: will this be a bad idea? who knows? =)
     557::
     558date /t > .\gdb.txt
     559time /t >> .\gdb.txt
     560
     561:gdb
     562::
     563:: gdb should be in c:\msys\1.0\bin
     564::
     565Echo COMMENTS: --------------------------------------
     566Echo COMMENTS: If you need to add any switches to mythbackend edit gdbcommands.txt
     567Echo COMMENTS: see: "mythbackend.exe --help" for options
     568Echo COMMENTS: --------------------------------------
     569Echo.
     570Echo COMMENTS: --------------------------------------
     571Echo COMMENTS: Starting: mythbackend with gdb
     572Echo COMMENTS: --------------------------------------
     573c:\msys\1.0\bin\gdb.exe .\mythbackend.exe -x .\gdbcommands.txt
     574
     575Echo.
     576Echo The backtrace can be found in .\gdb.txt
     577Echo.
     578pause
     579','nocheck'
     580],comment => 'write a script that will run mythbackend using GDB for getting backtraces'],
     581
     582#
    458583[ file => $mythtv.'make_run.sh', write => [$mythtv.'make_run.sh',
    459584'#!/bin/bash
    460585source '.$unixmythtv.'qt_env.sh
     
    475600cp '.$unixmsys.'qt-3.3.x-p8/plugins/sqldrivers/libqsqlmysql.dll '.$unixmythtv.'mythtv/run/sqldrivers
    476601# pthread dlls and mingwm10.dll are copied from here:
    477602cp '.$unixmingw.'bin/*.dll '.$unixmythtv.'mythtv/run
     603cp '.$unixmythtv.'gdb_*.bat '.$unixmythtv.'mythtv/run
    478604' ],comment => 'script that will copy all the files necessary for running mythtv out of the build folder into the ./run folder'],
    479605
    480606#