Permalink
Browse files

Fixed typo casuing traceback.

  • Loading branch information...
1 parent 25eb5a9 commit 3ba54a9241c85af9799112a4d27403f53d12b203 @aj00200 committed Apr 8, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 converters/c2x10c.py
View
@@ -34,6 +34,7 @@ def cinstr_dig(self):
def cfunc2asm(self, function):
'''Take a pycparser function as input and output the 0x10c asm.
Call cinstr_dig on each function to convert it to asm.
+ TODO: pass loops and if statements back to this function.
'''
print(' [*] Inside function:')
funcbody = function.children()[1][1]
@@ -42,6 +43,12 @@ def cfunc2asm(self, function):
for instruction in funcbody_instructions:
instr = instruction[1]
+ # Check if we will need to set the PC
+ if isinstance(instr, pycparser.c_ast.While):
+ pass
+ elif isinstance(instr, pycparser.c_ast.For):
+ pass
+
instr.show()
print(self.cinstr2asm(instr))

0 comments on commit 3ba54a9

Please sign in to comment.