rvplayer solution/hack with newer kernels

Morten Welinder (terra@diku.dk)
Wed, 25 Nov 1998 05:22:04 +0100 (MET)


So many hacks, so little time...

While we are waiting for Real, this can help the situation with
broken rvplayer. NO WARRANTY! Void where prohibited by law.

Morten

#!/usr/local/bin/perl -w

my $RVDIR = '/usr/local/lib/rvplayer';

$ENV{'LD_LIBRARY_PATH'} = '' unless exists $ENV{'LD_LIBRARY_PATH'};
$ENV{'LD_LIBRARY_PATH'} = $RVDIR . ':' . $ENV{'LD_LIBRARY_PATH'};

my $args = join (' ', @ARGV);

open (*GDB, "| gdb --quiet $RVDIR/rvplayer >/dev/null")
|| die "Cannot run gdb: $!\n";

print GDB "set args $args\n" if $args;
print GDB "path $RVDIR\n";
print GDB "set height 9999999\n";
print GDB "handle all nostop\n";
print GDB "handle all noprint\n";

# This should hit the instruction after the int $0x80
print GDB "b *(&__write+22)\n";

# The $ebx thing is an attempt to catch just the /dev/dsp write, but
# it's hard to predict under different circumstances.
print GDB "cond 1 (\$ebx >= 7 && \$eax != -1)\n";

print GDB "commands 1\n";
print GDB "silent\n";
# print GDB "p \$eax\n";
print GDB "set variable \$eax = *(int *)(\$ebp + 16)\n";
print GDB "c\n";
print GDB "end\n";

print GDB "run\n";

print GDB "quit\n";

close (*GDB);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/