dxlreset.pro
1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
;+
; NAME:
; DXLRESET
;
; AUTHOR:
; Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
; craigm@lheamail.gsfc.nasa.gov
;
; PURPOSE:
; Reset the current debugging focus level (INTERNAL)
;
; CALLING SEQUENCE:
; DXLRESET
;
; DESCRIPTION:
;
; DXLRESET resets the current debugging focus level, if it has
; changed. This routine is internal to the debugging procedures.
;
; SEE ALSO:
;
; DXUP, DXDOWN, DXGET, DXSET
;
; MODIFICATION HISTORY:
; Written, 15 Apr 2000
;
; $Id: dxlreset.pro,v 1.2 2001/02/09 04:57:16 craigm Exp $
;
;-
; Copyright (C) 2000, Craig Markwardt
; This software is provided as is without any warranty whatsoever.
; Permission to use, copy, modify, and distribute modified or
; unmodified copies is granted, provided this copyright and disclaimer
; are included unchanged.
;-
pro dxlreset, remove=remove0
@dxcommon.pro
if n_elements(remove0) EQ 0 then remove0 = 1L
remove = floor(remove0(0)) + 1
;; Be sure we are on the same level as last time... otherwise reset
reset = 1
n = n_elements(dbtraceback)
if routine_names(/level)-remove EQ n then begin
help, calls=newtraceback
if n_elements(newtraceback)-remove EQ n then $
if total(newtraceback(remove:*) EQ dbtraceback) EQ n then $
reset = 0
endif
if reset then begin
dblevel = (routine_names(/level)-remove) > 1
remove = (routine_names(/level)-dblevel)
help, calls=newtraceback
dbtraceback = newtraceback(remove:*)
endif
end