1 //
2 // Copyright (c) 2010-2018 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 using System.Collections.Generic;
10 using Antmicro.Renode.Debug;
11 using Antmicro.Renode.Peripherals.CPU;
12 
13 namespace Antmicro.Renode.Plugins.TracePlugin.Handlers
14 {
15     public interface IFunctionHandler
16     {
CallHandler(TranslationCPU cpu, ulong pc, string functionName, IEnumerable<object> arguments)17         void CallHandler(TranslationCPU cpu, ulong pc, string functionName, IEnumerable<object> arguments);
18 
ReturnHandler(TranslationCPU cpu, ulong pc, string functionName, IEnumerable<object> argument)19         void ReturnHandler(TranslationCPU cpu, ulong pc, string functionName, IEnumerable<object> argument);
20 
21         IEnumerable<FunctionCallParameter> CallParameters{ get; }
22 
23         FunctionCallParameter? ReturnParameter{ get; }
24     }
25 
26     public class BaseFunctionHandler
27     {
BaseFunctionHandler(TranslationCPU cpu)28         public BaseFunctionHandler(TranslationCPU cpu)
29         {
30             this.CPU = cpu;
31         }
32 
33         protected readonly TranslationCPU CPU;
34     }
35 }
36 
37