Its nice that GDB auto fetches debug sources these days
but I wish they didn't update so often
Its nice that GDB auto fetches debug sources these days
but I wish they didn't update so often
@tedmielczarek @dotstdy @superfunc Yep — that’s what I was referring to with “sane source indexing solution” :-)
It does have some issues with trust as you’re basically executing random commands that happen to be embedded in the PDB, but on the whole it is a much better approach. I feel like you could get something similar working on Linux by embedding similar information in a debug section, but perhaps with “well known“ types of VCS’s supported to avoid the implied RCE in MS’s implementation.
@mstange @tedmielczarek @dotstdy @superfunc Interesting! I was thinking along similar lines, though I settled on a .debug_sourcelink section, to mirror the existing .gnu_debuglink.
I can write something up about it, but in short it would basically be the source indexing idea, where you map a particular root path to a VCS path. The difference from source indexing is that you wouldn’t have to index each individual file; I never saw the point of that.
@mstange @tedmielczarek @dotstdy @superfunc There’d be some way to map a particular root path to a “VCS provider”, some list of well known VCS providers, and support for mapping multiple root paths to different providers.
I was initially planning on adding support for this to Superluminal, and to ship a (permissively licensed) library to do the indexing & retrieval to help adoption in other tools.
@mstange @tedmielczarek @dotstdy @superfunc Even if this might not be that useful to package maintainers as Josh mentioned, I think it would still be very helpful to ISVs.
Regarding paths in DWARF: the way I’m thinking about it, this would be orthogonal. You have “some” way to retrieve the original source file path from DWARF as you usually would, and then a way to map that path to a VCS provider using the section and retrieve it. The library would only be responsible for the second part.