diff options
Diffstat (limited to 'html/039debug.cc.html')
-rw-r--r-- | html/039debug.cc.html | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/html/039debug.cc.html b/html/039debug.cc.html index 9552da5c..7f792b4f 100644 --- a/html/039debug.cc.html +++ b/html/039debug.cc.html @@ -98,28 +98,28 @@ if ('onhashchange' in window) { <span id="L38" class="LineNr"> 38 </span><span class="Delimiter">}</span> <span id="L39" class="LineNr"> 39 </span> <span id="L40" class="LineNr"> 40 </span><span class="Delimiter">:(after "Run One Instruction")</span> -<span id="L41" class="LineNr"> 41 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">))</span> -<span id="L42" class="LineNr"> 42 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"== label "</span> << get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> << end<span class="Delimiter">();</span> -<span id="L43" class="LineNr"> 43 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L9'>Source_line</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">))</span> -<span id="L44" class="LineNr"> 44 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"inst: "</span> << get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L9'>Source_line</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> << end<span class="Delimiter">();</span> +<span id="L41" class="LineNr"> 41 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">))</span> +<span id="L42" class="LineNr"> 42 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"== label "</span> << get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> << end<span class="Delimiter">();</span> +<span id="L43" class="LineNr"> 43 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L9'>Source_line</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">))</span> +<span id="L44" class="LineNr"> 44 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"inst: "</span> << get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L9'>Source_line</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L45" class="LineNr"> 45 </span><span class="Normal">else</span> <span id="L46" class="LineNr"> 46 </span> <span class="Comment">// no source line info; do what you can</span> -<span id="L47" class="LineNr"> 47 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"inst: "</span> << <a href='039debug.cc.html#L50'>debug_info</a><span class="Delimiter">(</span><a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> << end<span class="Delimiter">();</span> +<span id="L47" class="LineNr"> 47 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"inst: "</span> << <a href='039debug.cc.html#L50'>debug_info</a><span class="Delimiter">(</span><a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L48" class="LineNr"> 48 </span> <span id="L49" class="LineNr"> 49 </span><span class="Delimiter">:(code)</span> <span id="L50" class="LineNr"> 50 </span>string <a href='039debug.cc.html#L50'>debug_info</a><span class="Delimiter">(</span><span class="Normal">uint32_t</span> inst_address<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L51" class="LineNr"> 51 </span> <span class="Normal">uint8_t</span> op = <a href='010---vm.cc.html#L165'>read_mem_u8</a><span class="Delimiter">(</span>inst_address<span class="Delimiter">);</span> +<span id="L51" class="LineNr"> 51 </span> <span class="Normal">uint8_t</span> op = <a href='010vm.cc.html#L165'>read_mem_u8</a><span class="Delimiter">(</span>inst_address<span class="Delimiter">);</span> <span id="L52" class="LineNr"> 52 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>op != <span class="Constant">0xe8</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L53" class="LineNr"> 53 </span> ostringstream out<span class="Delimiter">;</span> -<span id="L54" class="LineNr"> 54 </span> out << <a href='010---vm.cc.html#L394'>HEXBYTE</a> << <a href='010---vm.cc.html#L397'>NUM</a><span class="Delimiter">(</span>op<span class="Delimiter">);</span> +<span id="L54" class="LineNr"> 54 </span> out << <a href='010vm.cc.html#L394'>HEXBYTE</a> << <a href='010vm.cc.html#L397'>NUM</a><span class="Delimiter">(</span>op<span class="Delimiter">);</span> <span id="L55" class="LineNr"> 55 </span> <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span id="L56" class="LineNr"> 56 </span> <span class="Delimiter">}</span> -<span id="L57" class="LineNr"> 57 </span> <span class="Normal">int32_t</span> offset = <a href='010---vm.cc.html#L176'>read_mem_i32</a><span class="Delimiter">(</span>inst_address+<span class="Comment">/*</span><span class="Comment">skip op</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span> +<span id="L57" class="LineNr"> 57 </span> <span class="Normal">int32_t</span> offset = <a href='010vm.cc.html#L176'>read_mem_i32</a><span class="Delimiter">(</span>inst_address+<span class="Comment">/*</span><span class="Comment">skip op</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L58" class="LineNr"> 58 </span> <span class="Normal">uint32_t</span> next_eip = inst_address+<span class="Comment">/*</span><span class="Comment">inst length</span><span class="Comment">*/</span><span class="Constant">5</span>+offset<span class="Delimiter">;</span> <span id="L59" class="LineNr"> 59 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> next_eip<span class="Delimiter">))</span> <span id="L60" class="LineNr"> 60 </span> <span class="Identifier">return</span> <span class="Constant">"e8/call "</span>+get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> next_eip<span class="Delimiter">);</span> <span id="L61" class="LineNr"> 61 </span> ostringstream out<span class="Delimiter">;</span> -<span id="L62" class="LineNr"> 62 </span> out << <span class="Constant">"e8/call 0x"</span> << <a href='010---vm.cc.html#L395'>HEXWORD</a> << next_eip<span class="Delimiter">;</span> +<span id="L62" class="LineNr"> 62 </span> out << <span class="Constant">"e8/call 0x"</span> << <a href='010vm.cc.html#L395'>HEXWORD</a> << next_eip<span class="Delimiter">;</span> <span id="L63" class="LineNr"> 63 </span> <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span id="L64" class="LineNr"> 64 </span><span class="Delimiter">}</span> <span id="L65" class="LineNr"> 65 </span> @@ -138,18 +138,18 @@ if ('onhashchange' in window) { <span id="L78" class="LineNr"> 78 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L73'>Watch_points</a></span><span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L79" class="LineNr"> 79 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"dbg"</span><span class="Delimiter">)</span> << <span class="Constant">"watch points:"</span> << end<span class="Delimiter">();</span> <span id="L80" class="LineNr"> 80 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<string<span class="Delimiter">,</span> <span class="Normal">uint32_t</span>>::iterator p = <span class="Special"><a href='039debug.cc.html#L73'>Watch_points</a></span><span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != <span class="Special"><a href='039debug.cc.html#L73'>Watch_points</a></span><span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> -<span id="L81" class="LineNr"> 81 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"dbg"</span><span class="Delimiter">)</span> << <span class="Constant">" "</span> << p<span class="Delimiter">-></span>first << <span class="Constant">": "</span> << <a href='010---vm.cc.html#L395'>HEXWORD</a> << p<span class="Delimiter">-></span>second << <span class="Constant">" -> "</span> << <a href='010---vm.cc.html#L395'>HEXWORD</a> << <a href='010---vm.cc.html#L172'>read_mem_u32</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>second<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> +<span id="L81" class="LineNr"> 81 </span> <a href='003trace.cc.html#L96'>trace</a><span class="Delimiter">(</span><span class="Special">Callstack_depth</span><span class="Delimiter">,</span> <span class="Constant">"dbg"</span><span class="Delimiter">)</span> << <span class="Constant">" "</span> << p<span class="Delimiter">-></span>first << <span class="Constant">": "</span> << <a href='010vm.cc.html#L395'>HEXWORD</a> << p<span class="Delimiter">-></span>second << <span class="Constant">" -> "</span> << <a href='010vm.cc.html#L395'>HEXWORD</a> << <a href='010vm.cc.html#L172'>read_mem_u32</a><span class="Delimiter">(</span>p<span class="Delimiter">-></span>second<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span id="L82" class="LineNr"> 82 </span><span class="Delimiter">}</span> <span id="L83" class="LineNr"> 83 </span> <span id="L84" class="LineNr"> 84 </span><span class="Delimiter">:(before "End Globals")</span> <span id="L85" class="LineNr"> 85 </span>string <span class="Special">Watch_this_effective_address</span><span class="Delimiter">;</span> <span id="L86" class="LineNr"> 86 </span><span class="Delimiter">:(after "Run One Instruction")</span> <span id="L87" class="LineNr"> 87 </span><span class="Special">Watch_this_effective_address</span> = <span class="Constant">""</span><span class="Delimiter">;</span> -<span id="L88" class="LineNr"> 88 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> && <a href='001help.cc.html#L106'>starts_with</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">),</span> <span class="Constant">"$watch-"</span><span class="Delimiter">))</span> -<span id="L89" class="LineNr"> 89 </span> <span class="Special">Watch_this_effective_address</span> = get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">);</span> +<span id="L88" class="LineNr"> 88 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> && <a href='001help.cc.html#L106'>starts_with</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">),</span> <span class="Constant">"$watch-"</span><span class="Delimiter">))</span> +<span id="L89" class="LineNr"> 89 </span> <span class="Special">Watch_this_effective_address</span> = get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">);</span> <span id="L90" class="LineNr"> 90 </span><span class="Delimiter">:(after "Found <a href='013direct_addressing.cc.html#L101'>effective_address</a>(addr)")</span> <span id="L91" class="LineNr"> 91 </span><span class="Normal">if</span> <span class="Delimiter">(</span>!<span class="Special">Watch_this_effective_address</span><span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> -<span id="L92" class="LineNr"> 92 </span> <a href='003trace.cc.html#L441'>dbg</a> << <span class="Constant">"now watching "</span> << <a href='010---vm.cc.html#L395'>HEXWORD</a> << addr << <span class="Constant">" for "</span> << <span class="Special">Watch_this_effective_address</span> << end<span class="Delimiter">();</span> +<span id="L92" class="LineNr"> 92 </span> <a href='003trace.cc.html#L441'>dbg</a> << <span class="Constant">"now watching "</span> << <a href='010vm.cc.html#L395'>HEXWORD</a> << addr << <span class="Constant">" for "</span> << <span class="Special">Watch_this_effective_address</span> << end<span class="Delimiter">();</span> <span id="L93" class="LineNr"> 93 </span> <a href='001help.cc.html#L229'>put</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L73'>Watch_points</a></span><span class="Delimiter">,</span> <span class="Special">Watch_this_effective_address</span><span class="Delimiter">,</span> addr<span class="Delimiter">);</span> <span id="L94" class="LineNr"> 94 </span><span class="Delimiter">}</span> <span id="L95" class="LineNr"> 95 </span> @@ -157,14 +157,14 @@ if ('onhashchange' in window) { <span id="L97" class="LineNr"> 97 </span><span class="Comment">//: Not a general mechanism; by the time you get here you're willing to hack</span> <span id="L98" class="LineNr"> 98 </span><span class="Comment">//: on the emulator.</span> <span id="L99" class="LineNr"> 99 </span><span class="Delimiter">:(after "Run One Instruction")</span> -<span id="L100" class="LineNr">100 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> && get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010---vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> == <span class="Constant">"$dump-stream-at-EAX"</span><span class="Delimiter">)</span> -<span id="L101" class="LineNr">101 </span> <a href='039debug.cc.html#L103'>dump_stream_at</a><span class="Delimiter">(</span><span class="Special"><a href='010---vm.cc.html#L25'>Reg</a></span>[EAX]<span class="Delimiter">.</span>u<span class="Delimiter">);</span> +<span id="L100" class="LineNr">100 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L233'>contains_key</a><span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> && get<span class="Delimiter">(</span><span class="Special"><a href='039debug.cc.html#L8'>Symbol_name</a></span><span class="Delimiter">,</span> <a href='010vm.cc.html#L26'>EIP</a><span class="Delimiter">)</span> == <span class="Constant">"$dump-stream-at-EAX"</span><span class="Delimiter">)</span> +<span id="L101" class="LineNr">101 </span> <a href='039debug.cc.html#L103'>dump_stream_at</a><span class="Delimiter">(</span><span class="Special"><a href='010vm.cc.html#L25'>Reg</a></span>[EAX]<span class="Delimiter">.</span>u<span class="Delimiter">);</span> <span id="L102" class="LineNr">102 </span><span class="Delimiter">:(code)</span> <span id="L103" class="LineNr">103 </span><span class="Normal">void</span> <a href='039debug.cc.html#L103'>dump_stream_at</a><span class="Delimiter">(</span><span class="Normal">uint32_t</span> stream_start<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L104" class="LineNr">104 </span> <span class="Normal">int32_t</span> stream_length = <a href='010---vm.cc.html#L176'>read_mem_i32</a><span class="Delimiter">(</span>stream_start + <span class="Constant">8</span><span class="Delimiter">);</span> +<span id="L104" class="LineNr">104 </span> <span class="Normal">int32_t</span> stream_length = <a href='010vm.cc.html#L176'>read_mem_i32</a><span class="Delimiter">(</span>stream_start + <span class="Constant">8</span><span class="Delimiter">);</span> <span id="L105" class="LineNr">105 </span> <a href='003trace.cc.html#L441'>dbg</a> << <span class="Constant">"stream length: "</span> << std::dec << stream_length << end<span class="Delimiter">();</span> <span id="L106" class="LineNr">106 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < stream_length + <span class="Constant">12</span><span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> -<span id="L107" class="LineNr">107 </span> <a href='003trace.cc.html#L441'>dbg</a> << <span class="Constant">"0x"</span> << <a href='010---vm.cc.html#L395'>HEXWORD</a> << <span class="Delimiter">(</span>stream_start+i<span class="Delimiter">)</span> << <span class="Constant">": "</span> << <a href='010---vm.cc.html#L394'>HEXBYTE</a> << <a href='010---vm.cc.html#L397'>NUM</a><span class="Delimiter">(</span><a href='010---vm.cc.html#L165'>read_mem_u8</a><span class="Delimiter">(</span>stream_start+i<span class="Delimiter">))</span> << end<span class="Delimiter">();</span> +<span id="L107" class="LineNr">107 </span> <a href='003trace.cc.html#L441'>dbg</a> << <span class="Constant">"0x"</span> << <a href='010vm.cc.html#L395'>HEXWORD</a> << <span class="Delimiter">(</span>stream_start+i<span class="Delimiter">)</span> << <span class="Constant">": "</span> << <a href='010vm.cc.html#L394'>HEXBYTE</a> << <a href='010vm.cc.html#L397'>NUM</a><span class="Delimiter">(</span><a href='010vm.cc.html#L165'>read_mem_u8</a><span class="Delimiter">(</span>stream_start+i<span class="Delimiter">))</span> << end<span class="Delimiter">();</span> <span id="L108" class="LineNr">108 </span><span class="Delimiter">}</span> <span id="L109" class="LineNr">109 </span> <span id="L110" class="LineNr">110 </span><span class="Comment">//: helpers</span> |