Sun Studio 12 Update 1:使用 dbx 调试程序

在函数内时启用处理程序 (in function)

要在函数内时启用处理程序,请键入:


<dbx> trace step -in foo

它等效于:


    # 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"; };
    }