Changes between Version 86 and Version 87 of NewGhciDebugger


Ignore:
Timestamp:
Apr 12, 2007 2:05:57 PM (8 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewGhciDebugger

    v86 v87  
    4545=== Starting the debugger ===
    4646
    47 The debugger is integrated with GHCi, and it is on by default. The debugger slows program execution down by a factor of approximately XXX times. You can turn it off (to avoid the slowdown) using the `-fno-debug` command line argument, when you start GHCi.
     47The debugger is integrated with GHCi, and it is on by default. XXX Not true at the moment; you still have to use the -fhpc flag. The debugger slows program execution down by a factor of approximately XXX times. You can turn it off (to avoid the slowdown) using the XXX command line argument, when you start GHCi.
    4848
    4949=== Setting breakpoints ===
     
    129129   :delete *
    130130}}}
     131XXX I don't think the delete command actually turns the breakpoint off yet. Seems I forgot to do that. However, it does delete it, in the sense that ghci no longer prints it out when you ask to show the breakpoints.
    131132
    132133=== What happens when the debugger hits a breakpoint? ===
     
    202203   :step <expression>
    203204}}}
    204 
    205205
    206206=== Continuing execution after a breakpoint ===
     
    288288=== Pending ===
    289289
    290  * Replace Loc with a proper source span type. (EASY)
     290 * Replace Loc with a proper source span type. Currently I use a quadruple of Ints to represent a source span. Hpc also has its own representations of spans, as does GHC. It would be nice if we all used the same one (namely the one in GHC). (EASY)
    291291
    292292 * Investigate whether the compiler is eta contracting this def: "bar xs = print xs", this could be a problem if we want to print out "xs". (MODERATE)
    293293
    294  * Fix the ghci help command. (EASY)
     294 * Fix the ghci help command. This can be done when we decide on the final syntax of the commands. (EASY)
    295295
    296296 * Save/restore the link environment at breakpoints. At a breakpoint we modify both the hsc_env of the current Session, and also the persistent linker state. Both of these are held under IORefs, so we have to be careful about what we do here. The "obvious" option is to save both of these states on the resume stack when we enter a breakpoint and then restore them when we continue execution. I have to check with Simon if there are any difficult issues that need to be resolved here, like gracefully handling exceptions etc. (MODERATE)
     
    300300 * Allow breakpoints to be set by function name. Some questions: what about local functions? What about functions inside type class instances, and default methods of classes? (MODERATE)
    301301
    302  * Support Unicode in data constructor names inside info tables. (MODERATE)
    303 
    304  * Fix the slow search of the ticktree for larger modules, perhaps by keeping the ticktree in the module info, rather than re-generating it each time. (MODERATE)
     302 * Support Unicode in data constructor names inside info tables. Actually this should just be a matter of using the underlying fast string in the occname. (MODERATE)
     303
     304 * Fix the slow search of the ticktree for larger modules, perhaps by keeping the ticktree in the module info, rather than re-generating it each time. Simon: I currently re-build the tick tree for a module every time I set a breakpoint. This seems rather ugly. I think it would be better to keep the tick tree inside the ModInfo, and thus only build the ticktree when the module is (re)loaded. (MODERATE)
    305305
    306306 * Use a primop for inspecting the STACK_AP, rather than a foreign C call. (MODERATE)
     
    316316 * Extend the stack inspection primitive to allow unboxed things to be grabbed. (MODERATE)
    317317
    318 
    319318=== Partially done ===
    320319
    321  * The delete command. It is fairly primitive, and probably not done in the best way. This will be fixed when the API is finalised.
    322 
    323  * Look at slow behaviour of :print command on long list of chars. I've asked Pepe about this, he has an idea of what the problem is and will be working on a solution soon.
    324 
    325  * User documentation. You're looking at it. The user manual will have to move into the main GHC docs at some point.
     320 * The delete command. It is fairly primitive, and probably not done in the best way. This will be fixed when the API is finalised. (EASY)
     321
     322 * Look at slow behaviour of :print command on long list of chars. I've asked Pepe about this, he has an idea of what the problem is and will be working on a solution soon. (MODERATE)
     323
     324 * User documentation. You're looking at it. The user manual will have to move into the main GHC docs at some point. (ONGOING)
    326325
    327326=== Tentative ===
    328327
    329  * Perhaps there are some redundant ticks we can delete, such as ones which begin at the same start position?
    330 
    331  * Allow breakpoints to be enabled and disabled without deleting them, as in gdb.
    332 
    333  * Extend breaks and step with counters, so that we stop after N hits, rather than immediately.
    334 
    335  * Revert to adding tick information to the BCO directly, and remove the byte code instructions for breaks. I'm not sure that this is worth it. In some ways the implementation based on a byte code instruction is a little cleaner than adding breaks on BCOs directly. Though the bc instruction method may be a little slower than the other way.
     328 * Perhaps there are some redundant ticks we can delete, such as ones which begin at the same start position? (MODERATE)
     329
     330 * Allow breakpoints to be enabled and disabled without deleting them, as in gdb. (EASY)
     331
     332 * Extend breaks and step with counters, so that we stop after N hits, rather than immediately. (EASY/MODERATE)
     333
     334 * Revert to adding tick information to the BCO directly, and remove the byte code instructions for breaks. I'm not sure that this is worth it. In some ways the implementation based on a byte code instruction is a little cleaner than adding breaks on BCOs directly. Though the bc instruction method may be a little slower than the other way. (MODERATE/DIFFICULT)
    336335
    337336----