BreakpointInjectedSite is a sub-class of the BreakpointSite class.
Its main purpose is to handle Fast Conditional Breakpoint setup.
In the case of Fast Conditional Breakpoints, the process will copy
enough instructions to a new memory space and branch to it.
Then it creates a BreakpointInjectedSite that will build the condition
expression, by fetching the condition from each BreakpointLocation
and depending on the architecture and the source language, inject
a trap instruction that will be caught by LLDB at runtime. To do so, the
trap address is resolved and added to LLDB’s BreakpointSiteList.
The BreakpointInjectedSite also initialize the $__lldb_arg structure
for the conditional expression using Debug Info.
Right now, it only works with un-optimized (“-O0”) code, on x86_64.
After creating the Fast Conditional Breakpoint, the process will set up the
FCB Trampoline for the current ABI. Since the JIT-ed code might modify the
registers state, we need to save the current context, run the JIT-ed code
and the copied instruction, then restore the context and branch back.
Signed-off-by: Med Ismail Bennani <firstname.lastname@example.org>