6#if defined(TARGET_ARCH_IA32)
26void CodeBreakpoint::PatchCode() {
29 auto zone = thread->zone();
33 thread->isolate_group()->RunWithStoppedMutators([&]() {
34 WritableInstructionsScope writable(instrs.PayloadStart(), instrs.Size());
35 switch (breakpoint_kind_) {
36 case UntaggedPcDescriptors::kIcCall: {
37 stub_target = StubCode::ICCallBreakpoint().ptr();
40 case UntaggedPcDescriptors::kUnoptStaticCall: {
41 stub_target = StubCode::UnoptStaticCallBreakpoint().ptr();
44 case UntaggedPcDescriptors::kRuntimeCall: {
46 stub_target = StubCode::RuntimeCallBreakpoint().ptr();
57void CodeBreakpoint::RestoreCode() {
60 auto zone = thread->zone();
63 thread->isolate_group()->RunWithStoppedMutators([&]() {
64 WritableInstructionsScope writable(instrs.PayloadStart(), instrs.Size());
65 switch (breakpoint_kind_) {
66 case UntaggedPcDescriptors::kIcCall:
67 case UntaggedPcDescriptors::kUnoptStaticCall:
68 case UntaggedPcDescriptors::kRuntimeCall: {
CodePtr OrigStubAddress() const
static CodePtr GetStaticCallTargetAt(uword return_address, const Code &code)
static void PatchStaticCallAt(uword return_address, const Code &code, const Code &new_target)
static Thread * Current()