summaryrefslogtreecommitdiffstats
path: root/autoexp.snippet
blob: 0d9c132b48db6a959b55e8f3309864c3f723e11a (plain)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This file is part cv2pdb, a 
;; converter of DMD CodeView debug information to PDB files
;;
;; written by Rainer Schuetze, placed into the Public Domain
;;
;;	 D types
;; 
;; add the content of this file to the [AutoExpand] section
;; of
;; <Visual Studio Installation Path>\Common7\Package\Debugger\autoexp.dat
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; string: dynamic array of char
const char[]|char[]|string {
    preview ( 
 		  #if ($e.data == 0) ( "null" )
		  #else ( 
        #(
           "[", $e.length, "] ", [$e.data, s]
        )
      )
    )
    stringview ( 
 		  #if ($e.data == 0) ( "null" )
		  #else ( 
        #(
           [$e.data, s]
        )
      )
    )
    children (
        #(
            length: [$e.length, i],
            data: [$e.data]
        )
    )
}

; dynamic array
*[] {
    preview ( 
 		  #if ($e.data == 0) ( "null" )
 		  #else ( 
        #(
          "[", $e.length, "](",
          #array
          (
            expr :	($e.data)[$i],
            size :	$e.length
          ),
          ")"
        )
      )
    )
    children (
        #(
            length: [$e.length, i],
            #array (
                expr: $e.data[$i],
                size: $e.length
            )
        )
    )
}

;; display associative array
;;
aa<*> {
    preview(
      #(
        "[", $e.a->nodes, "] ", [(void*) $e.a]
      )
    )
    children(
        #(
            #array (
                expr: &$e.a->b.data[$i],
                size: $e.a->b.length
            ) : 
            #tree (
                head : $e,
                left : left,
                right : right,
                ; size : $c.size
            ) : $e
              
        )
    )
}

; display tree
internal@aaA<*,*> {
    preview(
      #( "<", $e.key, ", ", $e.value, ">" )
    )
}

;; display null references for class objects
*@* {
	preview(
		#( 
   		#if (&$e == 0) ( "null" )
   		#else ( [$e,!] )
   	)
  )
}