On-line Debugging Tool: Difference between revisions

Content deleted Content added
Addbot (talk | contribs)
m Bot: Removing {{Stub}} (Report Errors)
m Fix link to bitsavers.
 
(18 intermediate revisions by 18 users not shown)
Line 1:
'''On-line Debugging Tool''', or ('''ODT''',) wasis thea namefamily of several [[debugger]] programs originally developed for [[Digital Equipment Corporation|DEC]] (DEC) hardware. Various [[operating system]]s including [[OS/8]], [[RT-11]], [[RSX-11]], and [[RSTS/E]] implementedimplement ODT, as did the [[firmware]] console of all of the [[LSI-11]]-family processors including the 11/03, 11/23/24, 11/53, [[PDP-11/73|11/73]], and 11/83/84.
 
The debugger allows access to memory using [[octal]] addresses and data. Within the [[software system]]s, the debugger accesses the process's address space. DEC's line of PDP-11 processors do not implement [[virtual memory]], from an operating system perspective, but instead work in a fixed address space, which is mapped into a unified view of the program's address space, using an Active Page Register (APR). An APR can map the program's RAM in increments of 4K 16-bit words, to a maximum of 32K. In other words, an APR can map 8 segments of RAM, each limited to 4K. Because of this structure, an APR is able to map a maximum of 32K 16-bit words in RAM. In the case of RSTS/E, this usually means that a Runtime System, or RTS, maps to the upper portion of the address space and a user program resides in the lower portion of the address space. The RTS provides code to support access to the Operating System, on behalf of the user program; the RTS itself stores any of its non-static data in the address space of the user program, because the RTS is typically read-only. The operating system loads a single copy of the RTS and this is mapped to any user program that requires that RTS. The APR is set to map the RTS into the upper portion of the program's address space, in 4 KiB increments. So the BASIC Plus RTS (for the Basic+ Programming Language) typically maps 16 KiB to itself and the user program is mapped, in 4 KiB increments, in the lower 16 KiB. The RT11 RTS occupies 4 KiB, so a user program, like the RT11-based Peripheral Interchange Program (PIP), can expand to a maximum of 28 KiB.
The debugger allowed access to memory using [[octal]] addresses and data. Within the [[software system]]s, the debugger accessed the process's [[virtual memory]]. The firmware console implementation accessed [[physical memory]].
 
ODT can be used to "patch" binary modules, like an RTS, without requiring the re-compilation of the binary's source.
ODT is a non-symbolic debugger and implements similar functionality to [[Advanced Debugger|adb]] on [[Unix]] systems.
 
The firmware console implementation accesses [[physical memory]].
==Console ODT==
Console ODT<ref>p192-202 ''PDP-11 Processor Handbook: pdp11/04/24/34a/44/70'', Digital, 1981</ref> replaced the lights and switches console of many of the earlier processors.
Access to console ODT is obtained either from power up (with appropriate power up mode selected), by the execution of a HALT instruction in kernel mode, or by use of the front panel halt switch or button.
 
ODT is a non-symbolic debugger and implements similar functionality to [[Advanced Debugger]] (adb) on [[Unix]] systems.
=== Commands ===
Console ODT commands are as follows:
 
==Console ODT==
{| class="wikitable"
Console ODT<ref>p192-202 ''PDP-11 Processor Handbook: pdp11/04/24/34a/44/70'', Digital, 1981</ref> replaces the "lights and switches" console of many of the earlier processors.
|-
! Command
! Effect
|-
| / or a/
| Opens the current memory ___location or a if specified
|-
| <CR>
| Close currently open ___location or register
|-
| <LF>
| Close currently open ___location or register and open next
|-
| P
| Proceed, execute next instruction with no imlied reset If the halt switch is down this is allows for single steppinng
|-
| <addr>G
| Load PC with <addr>, reset and commence execution at address
|-
| Rn/ or $n/
| Open register n
|-
| RS/ or $S/
| Open PSW
|}
 
Access to console ODT is obtained either from power up (with appropriate power up mode selected), by the execution of a HALT instruction in kernel mode, or by use of the front panel halt switch or button.
If console ODT encounters a bus timeout it displays ?<CR><LF>
 
=== Example ===
@1000/ xxxxxx 112737<LF>
001002 xxxxxx 101<LF>
Line 51 ⟶ 24:
 
This deposits the program
<syntaxhighlight lang="nasm">
 
MOVB 'A', @#177566 ; Move 'A' into console transmit register
JMP @#1000 ; Jump back to start
</syntaxhighlight>
 
The deposit to the PC [Program Counter], sets the PC to the start of the program and the deposit to the PSW [Program Status Word] locks out interrupts.
 
The effect of this will be to write a stream of "A" to the console. As there is no check for transmitter ready, it is highly probable that a large number of garbage characters will be displayed.
Line 74 ⟶ 47:
The underscore is the standard ODT prompt.
 
It should be remembered that addressesAddresses in the ODT debugger are 16 -bit virtual addresses in the mode in which ODT is currently operating, not the physical addresses used with console ODT.
 
