Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tonybaloney opened this issue Sep 28, 2022 · 4 comments · Fixed by #76293
Closed

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

tonybaloney opened this issue Sep 28, 2022 · 4 comments · Fixed by #76293

Comments

@tonybaloney
Copy link
Contributor

tonybaloney commented Sep 28, 2022

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

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 28, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@tonybaloney
Copy link
Contributor Author

I don't have write permission but the area is area-CodeGen-coreclr

tonybaloney added a commit to tonybaloney/runtime that referenced this issue Sep 28, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Sep 28, 2022
@tonybaloney
Copy link
Contributor Author

I've submitted a PR with a fix, there is another method that does exactly the same thing, with a different name so it was easy to fix

@filipnavara filipnavara added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 28, 2022
@ghost
Copy link

ghost commented Sep 28, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

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

Author: tonybaloney
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged, in-pr

Milestone: -

@JulieLeeMSFT JulieLeeMSFT added area-VM-coreclr and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Sep 28, 2022
@ghost ghost removed in-pr There is an active PR which will close this issue when it is merged untriaged New issue has not been triaged by the area owner labels Sep 28, 2022
carlossanlop pushed a commit that referenced this issue Sep 28, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants