ikvmnet / ikvm

A Java Virtual Machine and Bytecode-to-IL Converter for .NET
Other
1.24k stars 116 forks source link

Support emitting PortablePDB #486

Closed Martin1994 closed 7 months ago

Martin1994 commented 8 months ago

Summary

Support debugging symbol with .NET Core (PortablePDB)

Reference

https://github.com/dotnet/runtime/blob/main/docs/design/specs/PortablePdb-Metadata.md

High level design

Demo

ikvm-ppdb preview

Note: variable name and source path requires -g compile flag sent to javac

Next steps

CLAassistant commented 8 months ago

CLA assistant check
All committers have signed the CLA.

wasabii commented 8 months ago

Hmmmmm.

https://github.com/ikvmnet/ikvm/pull/478

Martin1994 commented 8 months ago

Hmmmmm.

478

hmmmmmmm.........

wasabii commented 7 months ago

Alright, I had some time this morning to look this over. As I sent last night, we already have a PR moving forward on PortablePdbs, that takes a little bit of a different path.

So, first, I love this work. I can't stress this enough. Thank you so much. But there's going to be some problems with accepting this.

First, it's against the main branch. We do active development on the next major version against the develop branch and minor releases (hotfixes, etc) against the main branch. The develop branch has deviated quite a bit at this point. For instance, the develop branch IKVM.Reflection has already been changed to use SRME to build PEs. Which means elimination of a number of things you changed in this PR: there's no more TextSection, ModuleWriter is largely rewritten, etc. Had this work been some quick additions to the develop branch, I probably could have accepted it ahead of the other changes in PR 478.

That said, PR 478 moves forward on a bit of a different track: we are deprecating the native PDB writer, and the MDB writer. Just removing them completely. Mono supports Portable PDBs. Framework (>4.7.2) supports Portable PDBs. So there's not really any reason to keep the existing support. So, there's not much of a need for a new abstraction model over symbol writers.

So, while I appreciate this effort, I just don't see how I can accept it.

We do most of the discussions and coordination about work and planning and stuff in our Discord channel. I think you would benefit quite a bit by joining and participating. We would love to have you.

wasabii commented 7 months ago

Closing in favor of #478