{"action":"created","issue":{"url":"https://api.github.com/repos/angr/pyvex/issues/52","repository_url":"https://api.github.com/repos/angr/pyvex","labels_url":"https://api.github.com/repos/angr/pyvex/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/angr/pyvex/issues/52/comments","events_url":"https://api.github.com/repos/angr/pyvex/issues/52/events","html_url":"https://github.com/angr/pyvex/issues/52","id":196928925,"number":52,"title":"Apply thumb indent when lifting code on ARM architecture","user":{"login":"penhoi","id":10228659,"avatar_url":"https://avatars.githubusercontent.com/u/10228659?v=3","gravatar_id":"","url":"https://api.github.com/users/penhoi","html_url":"https://github.com/penhoi","followers_url":"https://api.github.com/users/penhoi/followers","following_url":"https://api.github.com/users/penhoi/following{/other_user}","gists_url":"https://api.github.com/users/penhoi/gists{/gist_id}","starred_url":"https://api.github.com/users/penhoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penhoi/subscriptions","organizations_url":"https://api.github.com/users/penhoi/orgs","repos_url":"https://api.github.com/users/penhoi/repos","events_url":"https://api.github.com/users/penhoi/events{/privacy}","received_events_url":"https://api.github.com/users/penhoi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-21T13:09:01Z","updated_at":"2016-12-21T16:08:50Z","closed_at":null,"body":"\r\nHi,\r\n\r\nI have tried to apply Thumb indent when lifting code on ARM, but failed.\r\n1. I searched across the source code of pyvex, but failed to find a .py file which contains the word \"THUMB\"\r\n2. I found that the class IRSB has a parameter \"arch\", so i tried to bind a \"thumb\" option to this parameter. My code looks like the following:\r\n#-------start---------\r\nimport pyvex, archinfo\r\n****\r\narch = archinfo.ArchARM()\r\narch.capstone_thumb()\r\n****\r\npyvex.IRSB(code, address, arch, num_bytes = self.code_length, bytes_offset = offset)\r\n#-----END-------\r\nUnfortunately, i got an error message: \r\n------------start---------------------\r\nTraceback (most recent call last):\r\n  File \"classifier_tests.py\", line 399, in test_arm_jcc\r\n    arch.capstone_thumb()\r\nTypeError: 'Cs' object is not callable\r\n------------end---------------------\r\n\r\nI don't know how to work around this problem. Could you give me some suggestions?\r\n\r\nThanks.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angr/pyvex/issues/comments/268561604","html_url":"https://github.com/angr/pyvex/issues/52#issuecomment-268561604","issue_url":"https://api.github.com/repos/angr/pyvex/issues/52","id":268561604,"user":{"login":"zardus","id":3453847,"avatar_url":"https://avatars.githubusercontent.com/u/3453847?v=3","gravatar_id":"","url":"https://api.github.com/users/zardus","html_url":"https://github.com/zardus","followers_url":"https://api.github.com/users/zardus/followers","following_url":"https://api.github.com/users/zardus/following{/other_user}","gists_url":"https://api.github.com/users/zardus/gists{/gist_id}","starred_url":"https://api.github.com/users/zardus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zardus/subscriptions","organizations_url":"https://api.github.com/users/zardus/orgs","repos_url":"https://api.github.com/users/zardus/repos","events_url":"https://api.github.com/users/zardus/events{/privacy}","received_events_url":"https://api.github.com/users/zardus/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T16:08:50Z","updated_at":"2016-12-21T16:08:50Z","body":"You can have PyVEX lift thumb mode by specifying an odd address, analogously to how it works on the CPU. Give this a try:\r\n\r\n```\r\npyvex.IRSB(code, address+1 arch, num_bytes = self.code_length, bytes_offset = offset)\r\n```"}}
{"actor":{"display_login":"zardus"}}