Using Execution Breakpoints
Breakpoints allow you to stop target program execution at a particular address and
transfer control to the emulation monitor. Suppose your system crashes when it
executes in a certain area of your program. You can set a breakpoint in your
program at a location just before the crash occurs. When the processor executes the
breakpoint, the emulator will force a break to the monitor. You can display registers
or memory to understand the state of the system before the crash occurs. Then you
can step through the program instructions and examine changes in the system
registers that lead up to the system crash.
Execution breakpoints are implemented using the BKPT instruction of the
MC68040. You can enable, disable, set, or clear execution breakpoints.
Set execution breakpoints at the first word of program instructions. Otherwise,
your BKPT may be interpreted as data and no breakpoint cycle will occur. When
the BKPT instruction is executed, target program execution stops immediately
(unlike using the analyzer to cause a break into the monitor, which may allow
several additional bus cycles to execute before the break finally occurs).
Setting execution breakpoints in RAM
When you set an execution breakpoint in RAM, the emulator will place a
breakpoint instruction (BKPT) at the address you specified, and then read that
address to ensure that the BKPT instruction is there. The program instruction that
was replaced by BKPT is saved by the emulator.
When the breakpoint instruction is executed, the BKPT acknowledge cycle is
detected by the emulator, and the emulator causes a break to the monitor. At this
point, the emulator replaces the BKPT instruction with the original instruction it
saved. It also replaces the BKPT instruction with the original instruction whenever
you disable or remove the breakpoint.
The emulator allows an unlimited number of breakpoints to be set in RAM.
Chapter 4: Using the Emulator
Using Execution Breakpoints
163
Summary of Contents for 64783A
Page 30: ...xxx ...
Page 31: ...Part 1 Quick Start Guide 1 ...
Page 33: ...1 Getting Started 3 ...
Page 70: ...40 ...
Page 75: ...Part 2 Using The Emulator 45 ...
Page 140: ...110 ...
Page 141: ...4 Using the Emulator How to control the processor and view system resources 111 ...
Page 227: ...5 Using the Emulation Bus Analyzer How to record program execution in real time 197 ...
Page 290: ...260 ...
Page 331: ...8 Configuring the Emulator 301 ...
Page 382: ...352 ...
Page 383: ...9 Solving Problems What to do when the emulator doesn t behave as expected 353 ...
Page 397: ...Part 3 Reference 367 ...
Page 399: ...10 Using Memory Management Understanding logical and physical emulation and analysis 369 ...
Page 429: ...11 Emulator Commands The command syntax reference for the emulator softkey interface 399 ...
Page 443: ...copy Chapter 11 Emulator Commands copy 413 ...
Page 451: ...display Chapter 11 Emulator Commands display 421 ...
Page 457: ...DISPLAY MEMORY Chapter 11 Emulator Commands DISPLAY MEMORY 427 ...
Page 461: ...DISPLAY MMU Chapter 11 Emulator Commands DISPLAY MMU 431 ...
Page 464: ...DISPLAY TRACE Chapter 11 Emulator Commands DISPLAY TRACE 434 ...
Page 480: ...modify Chapter 11 Emulator Commands modify 450 ...
Page 501: ...set Chapter 11 Emulator Commands set 471 ...
Page 514: ... SYMB Chapter 11 Emulator Commands SYMB 484 ...
Page 582: ...552 ...
Page 583: ...13 Setting X Resources 553 ...
Page 598: ...568 ...
Page 606: ...576 ...
Page 613: ...16 Specifications and Characteristics 583 ...
Page 627: ...Part 4 Concept Guide 597 ...
Page 629: ...17 X Resources and the Graphical User Interface 599 ...
Page 639: ...Part 5 Installation and Service Guide 609 ...
Page 697: ...19 Installation and Service 667 ...
Page 746: ...Chapter 19 Installation and Service Verifying the Installation 716 ...
Page 755: ...20 Installing Updating Emulator Firmware 725 ...
Page 762: ...732 ...
Page 778: ...748 ...
Page 810: ...X server 554 604 X Window System 54 Index 780 ...