Skip to content

FEATURE_GDBJIT fails to compile due to missing member of Module type #76291

@tonybaloney

Description

@tonybaloney

Description

I'm trying to compile .NET 7 RC1 with the GDB JIT debug emitter by using:

$ ./build.sh clr.runtime -c debug --cmakeargs -DFEATURE_GDBJIT=ON

The FEATURE_GDBJIT when combined with the COMPlus_GDBJitDump environment variable should emit JIT dumps for GDB (which is what I'm trying to do).

I get an error at compile time for this line: https://github.com/dotnet/runtime/blob/v7.0.0-rc.1.22426.10/src/coreclr/vm/gdbjit.cpp#L511

Building CXX object vm/wks/CMakeFiles/cee_wks_core.dir/__/interoplibinterface_comwrappers.cpp.o
  /home/anthonyshaw/Pyjion/CoreCLR/src/coreclr/vm/gdbjit.cpp:511:28: error: no member named 'GetFile' in 'Module'
      SString modName = mod->GetFile()->GetPath();
                        ~~~  ^
  /home/anthonyshaw/Pyjion/CoreCLR/src/coreclr/vm/gdbjit.cpp:2536:28: error: no member named 'GetFile' in 'Module'
      SString modName = mod->GetFile()->GetPath();
                        ~~~  ^

the Module type no longer has a member named GetFile, it was removed since .NET 6, but the gdbjit.cpp file has not been updated with whatever the new API should be, so the file cannot be compiled.

The .NET 6 interface with this method is here:
https://github.com/dotnet/runtime/blob/v6.0.9/src/coreclr/vm/ceeload.h#L1695-L1697

Reproduction Steps

$ ./build.sh clr.runtime -c debug --cmakeargs -DFEATURE_GDBJIT=ON

Expected behavior

Successful compilation (as with .net 6)

Actual behavior

compilation error

Regression?

Yes.

The code was removed here:
7088332d#diff-85a6545c44de808889ff13d59b23a669174330d44a5d0b3248ef2373696fa0ec

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions