Added debug script to aid in getting crash callstacks from users.
This commit is contained in:
parent
2fce5ffe74
commit
3e8978c2aa
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
|
||||
my $i; my $findResult;
|
||||
my $exe = "fceux";
|
||||
|
||||
$findResult = `find . -name fceux`;
|
||||
|
||||
if ( $findResult ne "")
|
||||
{
|
||||
$findResult =~ s/\n.*//;
|
||||
$exe=$findResult;
|
||||
}
|
||||
print "Executable: $exe\n";
|
||||
|
||||
my $gdbCmdFile = "/tmp/gdbCmdFile";
|
||||
open CMD_FILE, ">$gdbCmdFile" or die "Error: Could not open file: $gdbCmdFile\n";
|
||||
print CMD_FILE "run\n";
|
||||
print CMD_FILE "backtrace\n";
|
||||
close(CMD_FILE);
|
||||
|
||||
system("gdb -x $gdbCmdFile $exe");
|
||||
|
|
@ -160,6 +160,7 @@ typedef uint8 (*readfunc)(uint32 A);
|
|||
#endif
|
||||
|
||||
#define FCEU_UNUSED(x) (void)(x)
|
||||
#define FCEU_CRASH() int *_dumbPointer = nullptr; *_dumbPointer = 0xdeadbeef
|
||||
|
||||
#if FCEU_CPP_HAS_STD(201603L) || FCEU_HAS_CPP_ATTRIBUTE(maybe_unused)
|
||||
#define FCEU_MAYBE_UNUSED [[maybe_unused]]
|
||||
|
|
Loading…
Reference in New Issue