summaryrefslogtreecommitdiff
path: root/extras/analyze_incbins.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-01-04 00:11:39 -0600
committerBryan Bishop <kanzure@gmail.com>2012-01-04 00:11:39 -0600
commit3f35c6cf072f879416aab3e4a6598fe9a37c5b38 (patch)
tree7f1b59ba843621ecea04fff35ba381564ed9cd28 /extras/analyze_incbins.py
parent9dd6eebe0f06f34d68ff11d88b2e4657cd8d0a64 (diff)
import lots of block labels
map_block_dumper is very buggy, so not all labels are included yet. hg-commit-id: 1880e2dfbf9e
Diffstat (limited to 'extras/analyze_incbins.py')
-rw-r--r--extras/analyze_incbins.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/extras/analyze_incbins.py b/extras/analyze_incbins.py
index 70842f48..7c7c93dd 100644
--- a/extras/analyze_incbins.py
+++ b/extras/analyze_incbins.py
@@ -1,7 +1,8 @@
-#!/usr/bin/python
+#!/usr/bin/python2.7
#author: Bryan Bishop <kanzure@gmail.com>
#date: 2012-01-03
#purpose: map which addresses are left
+#note: using python2.7 because of subprocess
import sys, os
from copy import copy, deepcopy
import subprocess
@@ -86,10 +87,10 @@ def find_incbin_to_replace_for(address):
start = incbin["start"]
end = incbin["end"]
- print "start is: " + str(start)
- print "end is: " + str(end)
- print "address is: " + str(type(address))
- print "checking.... " + hex(start) + " <= " + hex(address) + " <= " + hex(end)
+ #print "start is: " + str(start)
+ #print "end is: " + str(end)
+ #print "address is: " + str(type(address))
+ #print "checking.... " + hex(start) + " <= " + hex(address) + " <= " + hex(end)
if start <= address <= end:
return incbin_key
@@ -147,6 +148,8 @@ def generate_diff_insert(line_number, newline):
try:
diffcontent = subprocess.check_output("diff -u ../pokered.asm " + newfile_filename, shell=True)
+ except AttributeError, exc:
+ raise exc
except Exception, exc:
diffcontent = exc.output