Debugging a Program With dbx

Enable Handler While Within the Given Function (in func)

For example:


trace
step -in foo

is equivalent to:


    # create handler in disabled state
    when step -disable { echo Stepped to $line; } 
    t=$newhandlerid    # remember handler id
    when in foo {
     # when entered foo enable the trace
     handler -enable "$t"
     # arrange so that upon returning from foo,
     # the trace is disabled.
     when returns { handler -disable "$t"; };
    }