Changes between Version 102 and Version 103 of NewGhciDebugger


Ignore:
Timestamp:
May 25, 2007 8:54:35 AM (8 years ago)
Author:
simonmar
Comment:

todo list is now in a ticket

Legend:

Unmodified
Added
Removed
Modified
  • NewGhciDebugger

    v102 v103  
    22[[PageOutline]]
    33
    4 == Known problems in the debugger ==
    5 
    6 === Wrong variable names in patterns ===
    7 
    8 Consider this program:
    9 {{{
    10    foo (Just _  : xs) = [xs]
    11    foo (Nothing : ys) = [ys]  {- set a breakpoint on this line -}
    12 
    13    main = print (foo [Nothing, Just ()])
    14 }}}
    15 
    16 If we hit a breakpoint in the second equation for `foo` we expect to see `ys` displayed as the local variables. Unfortunately, the debugger says that the locals are called `xs`:
    17 {{{
    18    *Main> :break 2
    19    Breakpoint activated in Main. Location: (2,22)-(2,25).
    20    *Main> main
    21    Stopped at breakpoint in Main. Location: (2,22)-(2,25).
    22    Locals: xs :: [Maybe ()]
    23 }}}
    24 The problem is the way that the compiler turns pattern matches into case expressions. XXX This issue deserves some extra thought.
    25 
    26 ----
     4The ToDo list for the debugger is now in ticket #1377.
    275
    286== Wishlist of features (please feel free to add your ideas here) ==
     
    3715
    3816Typically when we reach a breakpoint we want to inspect the values of local variables. As is often the case the values are thunks. So, to print them, we must force them in some way, and that sometimes raises more breakpoints. Often this is annoying. It would be handy if the debugger allowed us to temporarily disable all breakpoints. It should be relatively easy to implement. The main question is what is the right user interface to the feature?
    39 
    40 ----
    41 
    42 == Todo ==
    43 
    44  * Autocompletion for :break only provides names, not modules
    45 
    46  * :break <qualified name> only works if the name is exported can/should we relax this?
    47 
    48  * :force should catch exceptions, so [1,2,undefined]  would display as `[1,2,< exception >]`
    49 
    50  * sometimes the result types are wrong (see result001 test)
    51 
    52  * when showing a SrcSpan, we could say which top-level function contains it.  Ideally we should store the declPath that
    53    the coverage pass collects, but as a [OccName] rather than [String].  :history, :show context etc. should show the
    54    enclosing top-level function (or declpath).
    55 
    56  * perhaps we should have a :watch command, that could be used to save variables for future inspection (they wouldn't get
    57    thrown away by :continue)
    58 
    59  * Extend the stack inspection primitive to allow unboxed things to be grabbed. (MODERATE)
    60 
    61  * We can disable a breakpoint with ":set stop N :continue", but this still prints out the breakpoint info when we stop.
    62    Should we print the info only if there were no commands?
    63 
    64  * 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)
    65 
    66  * Flag to disable breakpoints?
    67 
    68  * When we restore the interactive context on resume, we throw away any new bindings made since the breakpoint.  Can this
    69    be fixed?
    70 
    71  * threads and breakpoints.
    72 
    73  * if a :force results in a breakpoint, we should treat it as we do other evaluations. (currently we get
    74    "*** Ignoring breakpoint").
    75  
    76  * show variables with unboxed types.
    77 
    78  * It's a bit strange that in "f = e" you don't get a breakpoint covering the whole binding, but in "f x = e" you do.
    79 
    80  * tabs go wrong with :list (but only for .lhs files, because unlit does tab expansion... duh)
    8117
    8218----