Skip to content

Commit

Permalink
Fixed Ourpalm#729
Browse files Browse the repository at this point in the history
  • Loading branch information
liiir1985 committed Oct 7, 2022
1 parent 0d3f3bb commit 3ef13ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ILRuntime/CLR/Method/ILMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public sealed class ILMethod : IMethod
ExceptionHandler[] exceptionHandler, exceptionHandlerR;
KeyValuePair<string, IType>[] genericParameters;
IType[] genericArguments;
ILMethod genericDefinition;
Dictionary<int, int[]> jumptables, jumptablesR;
bool isDelegateInvoke;
bool isEventAdd, isEventRemove;
Expand Down Expand Up @@ -159,6 +160,7 @@ public Mono.Collections.Generic.Collection<Mono.Cecil.Cil.VariableDefinition> Va

public IType[] GenericArugmentsArray { get { return genericArguments; } }

public ILMethod GenericDefinition { get { return genericDefinition; } }
public bool ShouldUseRegisterVM
{
get
Expand Down Expand Up @@ -958,6 +960,7 @@ public IMethod MakeGenericMethod(IType[] genericArguments)
ILMethod m = new ILMethod(def, declaringType, appdomain, jitFlags);
m.genericParameters = genericParameters;
m.genericArguments = genericArguments;
m.genericDefinition = this;
if (m.def.ReturnType.IsGenericParameter)
{
m.ReturnType = m.FindGenericArgument(m.def.ReturnType.Name);
Expand Down
2 changes: 1 addition & 1 deletion ILRuntime/Runtime/Debugger/DebugService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ unsafe internal void CheckShouldBreak(ILMethod method, ILIntepreter intp, int ip
}
StackObject* basePointer = ResolveCurrentFrameBasePointer(intp, method, ip);

int methodHash = m.GetHashCode();
int methodHash = m.IsGenericInstance ? m.GenericDefinition.GetHashCode() : m.GetHashCode();
BreakpointInfo[] lst = null;

lock (activeBreakpoints)
Expand Down

0 comments on commit 3ef13ca

Please sign in to comment.