| 458 | [ file => $mythtv.'gdb_mythfrontend.bat_', write => [$mythtv.'gdb_mythfrontend.bat', |
| 459 | '@Echo off |
| 460 | :: |
| 461 | :: Script to run mythfrontend through gdb |
| 462 | :: |
| 463 | Echo COMMENTS: -------------------------------------- |
| 464 | Echo COMMENTS: This script is used for gathering backtraces using gdb |
| 465 | Echo COMMENTS: See: http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2 |
| 466 | Echo COMMENTS: See: http://www.mythtv.org/wiki/index.php/Windows_Port |
| 467 | Echo COMMENTS: -------------------------------------- |
| 468 | Echo. |
| 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 | :: |
| 476 | if 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 | |
| 487 | Echo COMMENTS: -------------------------------------- |
| 488 | Echo COMMENTS: Clearing old gdb.txt before running gdb again. |
| 489 | Echo COMMENTS: -------------------------------------- |
| 490 | Echo. |
| 491 | :: |
| 492 | :: add current data/time to gdb.txt |
| 493 | :: will this be a bad idea? who knows? =) |
| 494 | :: |
| 495 | date /t > .\gdb.txt |
| 496 | time /t >> .\gdb.txt |
| 497 | |
| 498 | :gdb |
| 499 | :: |
| 500 | :: gdb should be in c:\msys\1.0\bin |
| 501 | :: |
| 502 | Echo COMMENTS: -------------------------------------- |
| 503 | Echo COMMENTS: If you need to add any switches to mythfrontend edit gdbcommands.txt |
| 504 | Echo COMMENTS: see: "mythfrontend.exe --help" for options |
| 505 | Echo COMMENTS: -------------------------------------- |
| 506 | Echo. |
| 507 | Echo COMMENTS: -------------------------------------- |
| 508 | Echo COMMENTS: Starting: mythfrontend with gdb |
| 509 | Echo COMMENTS: -------------------------------------- |
| 510 | c:\msys\1.0\bin\gdb.exe .\mythfrontend.exe -x .\gdbcommands.txt |
| 511 | Echo. |
| 512 | Echo The backtrace can be found in .\gdb.txt |
| 513 | Echo. |
| 514 | pause |
| 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 | :: |
| 526 | Echo COMMENTS: -------------------------------------- |
| 527 | Echo COMMENTS: This script is used for gathering backtraces using gdb |
| 528 | Echo COMMENTS: See: http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2 |
| 529 | Echo COMMENTS: See: http://www.mythtv.org/wiki/index.php/Windows_Port |
| 530 | Echo COMMENTS: -------------------------------------- |
| 531 | Echo. |
| 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 | :: |
| 539 | if 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 | |
| 550 | Echo COMMENTS: -------------------------------------- |
| 551 | Echo COMMENTS: Clearing old gdb.txt before running gdb again. |
| 552 | Echo COMMENTS: -------------------------------------- |
| 553 | Echo. |
| 554 | :: |
| 555 | :: add current data/time to gdb.txt |
| 556 | :: will this be a bad idea? who knows? =) |
| 557 | :: |
| 558 | date /t > .\gdb.txt |
| 559 | time /t >> .\gdb.txt |
| 560 | |
| 561 | :gdb |
| 562 | :: |
| 563 | :: gdb should be in c:\msys\1.0\bin |
| 564 | :: |
| 565 | Echo COMMENTS: -------------------------------------- |
| 566 | Echo COMMENTS: If you need to add any switches to mythbackend edit gdbcommands.txt |
| 567 | Echo COMMENTS: see: "mythbackend.exe --help" for options |
| 568 | Echo COMMENTS: -------------------------------------- |
| 569 | Echo. |
| 570 | Echo COMMENTS: -------------------------------------- |
| 571 | Echo COMMENTS: Starting: mythbackend with gdb |
| 572 | Echo COMMENTS: -------------------------------------- |
| 573 | c:\msys\1.0\bin\gdb.exe .\mythbackend.exe -x .\gdbcommands.txt |
| 574 | |
| 575 | Echo. |
| 576 | Echo The backtrace can be found in .\gdb.txt |
| 577 | Echo. |
| 578 | pause |
| 579 | ','nocheck' |
| 580 | ],comment => 'write a script that will run mythbackend using GDB for getting backtraces'], |
| 581 | |
| 582 | # |