Native Process Debugger TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents... Native Process Debugger... 1 Operation Theory... 3 Quick Start... 4 Starting a new process 4 Attach to a running process 5 Restrictions... 6 Troubleshooting... 7 FAQ... 7 Specific Commands... 8 SYStem.Mode Establish the communication with the process 8 SYStem.PROCess Set the process command line 9 SYStem.CurrentDir Set the current directory for the process 9 SYStem.CpuAccess Run-time memory access (intrusive) 9 SYStem.Option MMUSPACES Enable space IDs 10 SYStem.Option IMASKASM Disable interrupts while single stepping 11 SYStem.Option IMASKHLL Disable interrupts while HLL single stepping 11 TASK.Attach Attach to a running process 11 TASK.ListPROC Display the list of running processes 11 TASK.List.tasks Display the list of the running threads 12 TASK.LIB Display the list loaded libraries 12 TASK.RUN Start a new process for debugging 12 TASK.DETACH Detach from process 12 TASK.KILL Kill a running process 12 TASK.SELect Select a process from the list 13 TASK.Go Start process 14 TASK.Break Stop a process 14 TASK.FREEZE Feeze a selected thread 14 TASK.THAW Resume a frozen thread 14 symbol.autoload.checkwin Set the autoloader script 14 Support... 15 Compiler 15 Products... 16 Native Process Debugger 1
Product Information 16 Order Information 16 Native Process Debugger 2
Native Process Debugger Version 06-Nov-2017 Operation Theory The TRACE32 Native process debugger is a debugger for Windows processes. Native Process Debugger 3
Quick Start Starting a new process 1. Set the process command line with the command SYStem.PROCess, for example SYStem.PROCess C:\Debugging\hello.exe arg1 arg2 2. Set the autoloader script. If the autoloader script is set, the process symbols will be automatically loaded. symbol.autoload.checkwin do C:\T32\autoload.cmm 3. Load the process with: SYStem.Mode Up ; process is stopped after loading or: SYStem.Mode Go ; process is running after loading After a SYStem.Mode Up, the loaded process will be stopped in a Windows DLL. To go to HLL code you can enter for example Go WinMain Native Process Debugger 4
Attach to a running process 1. Display the list of the running processes TASK.ListPROC 2. Set the autoloader script symbol.autoload.checkwin "do C:\T32\autoload.cmm " 3. Attach to a process TASK.Attach <pid> Native Process Debugger 5
Restrictions Minimum operating system version is Windows XP Native Process Debugger 6
Troubleshooting No information available until yet. FAQ Native Process Debugger 7
Specific Commands SYStem.Mode Establish the communication with the process SYStem.Mode <mode> <mode>: Down Attach Go Up Default: Down Down Attach Up Go Default mode, no debugging. TRACE32 attaches to the process with the selected id. TRACE32 loads the process with the selected command line. Process is stopped. TRACE32 loads the process with the selected command line. Process is running. Native Process Debugger 8
SYStem.PROCess Set the process command line SYStem.PROCess <cmdline> This command selects the command line of the process that will be loaded with SYStem.Mode UP r SYStem.Mode Go. This step is not needed if you attach to a running process SYStem.PROCess C:\Debugging\hello.exe arg1 arg2 SYStem.CurrentDir Set the current directory for the process SYStem.CurrentDir <path> Select the full path to the current directory for the process. If this is not set, the new process will have the same drive and current directory as the debugger. SYStem.CurrentDir C:\Debugging SYStem.CpuAccess Run-time memory access (intrusive) SYStem.CpuAccess Enable Denied Nonstop Default: Denied. Enable Denied Nonstop Allow intrusive run-time memory access. Lock intrusive run-time memory access. Lock all features of the debugger that affect the run-time behavior. If SYStem.CpuAccess Enable is set, it is possible to read from memory, to write to memory and to set breakpoints while the CPU is executing the program. To make this possible, the program execution is shortly stopped by the debugger. A red S in the state line of the TRACE32 main window warns you that the program is no longer running in realtime. Native Process Debugger 9
If specific windows, that display memory or variables should be updated while the program is running select the memory class E: or the format option %E. Data.dump E:0x100 Var.View %E first SYStem.Option MMUSPACES Enable space IDs SYStem.Option MMUSPACES [ON OFF] SYStem.Option MMUspaces [ON OFF] (deprecated) SYStem.Option MMU [ON OFF] (deprecated) Default: OFF. Enables the use of space IDs for logical addresses to support multiple address spaces. A space ID is a 16- bit memory space identifier which extends a logical TRACE32 address. With space IDs, TRACE32 can handle multiple address spaces in the debugger address translation. Space IDs are defined within a loaded TRACE32 OS awareness extension. Often, space IDs are directly derived from the OS process ID. Be aware that this depends on the OS and the loaded awareness extension. NOTE: SYStem.Option MMUSPACES should not be used if only one translation table is used on the target. If a debug session requires space IDs, you must observe the following sequence of steps: 1. Activate SYStem.Option MMUSPACES. 2. Load the symbols with Data.LOAD. Otherwise, the internal symbol database of TRACE32 may become inconsistent. Examples: ;Dump logical address 0xC00208A belonging to memory space with ;space ID 0x012A: Data.dump D:0x012A:0xC00208A ;Dump logical address 0xC00208A belonging to memory space with ;space ID 0x0203: Data.dump D:0x0203:0xC00208A Native Process Debugger 10
SYStem.Option IMASKASM Disable interrupts while single stepping SYStem.Option IMASKASM [ON OFF] Default: OFF. If enabled, the interrupt mask bits of the CPU will be set during assembler single-step operations. The interrupt routine is not executed during single-step operations. After single step the interrupt mask bits are restored to the value before the step. SYStem.Option IMASKHLL Disable interrupts while HLL single stepping SYStem.Option IMASKHLL [ON OFF] Default: OFF. If enabled, the interrupt mask bits of the cpu will be set during HLL single-step operations. The interrupt routine is not executed during single-step operations. After single step the interrupt mask bits are restored to the value before the step. TASK.Attach Attach to a running process TASK.Attach <pid> TASK.ListPROC Display the list of running processes TASK.ListPROC Display the list of running processes on the system. Native Process Debugger 11
TASK.List.tasks Display the list of the running threads TASK.List.tasks For more information about the command, see TASK.List.tasks. TASK.LIB Display the list loaded libraries TASK.LIB TASK.RUN Start a new process for debugging TASK.RUN <cmd> TASK.DETACH Detach from process TASK.DETACH <pid> TASK.KILL Kill a running process TASK.KILL <pid> Native Process Debugger 12
TASK.SELect Select a process from the list TASK.SELect <pid> If the debugger is not attached to the process, TASK.SELect performs an attach. Native Process Debugger 13
TASK.Go Start process TASK.Go <pid> TASK.Break Stop a process TASK.Break <pid> TASK.FREEZE Feeze a selected thread TASK.FREETZE <id> TASK.THAW Resume a frozen thread TASK.THAW <id> symbol.autoload.checkwin Set the autoloader script symbol.autoload.checkwin <script> If the autoloader script is set, the process symbols are automatically laoded after SYStem.Mode Up/Attach/Go. Native Process Debugger 14
Support Compiler Native Process Debugger 15
Products Product Information Order Information Native Process Debugger 16