1 ; **** BEGIN LICENSE BLOCK
; ****
2 ; Version
: MPL
1.1/GPL
2.0/LGPL
2.1
4 ; The contents of this file are
subject to the Mozilla Public License Version
5 ; 1.1 (the
"License"); you may
not use this file except
in compliance with
6 ; the License. You may obtain a copy of the License at
7 ; http
://www.mozilla.org
/MPL
/
9 ; Software distributed under the License is distributed on an
"AS IS" basis
,
10 ; WITHOUT WARRANTY OF ANY KIND
, either express
or implied. See the License
11 ; for the specific language governing rights
and limitations under the
14 ; The Original Code is
[Open Source Virtual Machine.
].
16 ; The Initial Developer of the Original Code is
17 ; Adobe System Incorporated.
18 ; Portions created
by the Initial Developer are Copyright
(C
) 2009
19 ; the Initial Developer. All Rights Reserved.
24 ; Alternatively
, the contents of this file may be used under the terms of
25 ; either the GNU General Public License Version
2 or later
(the
"GPL"), or
26 ; the GNU Lesser General Public License Version
2.1 or later
(the
"LGPL"),
27 ; in which case the provisions of the GPL
or the LGPL are applicable instead
28 ; of those above. If you wish
to allow use of your version of this file only
29 ; under the terms of either the GPL
or the LGPL
, and not to allow others
to
30 ; use your version of this file under the terms of the MPL
, indicate your
31 ; decision
by deleting the provisions above
and replace them with the notice
32 ; and other provisions required
by the GPL
or the LGPL. If you do
not delete
33 ; the provisions above
, a recipient may use your version of this file under
34 ; the terms of any one of the MPL
, the GPL
or the LGPL.
36 ; ***** END LICENSE BLOCK
*****
38 ; This autoexp.dat file is an insert for the VC
++ autoexp.dat located at
39 ; {yourVCdir
}\Common7\Packages\Debugger.
40 ; It defines a
set of visualizers for avmplus
, especially Strings
and Atoms.
41 ; For Atoms
, there is a dummy structure definition AtomP
in AtomConstants.cpp
42 ; that allows you
to cast an Atom
to an AtomP. In the Watches window
, you can
43 ; visualize an atom with this statement
:
44 ; *(avmplus
::AtomP
*) &myAtom
45 ; Insert the code below right after the
[Visualizer
] tag.
47 ; Please feel free
to add your own visualizer
, or to let me know which additional
48 ; visualizer you would like
to have. Email me at daumling@adobe.com.
52 MMgc
::RCObject|avmplus
::AvmPlusScriptableObject|avmplus
::ScriptObject
{
54 #if (&$e == 0) ( "NULL" )
59 [((int)($e.composite
& 0xFF)-1),d
]
66 #switch ($e.value & 7)
67 #case 0 ( #( "untagged ", [$e.value,x] ) )
68 #case 1 ( #( "Object ", (avmplus::ScriptObject*) ($e.value & ~7) ) )
69 #case 2 ( #( "String ", (avmplus::String*) ($e.value & ~7) ) )
70 #case 3 ( #( "Namespace ", (avmplus::Namespace*) ($e.value & ~7) ) )
71 #case 4 ( #( "undefined" ) )
72 #case 5 ( #( "bool ", ($e.value & 8) != 0 ) )
73 #case 6 ( #( "int ", [$e.value >> 3,d] ) )
74 #case 7 ( #( "double ", *((double*) ($e.value & ~7)) ) )
80 #if( &$e == 0) ( "NULL" )
83 ; print [n
] "text" if non
0-terminated
84 ; print "text" if 0-terminated
85 #switch ($e.m_bitsAndFlags & 0x03)
88 #if ($e.m_buffer.p8[$e.m_length] != 0 )
102 #if ($e.m_buffer.p16[$e.m_length] != 0 )
114 #default ( "[INVALID STRING WIDTH]" )
120 #switch ($e.m_bitsAndFlags & 0x03)
121 #case 0x01 ( [$e.m_buffer.p8,sb] )
122 #case 0x02 ( [$e.m_buffer.p16,sub] )
128 refcount
: [((int)($e.composite
& 0xFF)-1),d
],
129 interned
: ($e.m_bitsAndFlags
& 0x00000010) != 0,
130 width
: [($e.m_bitsAndFlags
& 0x03) << 3,d
],
131 length
: [$e.m_length
,d
],
132 charsLeft
: [($e.m_bitsAndFlags
>> 9) & 0x7FFFFF,d
],
133 #if (($e.m_bitsAndFlags & 0x0000000C) == 8)
135 #( master: $e.m_master )
139 #( numeric value: [$e.m_index,d] )
142 #switch ($e.m_bitsAndFlags & 0x03)
143 #case 0x01 ( #( text: [$e.m_buffer.p8,s] ) )
144 #case 0x02 ( #( text: [$e.m_buffer.p16,su] ) )
145 #default ( #( invalid text: ) )
147 #switch ($e.m_bitsAndFlags & 0x0000000C)
148 #case 0x00000000 ( #( type is DYNAMIC: 1==1 ) )
149 #case 0x00000004 ( #( type is STATIC: 1==1 ) )
150 #case 0x00000008 ( #( type is DEPENDENT: 1==1 ) )
151 #case 0x0000000C ( #( type: 3 ) )
157 #if( &$e == 0) ( "NULL" )
169 avmplus
::MethodInfo
{
171 #if( &$e == 0) ( "NULL" )
174 #if ($e._declaringScopeOrTraits & 1)
175 ( ((avmplus
::Traits
*)($e._declaringScopeOrTraits
& ~
1))->_name
)
177 ( ((avmplus
::ScopeTypeChain
*)($e._declaringScopeOrTraits
))->_traits
->_name
)
182 #if ($e._declaringScopeOrTraits & 1)
184 declaringTraits
: (avmplus
::Traits
*)($e._declaringScopeOrTraits
& ~
1)
188 declaringScope
: (avmplus
::ScopeTypeChain
*)($e._declaringScopeOrTraits
)
190 #if ($e._activationScopeOrTraits & 1)
192 activationTraits
: (avmplus
::Traits
*)($e._activationScopeOrTraits
& ~
1)
196 activationScope
: (avmplus
::ScopeTypeChain
*)($e._activationScopeOrTraits
)
201 avmplus
::ScopeTypeChain
{
203 #if( &$e == 0) ( "NULL" )
215 scopes
: #array ( expr: $e._scopes[$i], size: $e.fullsize )
221 #if( &$e == 0) ( "NULL" )
224 "List[", [$e.len
,d
], "]"
240 #if( &$e == 0) ( "NULL" )
244 #switch ($e.m_uri & 7)
246 #case 1 ( "protected" )
247 #case 2 ( "internal" )
248 #case 3 ( "private" )
249 #case 4 ( "explicit" )
250 #case 5 ( "staticprotected" )
251 #case 6 ( "unknown 6" )
252 #case 7 ( "unknown 7" )
255 ; not null
or undefined
256 #if ($e.m_prefix > 0x07)
258 #( (avmplus::String*) ($e.m_prefix & ~7) ),
260 #( (avmplus::String*) ($e.m_uri & ~7) )
264 #( (avmplus::String*) ($e.m_uri & ~7) )