<s> import os <EOL> import logging <EOL> import nose <EOL> import angr <EOL> l = logging . getLogger ( "<STR_LIT>" ) <EOL> this_file = str ( os . path . dirname ( os . path . realpath ( __file__ ) ) ) <EOL> test_location = os . path . join ( this_file , '<STR_LIT>' ) <EOL> data_location = os . path . join ( this_file , "<STR_LIT>" ) <EOL> def test_gdb ( ) : <EOL> p = angr . Project ( os . path . join ( test_location , "<STR_LIT>" ) ) <EOL> st = p . factory . blank_state ( ) <EOL> st . gdb . set_stack ( os . path . join ( data_location , "<STR_LIT>" ) , stack_top = <NUM_LIT> ) <EOL> st . gdb . set_heap ( os . path . join ( data_location , "<STR_LIT>" ) , heap_base = <NUM_LIT> ) <EOL> st . gdb . set_regs ( os . path . join ( data_location , "<STR_LIT>" ) ) <EOL> nose . tools . assert_equal ( st . se . any_int ( st . regs . rip ) , <NUM_LIT> ) <EOL> loc = st . se . any_int ( st . regs . rsp ) + <NUM_LIT:8> <EOL> val = st . memory . load ( loc , <NUM_LIT:8> , endness = st . arch . memory_endness ) <EOL> nose . tools . assert_equal ( st . se . any_int ( val ) , <NUM_LIT> ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> test_gdb ( ) </s>
