head     1.1;
branch   1.1.1;
access   ;
symbols  start:1.1.1.1 webdox:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2003.03.15.00.57.44;  author redpain;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2003.03.15.00.57.44;  author redpain;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#! /usr/bin/perl

# Find the address of a symbol in the storage map.

use strict qw(refs vars);
use FileHandle;

if ( scalar(@@ARGV) != 2 ) {
    print "Usage: findaddr <storage map> <symbol name>\n";
    exit 1;
}

my $storage = shift @@ARGV;
my $symbol = shift @@ARGV;

my $fh = new FileHandle("<$storage");
(defined $fh) || die "Couldn't open storage map: $!\n";

while ( <$fh> ) {
    if ( /^\s*(0x([0-9]|[a-f]|[A-F])+)\s+\Q$symbol\E\s*$/ ) {
	print $1, "\n";
	last;
    }
}

$fh->close();
@


1.1.1.1
log
@Project Start
@
text
@@
