{"action":"created","issue":{"url":"https://api.github.com/repos/unicorn-engine/unicorn/issues/210","labels_url":"https://api.github.com/repos/unicorn-engine/unicorn/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/unicorn-engine/unicorn/issues/210/comments","events_url":"https://api.github.com/repos/unicorn-engine/unicorn/issues/210/events","html_url":"https://github.com/unicorn-engine/unicorn/issues/210","id":112551654,"number":210,"title":"Changing PC from within an UC_HOOK_CODE doesn't work","user":{"login":"hugoreinaldo","id":291565,"avatar_url":"https://avatars.githubusercontent.com/u/291565?v=3","gravatar_id":"","url":"https://api.github.com/users/hugoreinaldo","html_url":"https://github.com/hugoreinaldo","followers_url":"https://api.github.com/users/hugoreinaldo/followers","following_url":"https://api.github.com/users/hugoreinaldo/following{/other_user}","gists_url":"https://api.github.com/users/hugoreinaldo/gists{/gist_id}","starred_url":"https://api.github.com/users/hugoreinaldo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugoreinaldo/subscriptions","organizations_url":"https://api.github.com/users/hugoreinaldo/orgs","repos_url":"https://api.github.com/users/hugoreinaldo/repos","events_url":"https://api.github.com/users/hugoreinaldo/events{/privacy}","received_events_url":"https://api.github.com/users/hugoreinaldo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-21T09:52:05Z","updated_at":"2015-10-21T17:26:30Z","closed_at":null,"body":"Is there a way to change the program counter from within an UC_HOOK_CODE ? None of the following examples seem to work: \r\n\r\n    def hook_code(uc, address, size, userdata):\r\n        uc.reg_write(arm_const.UC_ARM_REG_PC, 0x00)\r\n\r\n    def hook_code(uc, address, size, userdata):\r\n        uc.mem_write(address+size, 0x00)\r\n"},"comment":{"url":"https://api.github.com/repos/unicorn-engine/unicorn/issues/comments/149969118","html_url":"https://github.com/unicorn-engine/unicorn/issues/210#issuecomment-149969118","issue_url":"https://api.github.com/repos/unicorn-engine/unicorn/issues/210","id":149969118,"user":{"login":"gaffe23","id":278226,"avatar_url":"https://avatars.githubusercontent.com/u/278226?v=3","gravatar_id":"","url":"https://api.github.com/users/gaffe23","html_url":"https://github.com/gaffe23","followers_url":"https://api.github.com/users/gaffe23/followers","following_url":"https://api.github.com/users/gaffe23/following{/other_user}","gists_url":"https://api.github.com/users/gaffe23/gists{/gist_id}","starred_url":"https://api.github.com/users/gaffe23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaffe23/subscriptions","organizations_url":"https://api.github.com/users/gaffe23/orgs","repos_url":"https://api.github.com/users/gaffe23/repos","events_url":"https://api.github.com/users/gaffe23/events{/privacy}","received_events_url":"https://api.github.com/users/gaffe23/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T17:26:30Z","updated_at":"2015-10-21T17:26:30Z","body":"There are test cases for this in `tests/regress/callback-pc.py` using both `UC_HOOK_CODE` and `UC_HOOK_BLOCK`."}}