Nuclide xdebug async stepping (3/N) -- Major async stepping logic
commita6ca215dbd7ee023d6a25724b89c9999ad2e9b8a
authorJeffrey Tan <jeffreytan@fb.com>
Fri, 17 Jun 2016 22:12:01 +0000 (17 15:12 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Fri, 17 Jun 2016 22:32:20 +0000 (17 15:32 -0700)
treee18d24fd2dc7adc48919f4b9f2145bab7cf4a02c
parent52bdf0142b1eef6276fdde12d4736e99c1ffb293
Nuclide xdebug async stepping (3/N) -- Major async stepping logic

Summary:
Currently, all debugger stepping logic(step-into, step-over, step-out) are crowded in phpDebuggerOpcodeHook() which is very easy to break each other and hard to change. I encapsulate the async stepping logic into AsyncFlowStepper class which is a state machine that sets internal breakpoint at the resume point.
In future I plan to do more major refactoring to make each individual stepping logic self-contain and not conflict with each other.
Here are the things not done but will be in future diffs:
1. Dealing async stepping with exceptions
2. Add unit tests
3. Refactor all stepping logic to be self-contained/clean

Reviewed By: alexmalyshev

Differential Revision: D3423673

fbshipit-source-id: a5fa8919b514d4bc9a50720c1b6a658c955f1bc3
hphp/runtime/base/request-injection-data.h
hphp/runtime/vm/async-flow-stepper.cpp [new file with mode: 0644]
hphp/runtime/vm/async-flow-stepper.h [new file with mode: 0644]
hphp/runtime/vm/debugger-hook.cpp
hphp/runtime/vm/debugger-hook.h
hphp/runtime/vm/pc-filter.h