Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — UMIPS/BSD System Programmer's Package 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

rmtdbg − description of remote debugging protocol The remote debugging protocol is spoken by the UMIPS-BSD debuggers the standalone debugging monitor and the R2000 architecture simulator to implement symbolic debugging of standalone programs.  The remote debugging protocol is layered on top of the serial line protocol and relies upon the serial line protocol for reliable, sequenced transmission, see The protocol transports "requests" from pdbx or sdbx to dbgmon or sable and also transports "replies" from dbgmon or sable back to pdbx or sdbx.  All packets are ascii encoded and made up of 4 blank separated fields.  Request packets have the following general format:
PIDREQUESTADDRDATA
0x%x%c0x%x0x%x
The use of these fields follows closely the equivalent fields in the system call.  Use of the fields are: PID For sdbx/sable this field is the UNIX process id of the sable simulator, for pdbx/dbgmon this field is zero.  Sable verifies that the pid in the request matches its pid when processing requests. REQUEST This is a single ascii character that encodes the type of request being made. ADDR An address where the request is to be applied. DATA For write requests, the data to be stored; ignored for other requests. Reply packets have this general format:
PIDREQUESTERRFLGRESPONSE
0x%x%c0x%x0x%x
All replies have the PID and REQUEST field identical to the corresponding request packet.  In general, ERRFLG is 0 if the request could be completed successfully and the RESPONSE field is request dependent (see the request descriptions below).  If ERRFLG is -1, the request could not be satisfied, and the reason for failure is indicated in the RESPONSE field as a UNIX errno (see The following REQUEST characters are recognized: i Read 32 bit word from instruction space at ADDR.  ADDR must be word aligned. Read data is returned in the RESPONSE field of the reply packet. On R2000, equivalent to ’d’ request. d Read 32 bit word from data space at ADDR.  ADDR must be word aligned. Read data is returned in the RESPONSE field of the reply packet. On R2000, equivalent to ’i’ request. I Write 32 bit word DATA to instruction space address ADDR.  ADDR must be word aligned. Reply returns previous contents of ADDR in RESPONSE field. On R2000, equivalent to ’D’ request. D Write 32 bit word DATA to data space address ADDR.  ADDR must be word aligned. Reply returns previous contents of ADDR in RESPONSE field. On R2000, equivalent to ’I’ request. r Read register indicated by ADDR field.  Registers are identified by register numbers in the UNIX include file Register contents is returned in the RESPONSE field of the reply packet. R Write register indicated by ADDR field with value in DATA field. Too many files are concurrently open. bad filename: %s A filename was specified that was not of the format:
device(controller,unit,partition)path dropped char Input from a character device had to be dropped due to buffer overflow.  Input must be read faster by program or sent slower by source.  intro(5spp), filesys(4spp) is passed to the ioctl unaltered from the value given on the user ioctl request; it’s interpretation is a funre identified by register numbers in the UNIX include file Previous register contents is returned in the RESPONSE field of the reply packet.  c Continue execution of the process being debugged.  If the ADDR field of the request packet is 1, continue execution at the current pc of the process being debugged; otherwise, set the pc of the process being debugged to the contents of the ADDR field of the request packet.  Execution continues until the process being debugged takes an exception.  The exception may be a breakpoint or any other R2000 detected exception.  No reply packet is sent until the exception occurs.  The reply packet sent after the exception has the ERRFLG field set to zero and the RESPONSE field set to the value that like that of a UNIX system call, indicating a UNIX signal appropriate to the exception and an exit status of WSTOPPED.  R2000 exceptions are mapped to the following UNIX signals:

interruptSIGINT
TLB modSIGSEGV
TLB read missSIGSEGV
TLB write missSIGSEGV
user TLB missSIGSEGV
read address errorSIGBUS
write address errorSIGBUS
instruction bus errorSIGBUS
data bus errorSIGBUS
syscall trapSIGILL
illegal instructionSIGILL
coprocessor unusableSIGILL
overflowSIGFPE
breakpointSIGTRAP

s Execute one instruction of the process being debugged.  If the ADDR field of the request packet is 1, execute the instruction at the current pc of the process being debugged; otherwise, set the pc of the process being debugged to the contents of the ADDR field of the request packet.  A single instruction is executed by placing a breakpoint instruction after the single instruction to be executed.  Branches and the instruction in the branch delay slot are considered "atomic" and in this case a single step exec

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026