==OS/8 Octal Debugging Technique==
===Commands===
The [[PDP-8]]'s [[OS/8]] operating system's ODT command<ref>Reference manual DEC-D8-COCO-D, ODT-8, Dec. 1967 {{cite web
{| class="wikitable"
|url=http://www.bitsavers.org/www.computer.museum.uq.edu.au/pdf/DEC-D8-COCO-D%20ODT-8.pdf
|-
|title=DEC-D8-COCO-D ODT.pdf |website=BitSavers.org}}</ref> invokes its ''Octal Debugging Technique'' tool.
! Command
! Effect
|-
| .
| Current ___location indicator i.e. address of last ___location opened
|-
| <CR> or k<CR>
| Closes current ___location/register. If k is specified stores the value k in the currently open ___location before closing it.
|-
| <LF> or k<LF>
| Closes current ___location/register and opens next If k is specified stores the value k in the currently open ___location before closing it.
|-
|^ or k^
| Closes currently open ___location and opens immediately preceding. If k is specified stores the value k in the currently open ___location before closing it.
|-
| _ or k_
| Opens the ___location calculated by using the contents of the present ___location as a PC relative offset if k is specified deposits the value k in the present ___location before opening the new ___location
|-
| @ or k@
| As _ except using the contents of the current ___location as an absolute address
|-
| > or k>
| Treats the low order byte of the currently open ___location as a branch offset, calculates the destination address of the branch and opens that ___location. If k specified stores the value k in the currently open ___location before opening the new ___location
|-
| < or k<
| If the currently opened ___location was opened using the commands _ or > or @ closes the currently open ___location and reopens the ___location most recently opened using <lf>, ^, or /.
|-
| $n
|One of the eight general purpose processor registers
|-
|$x or $nx
|Represents the address of one of ODT's internal registers
{|
! Identifier
! Register
|-
| S
| PSW
|-
| W
| Directive status word for user task
|-
| A
| Search argument register
|-
| M
| Search mask register
|-
| L
| Low memory limit register
|-
| H
| High memory limit register
|-
| C
| Constant register
|-
| Q
| Quantity Register
|-
| F
| Format Register
|-
| X
| Reentry vector register
|-
| nB
| Breakpoint address registers
|-
| nG
| Breakpoint proceed count registers
|-
| nR
| Relocation registers
|-
| nV
| SST vector registers
|-
| nE
| SST stack contents registers
|-
| nD
| Device control (LUN registers)
|}
|-
| " or a"
| Word mode [[ASCII]] Displays contents of the ___location a or the currently open ___location as [[ASCII]] and stores the contents of this ___location to $Q register.
|-
| ' or a'
| Byte mode [[ASCII]]
|-
| % or a%
| [[DEC Radix-50|Radix50]] operator. Displays the contents of the ___location a or the currently open ___location as RADIX 50 and stores the contents of this ___location to $Q register.
|-
| / or a/
| Word mode octal operator. operator. Displays the contents of the ___location a or the currently open ___location as [[octal]] and stores the contents of this ___location to $Q register.
| \ or a\
| Byte mode octal operator. operator. Displays the contents of the ___location a or the currently open ___location as [[octal]] and stores the contents of this ___location to $Q register.
|-
| k=
| Evaluates the expression k, displays its value in octal and stores the result to $Q
|-
| B
| Removes all breakpoints from current task
|-
| nB
| Removes breakpoint n from current task
|-
| a;nB
| Sets breakpoint n at address a in user task
|-
| C
| Represents the contents of the $C register
|-
| D
| I/D systems only access D space
|-
| E or kE or m;E or m;kE
| Searches memory from $L (low memory limit register) to $H high memory limit register for references to the effective address specified by $A (search argument register) as masked by the value specified by $M (search mask register). If k is specified k replaces the contents of $A. If m is specified m replaces the contents of $M. References will match if they are an absolute match, a pc relative match or a branch displacement to $A.
|-
|F or kF
|Fills memory from $L to $H with the contents of $A. If k is specified k replaces the contents of $A before the command is executed.
|-
| G or aG
| Substitutes all breakpoints with BPT instructions. Restores user registers. If a is specified the PC is loaded with a, and begins executing user task.
|-
| I
| I and D systems only - access I space
|-
| P or kP
| Proceeds with program execution and stops when the end of the program or the next breakpoint is reached. If k is specified the program stops only after it has executed the next breakpoint k times.
|-
|S or nS
| Ececutes one instruction or n instructions if n specified.
|-
| U
| RSX-11M-Plus only accesses user mode memory
|-
| V
| Enables ODT handling of all SST vectors
|-
| X
| Exits user program and ODT and returns to the executive.
|-
| Z
| RSX-11M-Plus only accesses supervisor memory
|}
 
As with the subsequent PDP-11 ODT programs, it is non-symbolic, and it can examine or modify memory, and also set breakpoints.
== See also ==
 
* [[Dynamic debugging technique|Dynamic Debugging Technique]]
==See also ==
<!-- [[XDT]] -- Executive Debugging Technique -->
* [[Dynamic Debugging Technique]] (DDT)
* [[Executive Debugging Technique]] (XDT)<!-- link with possibilities -->
 
==References==
{{Reflist}}
 
{{Digital Equipment Corporation}}
 
[[Category:Debuggers]]
[[Category:DECDigital OperatingEquipment SystemsCorporation]]