[GSoC] First draft project proposal; IR level interpreter debugger

Hello,

I have created a first draft GSoC project proposal for a IR level
interpreter debugger. I have omitted some contact information as it is
currently a public document (can be given upon request).

Feedback and comments are appreciated.

Proposal: GSoC 2016 proposal - LLVM IR level interpreter debugger - Google Docs

Kind regards,
Janek van Oirschot

I don't quite understand what you mean by "x86 IR code" or "IR level
x86 code" -- can you please clarify?

In the FAQ I found the following: "since many platforms define their
ABIs in terms of C, and since LLVM is lower-level than C, front-ends
currently must emit platform-specific IR in order to have the result
conform to the platform ABI.". I might've interpreted this wrong but
architecture/platform dependant (example from LLVM FAQ is "sizeof"
operation for C/C++). I basically meant to say that I scope my project
to x86 architecture IR level debugging.

Thanks for the response, will clarify that in my proposal.

Kind regards,
Janek

I've scanned over your proposal, but am not quite sure I understand your objective. Is your intent to be able to step through IR source in a debugger and inspect intermediate state? If so, you may consider whether "simply" inserting debug metatadata into your IR which describes the IR source, and then compiling it gives you your desired result.

For the record, the current interpreter is poorly maintained, known to be somewhat buggy, and I don't believe anyone is actively working on it.

Philip

A pass that does precisely this has been contributed by someone from Intel at some point but got removed later on for reasons I don't recall.
It might be worth to scan the archives.

Tobias

I've scanned over your proposal, but am not quite sure I understand your
objective. Is your intent to be able to step through IR source in a
debugger and inspect intermediate state?

Yes, that is what I had in mind with this proposal.

If so, you may consider
whether "simply" inserting debug metatadata into your IR which describes
the IR source, and then compiling it gives you your desired result.

A pass that does precisely this has been contributed by someone from Intel
at some point but got removed later on for reasons I don't recall.
It might be worth to scan the archives.

Thanks for your response, I have searched in archives and I think I
found some references to what you're talking about (DebugIR?). Though,
I haven't been able to find the reason as to why it was removed. My
concern now is whether this GSoC project has become obsolete because
of this.

I'll continue trying to find the reason why this was removed.

Kind regards,
Janek

I've scanned over your proposal, but am not quite sure I understand your
objective. Is your intent to be able to step through IR source in a
debugger and inspect intermediate state?

Yes, that is what I had in mind with this proposal.

If so, you may consider
whether "simply" inserting debug metatadata into your IR which describes
the IR source, and then compiling it gives you your desired result.

A pass that does precisely this has been contributed by someone from Intel
at some point but got removed later on for reasons I don't recall.
It might be worth to scan the archives.

Thanks for your response, I have searched in archives and I think I
found some references to what you're talking about (DebugIR?). Though,
I haven't been able to find the reason as to why it was removed. My
concern now is whether this GSoC project has become obsolete because
of this.

I'll continue trying to find the reason why this was removed.

IIRC, it was removed because it was buggy, and not well maintained.

Jon

I've scanned over your proposal, but am not quite sure I understand your
objective. Is your intent to be able to step through IR source in a
debugger and inspect intermediate state?

Yes, that is what I had in mind with this proposal.

If so, you may consider
whether "simply" inserting debug metatadata into your IR which describes
the IR source, and then compiling it gives you your desired result.

A pass that does precisely this has been contributed by someone from Intel
at some point but got removed later on for reasons I don't recall.
It might be worth to scan the archives.

Thanks for your response, I have searched in archives and I think I
found some references to what you're talking about (DebugIR?). Though,
I haven't been able to find the reason as to why it was removed. My
concern now is whether this GSoC project has become obsolete because
of this.

I'll continue trying to find the reason why this was removed.

IIRC, it was removed because it was buggy, and not well maintained.

I believe it was also blocking work on one of the debug info refactoring projects.

Resurrecting this pass, updating it to modern standards, adding good tests, and getting it back in tree could be valuable project.

Even though it's too late to make adjustments to the GSoC proposals,
this sounds like the best methodology for debugging IR. If I get
accepted I'd like to look into this instead of implementing IR
debugging in the interpreter.

Kind regards,
Janek