#NEWLINE# def state_entry( self , args = None , env = None , argc = None , **kwargs ) : #NEWLINE# #INDENT# state = super ( SimLinux , self ) . state_entry ( ** kwargs ) #NEWLINE# if ( args is None ) : #NEWLINE# #INDENT# args = [ ] #NEWLINE# #UNINDENT# if ( env is None ) : #NEWLINE# #INDENT# env = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( argc is None ) : #NEWLINE# #INDENT# argc = state . se . BVV ( len ( args ) , state . arch . bits ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( argc ) in ( int , long ) ) : #NEWLINE# #INDENT# argc = state . se . BVV ( argc , state . arch . bits ) #NEWLINE# #UNINDENT# #UNINDENT# table = StringTableSpec ( ) #NEWLINE# for arg in args : #NEWLINE# #INDENT# table . add_string ( arg ) #NEWLINE# #UNINDENT# table . add_null ( ) #NEWLINE# for ( k , v ) in env . iteritems ( ) : #NEWLINE# #INDENT# table . add_string ( ( ( k + '=' ) + v ) ) #NEWLINE# #UNINDENT# table . add_null ( ) #NEWLINE# aux = [ ] #NEWLINE# for ( a , b ) in aux : #NEWLINE# #INDENT# table . add_pointer ( a ) #NEWLINE# table . add_pointer ( b ) #NEWLINE# #UNINDENT# table . add_null ( ) #NEWLINE# table . add_null ( ) #NEWLINE# state . memory . store ( state . regs . sp , state . se . BVV ( 0 , ( 8 * 16 ) ) , endness = 'Iend_BE' ) #NEWLINE# argv = table . dump ( state , state . regs . sp ) #NEWLINE# envp = ( argv + ( ( len ( args ) + 1 ) * state . arch . bytes ) ) #NEWLINE# auxv = ( argv + ( ( ( len ( args ) + len ( env ) ) + 2 ) * state . arch . bytes ) ) #NEWLINE# newsp = ( argv - state . arch . bytes ) #NEWLINE# state . memory . store ( newsp , argc , endness = state . arch . memory_endness ) #NEWLINE# state . regs . sp = newsp #NEWLINE# if ( state . arch . name in ( 'PPC32' , ) ) : #NEWLINE# #INDENT# state . stack_push ( state . se . BVV ( 0 , 32 ) ) #NEWLINE# state . stack_push ( state . se . BVV ( 0 , 32 ) ) #NEWLINE# state . stack_push ( state . se . BVV ( 0 , 32 ) ) #NEWLINE# state . stack_push ( state . se . BVV ( 0 , 32 ) ) #NEWLINE# #UNINDENT# state . posix . argv = argv #NEWLINE# state . posix . argc = argc #NEWLINE# state . posix . environ = envp #NEWLINE# state . posix . auxv = auxv #NEWLINE# self . set_entry_register_values ( state ) #NEWLINE# return state