Jump to content

SMPV211 - New Kernel Debugger Commands: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 7: Line 7:


A list of new and changed commands follows:
A list of new and changed commands follows:
 
* A '''.DP''' (processor status) command has been added. This command dumps out a processor control block verbosely. As an argument it takes a * (real current slot), a # (currently selected slot), and a 1 based processor number (e.g. '''.DP 3''' displays the processor status for processor 3), or a blank (e.g. '''.DP''') which displays the processor status for all the processors.
* A .DP (processor status) command has been added. This command dumps out a processor control block verbosely. As an argument it takes a * (real current slot), a # (currently selected slot), and a 1 based processor number (e.g. .DP 3 displays the processor status for processor 3), or a blank (e.g. .DP ) which displays the processor status for all the processors.  
* A '''.DL''' (display processor spinlocks) command has been added. This command displays all the spinlocks owned by a particular processor. As an argument it takes a * (real current slot), a # (currently selected slot), a 1 based processor number (e.g. '''.DL 3''' displays all the spinlocks owned by processor 3), an address of a spinlock, or a blank which displays all the spinlocks owned by all the processors.
 
* The '''.R''' and the '''R''' (register commands) have been modified to indicate which processor the currently selected slot is running on. A p=xxyy (xx = processor number, yy = flags) has been added to the end of the third register line. These processor numbers are 1- based (e.g. p=00 means that the currently selected slot is not running on any processor or is blocked, p=01 means the currently selected slot is running on processor 1). The flags are:
* A .DL (display processor spinlocks) command has been added. This command displays all the spinlocks owned by a particular processor. As an argument it takes a * (real current slot), a # (currently selected slot), a 1 based processor number (e.g. .DL 3 displays all the spinlocks owned by processor 3), an address of a spinlock, or a blank which displays all the spinlocks owned by all the processors.  
*:'''s''' processor is currently spinning.
 
*:'''r''' processor is attempting to grab the ring 0 suspend lock.
* The .R and the R (register commands) have been modified to indicate which processor the currently selected slot is running on. A p=xxyy (xx = processor number, yy = flags) has been added to the end of the third register line. These processor numbers are 1- based (e.g. p=00 means that the currently selected slot is not running on any processor or is blocked, p=01 means the currently selected slot is running on processor 1). The flags are:
*The '''.SS''' (change current slot) has been modified to change which PSA (process or save area) you are currently looking at (e.g. when you change to a slot which is currently running on a different processor and dump a variable in the PSA, it will display the value of that variable on that particular processor). The '''.S''' command is now identical to the '''.SS''' command. The PLMA is displayed properly for each processor.
 
:;s:processor is currently spinning.  
:;r:processor is attempting to grab the ring 0 suspend lock.  
*The .SS (change current slot) has been modified to change which PSA (process or save area) you are currently looking at (e.g. when you change to a slot which is currently running on a different processor and dump a variable in the PSA, it will display the value of that variable on that particular processor). The .S command is now identical to the .SS command. The PLMA is displayed properly for each processor.

Latest revision as of 14:12, 26 May 2025

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

OS/2 for SMP V2.11 Reference
  1. Notices
  2. Overview of OS/2 for SMP Version 2.11
  3. Platform Specific Drivers (PSDs)
  4. Understanding Spinlocks
  5. Device Drivers In OS/2 for SMP V2.11
  6. Application Considerations
  7. Avoiding Device Driver Deadlocks
  8. New Device Helper (DevHlp) Routines
  9. New Kernel Debugger Commands
  10. The Single Processor Utility Program
  11. OS/2 for SMP V2.11 Tools
  12. Appendix A
  13. Glossary

The Kernel debugger architecture is such that only one thread can be in the debugger at any given time, so it uses a spinlock to serialize its access.

If entered, the debugger must inform the user as to the state of all the processors, even though the other processors are still executing code. It accomplishes this by sending a spin command using and IPI (interprocessor interrupt) to all the other processors. When a processor receives a spin command sent by the kernel debugger, it saves its current state (all of its registers), acknowledges the spin command, and spins until released. This allows the user to switch to a slot which is currently executing on another processor and determines what it is doing.

All kernel debugger commands work as before, but a few have been modified to display or use MP specific information, and new MP specific commands have been added.

A list of new and changed commands follows:

  • A .DP (processor status) command has been added. This command dumps out a processor control block verbosely. As an argument it takes a * (real current slot), a # (currently selected slot), and a 1 based processor number (e.g. .DP 3 displays the processor status for processor 3), or a blank (e.g. .DP) which displays the processor status for all the processors.
  • A .DL (display processor spinlocks) command has been added. This command displays all the spinlocks owned by a particular processor. As an argument it takes a * (real current slot), a # (currently selected slot), a 1 based processor number (e.g. .DL 3 displays all the spinlocks owned by processor 3), an address of a spinlock, or a blank which displays all the spinlocks owned by all the processors.
  • The .R and the R (register commands) have been modified to indicate which processor the currently selected slot is running on. A p=xxyy (xx = processor number, yy = flags) has been added to the end of the third register line. These processor numbers are 1- based (e.g. p=00 means that the currently selected slot is not running on any processor or is blocked, p=01 means the currently selected slot is running on processor 1). The flags are:
    s processor is currently spinning.
    r processor is attempting to grab the ring 0 suspend lock.
  • The .SS (change current slot) has been modified to change which PSA (process or save area) you are currently looking at (e.g. when you change to a slot which is currently running on a different processor and dump a variable in the PSA, it will display the value of that variable on that particular processor). The .S command is now identical to the .SS command. The PLMA is displayed properly for each processor.