Reference Guide New Features Installation, Transformations, Release Notes

dflush

Unwinds stack from suspended computations

MiniContents:

Arguments
Description
Examples

Format:

Removes the top-most suspended expressions evaluations

dflush

Removes the computation indicated by a suspended evaluation ID and all those that precede it

dflush susp-eval-id

Removes all suspended computations

dflush -all

Arguments:

susp-eval-id

The ID returned or thrown by the dprint command or which is printed by the dwhere command.

-all

Flushes all suspended evaluations within the current focus.

Description:

The dflush command unwinds the stack to eliminate frames generated by suspended computations. Typically, these can occur if you had used the dprint -nowait command. However, this situation can occur, for example, if an error occurred in a function call in an eval point or in an expression within a Tools > Evaluate window or if you use a $stop function.

You can use this command in three ways:

  • If you don't use an argument, the CLI unwinds the top-most suspended evaluation in all threads in the current focus.
  • If you use a susp-eval-id, the CLI unwinds each stack of all threads in the current focus, flushing all pending computations up to and including the frame associated with the ID.
  • If you use the -all option, the CLI flushes all suspended evaluations in all threads in the current focus.

If no evaluations are suspended. the CLI ignores this command. If you do not indicate a focus width, the default focus is thread level.

Examples:

The following example uses dprint to place five suspended routines on the stack. It then uses dflush to remove them. As you follow the example, you'll see the three different ways you can use the dflush command.

#
# Create 5 suspended functions
#
d1.<> dprint -nowait nothing2(7)
7
Thread 1.1 hit breakpoint 4 at line 310 in "nothing2(int)"
d1.<> dprint -nowait nothing2(8) 
8
Thread 1.1 hit breakpoint 4 at line 310 in "nothing2(int)"
d1.<> dprint -nowait nothing2(9) 
9
Thread 1.1 hit breakpoint 4 at line 310 in "nothing2(int)"
d1.<> dprint -nowait nothing2(10) 
10
Thread 1.1 hit breakpoint 4 at line 310 in "nothing2(int)"
d1.<> dprint -nowait nothing2(11) 
11
Thread 1.1 hit breakpoint 4 at line 310 in "nothing2(int)"
...
        
#
# Here's what the top of the call stack looks like:
#
    
d1.<> dwhere
   0 nothing2         PC=0x00012520, FP=0xffbef130 [fork_loop_2.cxx#310]
   1 ***** Eval Function Call (11) ****************
   2 nothing2         PC=0x00012520, FP=0xffbef220 [fork_loop_2.cxx#310]
   3 ***** Eval Function Call (10) ****************
   4 nothing2         PC=0x00012520, FP=0xffbef310 [fork_loop_2.cxx#310]
   5 ***** Eval Function Call (9) ****************
   6 nothing2         PC=0x00012520, FP=0xffbef400 [fork_loop_2.cxx#310]
   7 ***** Eval Function Call (8) ****************
   8 nothing2         PC=0x00012520, FP=0xffbef4f0 [fork_loop_2.cxx#310]
   9 ***** Eval Function Call (7) ****************
  10 forker           PC=0x00013fd8, FP=0xffbef648 [fork_loop_2.cxx#1120]
  11 fork_wrapper     PC=0x00014780, FP=0xffbef6c8 [fork_loop_2.cxx#1278]
    ...
    
#
# Use dflush to remove the last item pushed onto the stack. 
# Notice the frame associated with "11" is no longer there
#
    
d1.<> dflush 
d1.<> dwhere 
   0 nothing2         PC=0x00012520, FP=0xffbef220 [fork_loop_2.cxx#310]
   1 ***** Eval Function Call (10) ****************
   2 nothing2         PC=0x00012520, FP=0xffbef310 [fork_loop_2.cxx#310]
   3 ***** Eval Function Call (9) ****************
   4 nothing2         PC=0x00012520, FP=0xffbef400 [fork_loop_2.cxx#310]
   5 ***** Eval Function Call (8) ****************
   6 nothing2         PC=0x00012520, FP=0xffbef4f0 [fork_loop_2.cxx#310]
   7 ***** Eval Function Call (7) ****************
   8 forker           PC=0x00013fd8, FP=0xffbef648 [fork_loop_2.cxx#1120]
   9 fork_wrapper     PC=0x00014780, FP=0xffbef6c8 [fork_loop_2.cxx#1278]
    
#
# Use dflush with a suspened ID argument to remove all frames up to 
# and including the one associated with suspended ID 9. This means
# that 7 and 8 remain.
#
    
d1.<> dflush 9 
# Top of call stack after dflush 9
d1.<> dwhere 
   0 nothing2         PC=0x00012520, FP=0xffbef400 [fork_loop_2.cxx#310]
   1 ***** Eval Function Call (8) ****************
   2 nothing2         PC=0x00012520, FP=0xffbef4f0 [fork_loop_2.cxx#310]
   3 ***** Eval Function Call (7) ****************
   4 forker           PC=0x00013fd8, FP=0xffbef648 [fork_loop_2.cxx#1120]
   5 fork_wrapper     PC=0x00014780, FP=0xffbef6c8 [fork_loop_2.cxx#1278]
    
#
# Use dflush -all to remove all frames. Only the frames associated with 
# the program remain.
#
    
d1.<>  dflush -all
# Top of call stack after dflush -all
d1.<> dwhere
   0 forker           PC=0x00013fd8, FP=0xffbef648 [fork_loop_2.cxx#1120]
   1 fork_wrapper     PC=0x00014780, FP=0xffbef6c8 [fork_loop_2.cxx#1278]
 
 
 
Select a section:
 
documentation@etnus.com
Copyright © 2003, Etnus, Inc. All rights reserved.
Version 6.2