{"action":"created","issue":{"url":"https://api.github.com/repos/x64dbg/x64dbg/issues/1915","repository_url":"https://api.github.com/repos/x64dbg/x64dbg","labels_url":"https://api.github.com/repos/x64dbg/x64dbg/issues/1915/labels{/name}","comments_url":"https://api.github.com/repos/x64dbg/x64dbg/issues/1915/comments","events_url":"https://api.github.com/repos/x64dbg/x64dbg/issues/1915/events","html_url":"https://github.com/x64dbg/x64dbg/issues/1915","id":306145365,"number":1915,"title":"Python Interface - Can't step and run in a breakpoint handler","user":{"login":"JeremyWildsmith","id":3090233,"avatar_url":"https://avatars2.githubusercontent.com/u/3090233?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyWildsmith","html_url":"https://github.com/JeremyWildsmith","followers_url":"https://api.github.com/users/JeremyWildsmith/followers","following_url":"https://api.github.com/users/JeremyWildsmith/following{/other_user}","gists_url":"https://api.github.com/users/JeremyWildsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyWildsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyWildsmith/subscriptions","organizations_url":"https://api.github.com/users/JeremyWildsmith/orgs","repos_url":"https://api.github.com/users/JeremyWildsmith/repos","events_url":"https://api.github.com/users/JeremyWildsmith/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyWildsmith/received_events","type":"User","site_admin":false},"labels":[{"id":198502853,"url":"https://api.github.com/repos/x64dbg/x64dbg/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-17T10:23:01Z","updated_at":"2018-03-22T08:46:15Z","closed_at":null,"author_association":"NONE","body":"- Debugger version: FEB 14 2018\r\n- Operating system: Windows 10\r\n- Brief description of the issue: threading model makes it very difficult / impossible to work with breakpoint handlers\r\n- Elaborate reproduction steps for the bug/issue being reported.\r\n\r\nI am using the Python x64dbgpy plugin and have a very simple breakpoint handler that looks like the following:\r\n````\r\ndef bphit_callback():\r\n    global traceAreaArray\r\n    global installAddr\r\n\r\n    if installAddr == Register.EIP:\r\n        installBreakpoints()\r\n\r\n    for ta in traceAreaArray:\r\n        if ta.jumpAddress == Register.EIP:\r\n            \r\n            x64dbg.DbgCmdExecDirect(\"StepInto\")      \r\n            branchAddressStr = hex(getattr(Register, \"EIP\"))\r\n            ta.hitCount = ta.hitCount + 1\r\n            if branchAddressStr not in ta.branches:\r\n                ta.branches.append(branchAddressStr)\r\n\r\n    x64dbg.DbgCmdExecDirect(\"run\")\r\n````\r\nEssentially I am trying to map out the flow control of an obfuscated application by tracing the jump instructions (which as assembled as jmp [some register], or ret)\r\n\r\nThe above code will, once a breakpoint is hit (which is on a flow control instruction) step into and then record EIP to detect where the subroutine jumped to. However, due to threading model of x64dbg it seems like it is not possible to step and run within a breakpoint handler\r\n\r\nNow I can't think of a way to do this at all with the interface I have; is there any way I can do this? I've tried having the bp handler onto another thread which was invoked by the bp callback routine but that doesn't seem to work either."},"comment":{"url":"https://api.github.com/repos/x64dbg/x64dbg/issues/comments/375220624","html_url":"https://github.com/x64dbg/x64dbg/issues/1915#issuecomment-375220624","issue_url":"https://api.github.com/repos/x64dbg/x64dbg/issues/1915","id":375220624,"user":{"login":"JeremyWildsmith","id":3090233,"avatar_url":"https://avatars2.githubusercontent.com/u/3090233?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyWildsmith","html_url":"https://github.com/JeremyWildsmith","followers_url":"https://api.github.com/users/JeremyWildsmith/followers","following_url":"https://api.github.com/users/JeremyWildsmith/following{/other_user}","gists_url":"https://api.github.com/users/JeremyWildsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyWildsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyWildsmith/subscriptions","organizations_url":"https://api.github.com/users/JeremyWildsmith/orgs","repos_url":"https://api.github.com/users/JeremyWildsmith/repos","events_url":"https://api.github.com/users/JeremyWildsmith/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyWildsmith/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T08:46:15Z","updated_at":"2018-03-22T08:46:15Z","author_association":"NONE","body":"Yeah these crashes are making it really hard to run analysis that run longer than 5 minutes. I am going to try to reproduce it on a redistributable binary first."}}
{"actor":{"display_login":"JeremyWildsmith"}}