freenode/#sicl - IRC Chatlog
Search
11:40:07
beach
What I should do is to emit special HIR instructions before and after the compilation of each AST with source information.
11:40:40
beach
Those instructions should contain the source information of the start of the AST and the end of the AST respectively.
11:41:34
beach
That way, we can have a breakpoint before and after each form, even though several such breakpoints can share the same real HIR instruction.
11:42:32
beach
Those special instructions result in Clordane being consulted to see whether there is a breakpoint at the source information contained in that instruction.
11:43:13
beach
If there is, the execution stops by informing Clordane and then waiting on the queue to get further instructions from Clordane.
11:43:51
beach
When HIR is turned into MIR, LIR, and native code, a "code object" is created. It contains information about possible breakpoints.
11:45:11
beach
When the user wants to set breakpoints in a function, Clordane consults the code object and displays possible breakpoints to the user.
11:45:46
beach
The user can select as many breakpoints as needed, and those breakpoints are then kept in a table in Clordane.
11:47:17
scymtym
that's interesting. especially as opposed to how other debuggers let you set a breakpoint anywhere you like but they will still stop where they can, not where you said
11:48:27
scymtym
have you thought about displaying variable values? it would be really cool to hook up clouseau like in the clim-debugger mock-up i made
11:48:38
beach
Stepping just means that Clordane answers "yes" to all questions, so the debuggee will stop at every possible point.
11:50:25
beach
Each special instruction could have information not only about the current location, but the corresponding end location as well.
11:51:31
scymtym
anyway, today i want to review and apply jackdaniel's changes to resolve the pointer event regressions in McCLIM
12:08:20
beach
I guess the code object must contain, for each value of the program counter, information about live variables and where each one is located.
12:15:26
beach
I think each special instruction should keep that information. When the debuggee is about to stop, it sends information about source location AND live variable information to Clordane.
12:28:29
beach
No, the debuggee is not going to send names of variables to Clordane, because variables may be renamed by optimization passes.
14:06:35
beach
So I added a CLIENT parameter to functions in Cleavir version 2 for creating HIR from AST. I needed that so that I can create an :AROUND method on COMPILE-AST that creates the new special instructions. And I don't want that to be done for all clients of AST-to-HIR.
14:19:20
beach
Then an :AROUND method on COMPILE-AST will insert a special instruction before and one after the code generated from the AST.
14:20:00
beach
The instruction before will contain the start information and the instruction after will contain end information.
14:22:44
beach
But I wasn't sure that Clasp would want the new thing, so I am making it SICL specific for now.
14:24:59
beach
But this is Cleavir version 2, so at some point we should decide together how to make it work for Clasp.
14:25:41
beach
And I wouldn't rush, because I need to see how these new ideas work out with Clordane.
16:19:03
beach
Hmm, there appear to be situations where this simple idea won't work, i.e. insert special instructions before and after the code created by COMPILE-AST.