Previous Entry Share Next Entry
09:01 am, 24 May 07

global sha1 debugging index

My previous post gave me an idea.
1) Create a net-accessible index of the SHA1 of every version of every source file across every open source project.
2) Modify compilers to tag binaries so that backtraces not only include file/line numbers but also SHA1s.
3) Now when you have a backtrace, you can map it back to let you browse the source of the exact version of the code that's currently running on your (Linux) machine!

It'd sorta be like a cross-project LXR that runs only over the exact code your binaries are running.

This has some obvious problems (boil-the-ocean compiler modifications, for one) but maybe it'll inspire someone else to make something similar. (Like: instead, maybe have your package distributor build a map on the side of SHA1(binary) -> [sourcefile-name, SHA1(sourcefile)]. That wouldn't require compiler mods but would require an extra step in dpkg. But on the other hand, dpkg already has metadata about which binaries you're running so I guess the SHA1s wouldn't be necessary.)