mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-04 23:31:37 +00:00
fix dbg for 64 bit parameters
This commit is contained in:
parent
1910af9b4d
commit
46eee6ef67
1 changed files with 5 additions and 1 deletions
|
|
@ -153,15 +153,19 @@ namespace Cosmos.IL2CPU.X86
|
||||||
|
|
||||||
var xParams = aMethod.MethodBase.GetParameters();
|
var xParams = aMethod.MethodBase.GetParameters();
|
||||||
var xParamCount = (ushort)xParams.Length;
|
var xParamCount = (ushort)xParams.Length;
|
||||||
|
|
||||||
for (ushort i = 0; i < xParamCount; i++)
|
for (ushort i = 0; i < xParamCount; i++)
|
||||||
{
|
{
|
||||||
|
var xOffset = IL.Ldarg.GetArgumentDisplacement(aMethod, (ushort)(i + xIdxOffset));
|
||||||
|
// if last argument is 8 byte long, we need to add 4, so that debugger could read all 8 bytes from this variable in positiv direction
|
||||||
|
xOffset -= (int)Cosmos.IL2CPU.X86.ILOp.Align(Cosmos.IL2CPU.X86.ILOp.SizeOfType(xParams[i].ParameterType), 4) - 4;
|
||||||
mLocals_Arguments_Infos.Add(new DebugInfo.Local_Argument_Info
|
mLocals_Arguments_Infos.Add(new DebugInfo.Local_Argument_Info
|
||||||
{
|
{
|
||||||
MethodLabelName = xMethodLabel,
|
MethodLabelName = xMethodLabel,
|
||||||
IsArgument = true,
|
IsArgument = true,
|
||||||
Index = (int)(i + xIdxOffset),
|
Index = (int)(i + xIdxOffset),
|
||||||
Name = xParams[i].Name,
|
Name = xParams[i].Name,
|
||||||
Offset = (int)IL.Ldarg.GetArgumentDisplacement(aMethod, (ushort)(i + xIdxOffset)),
|
Offset = xOffset,
|
||||||
Type=xParams[i].ParameterType.AssemblyQualifiedName
|
Type=xParams[i].ParameterType.AssemblyQualifiedName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue