Delphi的CPU窗口说明

来源:互联网 发布:java replaceall \ 编辑:程序博客网 时间:2024/06/01 23:13

======================================================
注:本文源代码点此下载
======================================================

         cpu窗口由五个独立的区组成。每个区都以不同视角,深层次地显示运行中程序的数据。

1)  源代码+汇编区 显示的是从机器代码中反汇编出来的汇编指令。同时,在汇编指令前面,显示相应源代码。

2)  内存映射区      显示当前加载的可执行模块所访问的内存。内存默认以十六进制字节显示。

3)  堆栈区           显示程序当前的堆栈.堆栈以十六进制字长显示(32位值)

4)  寄存器区        显示cpu寄存器当前值。

5)  cpu标志区      显示cpu标志位当前值。

{============================================================}

在cpu窗口内任意位置右击,在右键菜单里获得其所在区的命令 。

如何打开cpu窗口?

在调试状态:

1)在主菜单里选择 view|debug windows|cpu

2)在代码编辑窗口里右击,在右键菜单里选择 debug|view cpu ,就能打开,并使cpu窗口定位在源代码将要执行的位置。

当程序出现异常,且不能定位源代码时,cpu窗口自动弹出。

例如,当使用了dll文件,或者shared object file (linux),你的程序中却没有它们的调试信息,调试器就不能打开这些文件;又比如你把源文件放在程序并没有指明的目录里。

如何调整cpu窗口布局?

拖动各区的边界,就在窗口内能扩大或缩小区的范围,达到你合适的布局。

{==========================图示================} 

源文

the cpu window consists of five separate panes. each pane gives you a view into a specific low-level aspect of your running application.

 disassembly pane displays the assembly instructions that have been disassembled from your application's machine code. in addition, the disassembly pane displays the original program source code above the associated assembly instructions.

  memory dump pane displays a memory dump of any memory accessible to the currently loaded executable module. by default, memory is displayed as hexadecimal bytes.

  machine stack pane displays the current contents of the program stack. by default, the stack is displayed as hexadecimal longs (32-bit values).

 cpu registers pane displays the current values of the cpu registers.

  flags pane displays the current values of the cpu flags.

 right-click anywhere on the cpu window to access commands specific to the contents of the current pane.

 opening the cpu window

 to open the cpu window anytime during a debugging session:

 choose view|debug windows|cpu or right-click the code editor and choose debug|view cpu to open the disassembly pane at the location of the execution point..

 the cpu window opens automatically whenever program execution stops at a location for which source code is unavailable. for example, the debugger cannot open the source file if you link a dll (windows) or shared object file (linux) built with debug information but do not include its source file in your project, or if you place the source file in a directory not specified in your project.

 resizing the cpu window panes


======================================================
在最后,我邀请大家参加新浪APP,就是新浪免费送大家的一个空间,支持PHP+MySql,免费二级域名,免费域名绑定 这个是我邀请的地址,您通过这个链接注册即为我的好友,并获赠云豆500个,价值5元哦!短网址是http://t.cn/SXOiLh我创建的小站每天访客已经达到2000+了,每天挂广告赚50+元哦,呵呵,饭钱不愁了,\(^o^)/