Skip to content

Stepping Into Statics Helper Code #110709

Closed
@mikelle-rogers

Description

@mikelle-rogers

Description

When I step into the code, it steps into RuntimeHelpers.CoreCLR.cs.

Reproduction Steps

class Program
{
    [DllImport("libc")]
    private static extern int puts(string str);

    static void Main()
    {
        puts("Hello, World!"); //step into me
    }
}

Expected behavior

We should not be stepping into the Statics helper code.

Actual behavior

When I step into puts, I land in RuntimeHelpers.CoreCLR.cs in the following function:

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public ref DynamicStaticsInfo GetDynamicStaticsInfo()
{
    return ref Unsafe.Subtract(ref Unsafe.As<MethodTableAuxiliaryData, DynamicStaticsInfo>(ref this), 1);
}

Regression?

No response

Known Workarounds

No response

Configuration

.NET 9 on MacOS arm64

Other information

@davidwrighton

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions