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

ILDASM /linenum support? #53822

Open
dsyme opened this issue Jun 7, 2021 · 8 comments
Open

ILDASM /linenum support? #53822

dsyme opened this issue Jun 7, 2021 · 8 comments
Assignees
Milestone

Comments

@dsyme
Copy link

dsyme commented Jun 7, 2021

The is either a question or a bug report. Basically does the /linenum flag of ILDASM work with .NET Core?

Context: We use ILDASM in the F# repo from package “Microsoft.NETCore.ILDAsm". However I can’t get the “/linenum” option to workm, e.g. to show the PDB file contents in terms of sequence points. We use this to lock down our debugging experience, which is quite important one way or another. I could dump the sequence points from the compiler but it’s really convenient to have them showing with the IL code.

Repro:

  • Compile something with portable symbols
  • run ildasm /linenum /text foo.dll

e.g. in F# repo:

ildasm.exe artifacts\bin\FSharp.Core\Debug\netstandard2.0\FSharp.Core.dll /linenum

Expected: output include .line
Actual: no .line observed

We've tried lots of variations like embedded symbols etc., we can't find a configuration that works.

cc @vzarytovskii, @brettfo

@dotnet-issue-labeler dotnet-issue-labeler bot added area-ILTools-coreclr untriaged New issue has not been triaged by the area owner labels Jun 7, 2021
@JulieLeeMSFT
Copy link
Member

@EgorBo PTAL.

@JulieLeeMSFT JulieLeeMSFT added needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration and removed untriaged New issue has not been triaged by the area owner labels Jun 16, 2021
@JulieLeeMSFT JulieLeeMSFT removed the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label Jul 6, 2021
@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Jul 6, 2021
@JulieLeeMSFT JulieLeeMSFT modified the milestones: 6.0.0, 7.0.0 Aug 13, 2021
@am11
Copy link
Member

am11 commented Mar 15, 2022

When ilasm received the support for portable PDB, ildasm was left out #37702 (comment). It is more of a feature request than a bug report. 😄

Note that once portable PDB parser is plugged into ildasm, this condition will start to satisfy:

if(fInsertSourceLines)
in the statement fInsertSourceLines = g_fInsertSourceLines; under if (g_pSymReader) condition, g_fInsertSourceLines is 1 with /linenum or -linenum argument, otherwise 0; but that statement is unreachable because g_pSymReader is always null in ildasm.

@TIHan TIHan modified the milestones: 7.0.0, 8.0.0 Jun 16, 2022
@TIHan TIHan assigned TIHan and unassigned EgorBo Jun 16, 2022
@TIHan
Copy link
Member

TIHan commented Jun 16, 2022

@am11 Thank you for the added context here, it's very helpful.

We should definitely support portable PDBs for this; it would help make F# debug testing a bit easier.

@TIHan TIHan modified the milestones: 8.0.0, Future Jul 5, 2022
@ivanpovazan ivanpovazan self-assigned this Sep 15, 2022
@ivanpovazan
Copy link
Member

ivanpovazan commented Sep 15, 2022

Hello, I decided to work on this (as I worked on the ilasm support for portable PDB as well :)) as part of the hackathon project.
Assigning myself

@mirkomaty
Copy link

@ivanpovazan: Is there any progress on this issue? We use ILASM/ILDASM roundtrips for an assembly enhancer with C# (see www.netdataobjects.de). ILDASM doesn't generate .line statements with .Net Standard DLLs. That's really bad, because users can't debug enhanced DLLs.

@ivanpovazan
Copy link
Member

@mirkomaty I made some initial progress like reading the document table, but had to switch to some other higher priority issues.
I will probably get back to this later in November.
If you need assistance earlier, maybe @TIHan or someone from the team, could pick this up sooner.

@mirkomaty
Copy link

@ivanpovazan: Thanks a lot for your answer. The problem is not so urgent, because currently I tell my users to use

<DebugType>full</DebugType>

But since .NET Core will be the dominant platform in the future, there is little point in having my users insert that line into their project files all the time.

I'm not able to customize ILDasm myself, so I appreciate you taking the time to do so. ;-) If it happens this year, it is perfect for me. Thanks again.

@TIHan TIHan added the Priority:3 Work that is nice to have label Apr 24, 2023
@ivanpovazan
Copy link
Member

Unfortunately, I will not have enough cycles to look further into this in the near future. Will remain at disposal if anyone needs help or has questions around this.

@ivanpovazan ivanpovazan removed their assignment Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants