https://bitbucket.org/hudson/magic-lantern
Raw File
Tip revision: 97915c3f51a376a25d5c8d105aa4027ca114db22 authored by hudson@kremvax on 01 August 2009, 20:14:53 UTC
Fix bug 18: Implement a simple bracketing algorithm (needs to be reworked)
Tip revision: 97915c3
map2idc
#!/usr/bin/perl
use warnings;
use strict;

my $base = 0xFFF00000;

print <<"";
static main() {


#
# Parse the symbol dump from IDA Pro and output
# code into the .S file to define stubs for each of the
# entities.
#
while( <> )
{
	my ($addr,$name) = /^\s*0001:([0-9A-Fa-f]+)\s+([^\s]+)\s*$/
                       	or next;
	$addr = hex($addr);
	$addr += $base;

	printf "MakeNameEx( 0x%08x, \"%s\", 0x2 );\n",
		$addr,
		$name,
	;
}


print <<"";
}

__END__
back to top