1 // 2 // Copyright (c) 2010-2022 Antmicro 3 // Copyright (c) 2011-2015 Realtime Embedded 4 // 5 // This file is licensed under the MIT License. 6 // Full license text is available in 'licenses/MIT.txt'. 7 // 8 using System; 9 10 namespace Antmicro.Renode.Peripherals.CPU 11 { 12 public interface ICPUWithHooks : ICPU 13 { AddHookAtInterruptBegin(Action<ulong> hook)14 void AddHookAtInterruptBegin(Action<ulong> hook); AddHookAtInterruptEnd(Action<ulong> hook)15 void AddHookAtInterruptEnd(Action<ulong> hook); AddHookAtWfiStateChange(Action<bool> hook)16 void AddHookAtWfiStateChange(Action<bool> hook); 17 AddHook(ulong addr, Action<ICpuSupportingGdb, ulong> hook)18 void AddHook(ulong addr, Action<ICpuSupportingGdb, ulong> hook); RemoveHook(ulong addr, Action<ICpuSupportingGdb, ulong> hook)19 void RemoveHook(ulong addr, Action<ICpuSupportingGdb, ulong> hook); RemoveHooksAt(ulong addr)20 void RemoveHooksAt(ulong addr); RemoveAllHooks()21 void RemoveAllHooks(); 22 } 23 } 24 25