Ticket #4710: debug-mythfrontend.cmd_debug-mythbackend.cmd.patch

File debug-mythfrontend.cmd_debug-mythbackend.cmd.patch, 4.6 KB (added by Jeff Black <jmblack256@…>, 18 years ago)

Win32 scripts to start mythfrontend mythbackend under gdb

  • contrib/Win32/debug-mythbackend.cmd

     
     1@Echo off
     2::
     3:: Script to run mythbackend through gdb (easily?)
     4:: There is likely a more efficient way of doing this,
     5:: but we have to start somewhere.
     6::
     7Echo COMMENTS: --------------------------------------
     8Echo COMMENTS: This script is used for gathering backtraces using gdb
     9Echo COMMENTS: See: http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
     10Echo COMMENTS: See: http://www.mythtv.org/wiki/index.php/Windows_Port
     11Echo COMMENTS: --------------------------------------
     12Echo.
     13::
     14:gdbcommands
     15::
     16:: Check for and Create if needed the .\gdbcommands.txt
     17::
     18:: syntax taken from [ http://www.mythtv.org/docs/mythtv-HOWTO.html#toc22.2 ]
     19::
     20if not exist ./gdbcommands.txt (
     21        echo handle SIGPIPE nostop noprint > .\gdbcommands.txt
     22        echo handle SIG33 nostop noprint >> .\gdbcommands.txt
     23        echo set logging on >> .\gdbcommands.txt
     24        echo set pagination off >> .\gdbcommands.txt
     25        echo set args -l myth.log --noupnp --nosched --nojobqueue --nohousekeeper --noautoexpire -v all >> .\gdbcommands.txt
     26        echo run >> .\gdbcommands.txt
     27        echo thread apply all bt full >> .\gdbcommands.txt
     28        echo set logging off >> .\gdbcommands.txt )
     29@Echo off
     30
     31Echo COMMENTS: --------------------------------------
     32Echo COMMENTS: Clearing old gdb.txt before running gdb again.
     33Echo COMMENTS: --------------------------------------
     34Echo.
     35::
     36:: add current data/time to gdb.txt
     37:: will this be a bad idea? who knows? =)
     38::
     39date /t > .\gdb.txt
     40time /t >> .\gdb.txt
     41
     42:gdb
     43::
     44:: gdb should be in the path.
     45::
     46Echo COMMENTS: --------------------------------------
     47Echo COMMENTS: If you need to add any switches to mythbackend edit gdbcommands.txt
     48Echo COMMENTS: see: "mythbackend.exe --help" for options
     49Echo COMMENTS: --------------------------------------
     50Echo.
     51Echo COMMENTS: --------------------------------------
     52Echo COMMENTS: Starting: gdb
     53Echo COMMENTS: --------------------------------------
     54gdb .\mythbackend.exe -x .\gdbcommands.txt
     55
     56Echo.
     57Echo The backtrace can be found in .\gdb.txt
     58Echo.
     59 No newline at end of file
  • contrib/Win32/debug-mythfrontend.cmd

     
     1@Echo off
     2::
     3:: Script to run mythfrontend through gdb (easily?)
     4:: There is likely a more efficient way of doing this,
     5:: but we have to start somewhere.
     6::
     7Echo COMMENTS: --------------------------------------
     8Echo COMMENTS: This script is used for gathering backtraces using gdb
     9Echo COMMENTS: See: http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
     10Echo COMMENTS: See: http://www.mythtv.org/wiki/index.php/Windows_Port
     11Echo COMMENTS: --------------------------------------
     12Echo.
     13::
     14:gdbcommands
     15::
     16:: Check for and Create if needed the .\gdbcommands.txt
     17::
     18:: syntax taken from [ http://www.mythtv.org/docs/mythtv-HOWTO.html#toc22.2 ]
     19::
     20if not exist ./gdbcommands.txt (
     21        echo handle SIGPIPE nostop noprint > .\gdbcommands.txt
     22        echo handle SIG33 nostop noprint >> .\gdbcommands.txt
     23        echo set logging on >> .\gdbcommands.txt
     24        echo set pagination off >> .\gdbcommands.txt
     25        echo set args -l myth.log --noupnp --nosched --nojobqueue --nohousekeeper --noautoexpire -v all >> .\gdbcommands.txt
     26        echo run >> .\gdbcommands.txt
     27        echo thread apply all bt full >> .\gdbcommands.txt
     28        echo set logging off >> .\gdbcommands.txt )
     29@Echo off
     30
     31Echo COMMENTS: --------------------------------------
     32Echo COMMENTS: Clearing old gdb.txt before running gdb again.
     33Echo COMMENTS: --------------------------------------
     34Echo.
     35::
     36:: add current data/time to gdb.txt
     37:: will this be a bad idea? who knows? =)
     38::
     39date /t > .\gdb.txt
     40time /t >> .\gdb.txt
     41
     42:gdb
     43::
     44:: gdb should be in the path.
     45::
     46Echo COMMENTS: --------------------------------------
     47Echo COMMENTS: If you need to add any switches to mythfrontend edit gdbcommands.txt
     48Echo COMMENTS: see: "mythbackend.exe --help" for options
     49Echo COMMENTS: --------------------------------------
     50Echo.
     51Echo COMMENTS: --------------------------------------
     52Echo COMMENTS: Starting: gdb
     53Echo COMMENTS: --------------------------------------
     54gdb .\mythfrontend.exe -x .\gdbcommands.txt
     55Echo.
     56Echo The backtrace can be found in .\gdb.txt
     57Echo.
     58