Repository navigation
Refactor debug info handling - #1270
Conversation
|
👍 so far... |
| private IEnumerable<string> GetParameterNamesForMethod(MethodDesc method) | ||
| { | ||
| // TODO: The uses of this method need revision. The right way to get to this info is from | ||
| // a MethodIL. For declarations, we don't need names. |
There was a problem hiding this comment.
This part makes me particularly unhappy, but it wasn't immediately clear why the code path that ends up needing parameter names is called from half a dozen places within CppCodegen. I'm not sure this will play well with the various strategies where a body of a MethodDesc is replaced with a body of a different MethodDesc, unless we want to enforce the parameter names match so that CppCodegen won't notice.
There was a problem hiding this comment.
(At this point I'm considering taking parameter names handling out of MethodDebugInformation and making it a completely separate beast, but I was hoping I could abstract this weirdness out. By weirdness I mean storing some of the symbolic information within the runtime image, and some in the PDB.)
There was a problem hiding this comment.
I think having the parameter names in MethodDebugInformation is good.
There was a problem hiding this comment.
BTW: The new portable PDBs use the same format as ECMA metadata. The portable PDBs are conceptually just a few more metadata tables. I believe there is an option to store everything in the same file (though it is unlikely to be used much anytime soon because of none of the tooling understands it).
|
LGTM |
I figured I should probably push this out early so I can get feedback before I continue.
Debug info retrieval is currently strongly tied to the ECMA format. I'm proposing we abstract it out into a
GetDebugInfomethod onMethodILthat returns the debug information wrapped in a MethodDebugInformation subclass.The proposed next steps are this: