Tech-invite3GPPspaceIETFspace
959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 0909

Loader Debugger Protocol

Pages: 135
Experimental
Part 4 of 4 – Pages 100 to 135
First   Prev   None

ToP   noToC   RFC0909 - Page 100   prevText
     o   the condition list is evaluated in sequence  until  either  a
         TRUE  and_list  is found (condition list <- TRUE), or the end
         of the condition list is reached (condition list  <-  FALSE).
         An and_list is TRUE if all its conditions are TRUE.

     The distillation of these rules into BNF is:

         <condition_list> :== <and_list>  [OR <and_list>]*
         <and_list>       :== <condition> [AND <condition>]*
         <condition>      :== CHANGED | COMPARE | COUNT | TEST

         where:  OR  is a breakpoint command
                 AND is implicit for any pair of consecutive conditions

     For example, the following condition list, with one  command  per
     line,

         COUNT_EQ 1
         OR
         COUNT_GT 10
         COUNT_LT 20

     evaluates to:

         (COUNT = 1) OR (COUNT > 10  AND COUNT < 20)

     and will cause the command list that follows it to be executed if
     the counter is equal to one, or is between 10 and 20.




     10.1  Condition Command Format

          Condition  commands  start  with  the  standard   four-octet
     command  header.   The high-order bit of the command type byte is
     used as a negate flag:  if this bit is set, the boolean value  of
     the  condition  is  negated.   This flag applies to one condition
     only, and not to other conditions in the condition list.
ToP   noToC   RFC0909 - Page 101
                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |        Command Length         |
                 +---------------+---------------+
               1 | CONDITION     |N|    Type     |
                 +---------------+---------------+


                         Condition Command Header
                                 Figure 66






     10.2  COUNT Conditions

          The COUNT conditions (COUNT_EQ, COUNT_GT and  COUNT_LT)  are
     used to compare the breakpoint counter to a specified value.  The
     counter is set to zero when the breakpoint  is  STARTed,  and  is
     incremented  by  the INC_COUNT breakpoint command.  The format is
     the same for the COUNT_EQ, COUNT_GT and COUNT_LT conditions.


                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |               8               |
                 +---------------+---------------+
               1 | CONDITION     |N|  Type       |
                 +---------------+---------------+
               2 |                               |
                 +--          Value            --+
               3 |                               |
                 +---------------+---------------+


                          COUNT Condition Format
                                 Figure 67


     COUNT_* Condition FIELDS:
ToP   noToC   RFC0909 - Page 102
     Type

          One of COUNT_EQ, COUNT_LT and COUNT_GT.   The  condition  is
          TRUE  if  the  breakpoint  counter  is  [EQ  |  LT | GT] the
          specified value.

     Value

          A 32-bit value to be compared to the counter.





     10.3  CHANGED Condition

          The CHANGED  condition  is  TRUE  if  the  contents  of  the
     specified   location  have  changed  since  the  last  time  this
     breakpoint occurred.  Only one location may be specified  as  the
     object   of  CHANGED  conditions  per  breakpoint.   The  CHANGED
     condition is always FALSE the first time the breakpoint occurs.


                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |              14               |
                 +---------------+---------------+
               1 | CONDITION     |N|  CHANGED    |
                 +---------------+---------------+
               2 |                               |
                 +--                           --+
               3 |            Address            |
                 +--                           --+
               4 |                               |
                 +--                           --+
               5 |                               |
                 +--                           --+
               6 |                               |
                 +---------------+---------------+


                             CHANGED Condition
                                 Figure 68
ToP   noToC   RFC0909 - Page 103
     CHANGED FIELDS:

     Address

          The full 5-word address of the location to be tested by  the
          CHANGED command.




     10.4  COMPARE Condition

          The COMPARE condition compares two locations using  a  mask.
     The condition is TRUE if (<loc1> & <mask>) = (<loc2> & <mask>).
ToP   noToC   RFC0909 - Page 104
                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |              28               |
                 +---------------+---------------+
               1 | CONDITION     |N|  COMPARE    |
                 +---------------+---------------+
               2 |                               |
                 +--                           --+
               3 |            Address 1          |
                 +--                           --+
               4 |                               |
                 +--                           --+
               5 |                               |
                 +--                           --+
               6 |                               |
                 +---------------+---------------+
               7 |                               |
                 +--          Mask             --+
               8 |                               |
                 +-------------------------------+
               9 |                               |
                 +--                           --+
               10|            Address 2          |
                 +--                           --+
               11|                               |
                 +--                           --+
               12|                               |
                 +--                           --+
               13|                               |
                 +-------------------------------+

                             COMPARE Condition
                                 Figure 69
ToP   noToC   RFC0909 - Page 105
     COMPARE FIELDS:

     Address 1
     Address 2

          The 5-word addresses of the locations to be compared.

     Mask

          A 32-bit mask specifying which bits in the locations  should
          be compared.






     10.5  TEST Condition

          The TEST condition is used to compare a location to a value,
     using  a  mask.   The  condition  is  TRUE  if (<loc> & <mask>) =
     <value>.
ToP   noToC   RFC0909 - Page 106
                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |              22               |
                 +---------------+---------------+
               1 | CONDITION     |N|  TEST       |
                 +---------------+---------------+
               2 |                               |
                 +--                           --+
               3 |            Address            |
                 +--                           --+
               4 |                               |
                 +--                           --+
               5 |                               |
                 +--                           --+
               6 |                               |
                 +---------------+---------------+
               7 |                               |
                 +--          Mask             --+
               8 |                               |
                 +-------------------------------+
               9 |                               |
                 +--          Value            --+
               10|                               |
                 +-------------------------------+

                              TEST Condition
                                 Figure 70


     TEST FIELDS:

     Address

          The 5-word address of the location to  be  compared  to  the
          value.

     Mask

          A 32-bit mask specifying which bits in the  location  should
          be compared.

     Value

          A 32-bit value to compare to the masked location.
ToP   noToC   RFC0909 - Page 107
                                CHAPTER 11


                            Breakpoint Commands



          Breakpoint commands are used to set the value of  breakpoint
     variables.   These commands are only valid within breakpoints and
     watchpoints.  They are sent from the host to the target  as  data
     in  BREAKPOINT_DATA  commands.   Figure  71 contains a summary of
     breakpoint commands:


      Command                  Description
     ------------------------+-------------------------------------

     INCREMENT <location>      Increment the specified location
     INC_COUNT                 Increment the breakpoint counter
     OR                        OR two breakpoint condition lists
     SET_PTR <n> <location>    Set pointer <n> to the contents of
                               <location>
     SET_STATE <n>             Set the breakpoint state variable
                               to <n>


                        Breakpoint Command Summary
                                 Figure 71






     11.1  INCREMENT Command

          The INCREMENT command increments the contents of a specified
     location.  The location may be in any address space writable from
     LDP.
ToP   noToC   RFC0909 - Page 108
                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |               14              |
                 +---------------+---------------+
               1 | BREAKPOINT    |  INCREMENT    |
                 +---------------+---------------+
               2 |                               |
                 +--                           --+
               3 |            Address            |
                 +--                           --+
               4 |                               |
                 +--                           --+
               5 |                               |
                 +--                           --+
               6 |                               |
                 +---------------+---------------+


                         INCREMENT Command Format
                                 Figure 72


     INCREMENT FIELDS:

     Address

          The full address of the location whose contents  are  to  be
          incremented.




     11.2  INC_COUNT Command

          The INC_COUNT command  increments  the  breakpoint  counter.
     There  is  one  counter  variable  for  each   breakpoint.  It is
     initialized to zero when the breakpoint is created,  when  it  is
     armed  with  the START command, and whenever the breakpoint state
     changes.  The counter is tested by the COUNT_* conditions.
ToP   noToC   RFC0909 - Page 109
                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |               4               |
                 +---------------+---------------+
               1 | BREAKPOINT    |  INC_COUNT    |
                 +---------------+---------------+


                         INC_COUNT Command Format
                                 Figure 73






     11.3  OR Command

          The OR command delineates  two  and_lists  in  a  breakpoint
     condition  list.   A  condition  list  is  TRUE  if any of the OR
     separated and_lists in it are TRUE.  A breakpoint condition  list
     may  contain  zero,  one  or,  many  OR commands.  See 'Condition
     Commands' for an explanation of condition lists.



                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |               4               |
                 +---------------+---------------+
               1 | BREAKPOINT    |      OR       |
                 +---------------+---------------+


                             OR Command Format
                                 Figure 74
ToP   noToC   RFC0909 - Page 110
     11.4  SET_PTR Command

          The SET_PTR command loads the specified  breakpoint  pointer
     with  the  contents of a location.  The pointer variables and the
     SET_PTR command are intended to provide a primitive but unlimited
     indirect    addressing   capability.    Two   addressing   modes,
     BPT_PTR_OFFSET and BPT_PTR_INDIRECT, are used for referencing the
     breakpoint  pointers.   For example, to follow a linked list, use
     SET_PTR to load a pointer with the start of the  list,  then  use
     successive  SET_PTR  commands with addressing mode BPT_PTR_OFFSET
     to get successive elements.



                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |               16              |
                 +---------------+---------------+
               1 | BREAKPOINT    |  SET_PTR      |
                 +---------------+---------------+
               2 |            Pointer            |
                 +---------------+---------------+
               3 |                               |
                 +--                           --+
               4 |            Address            |
                 +--                           --+
               5 |                               |
                 +--                           --+
               6 |                               |
                 +--                           --+
               7 |                               |
                 +---------------+---------------+


                          SET_PTR Command Format
                                 Figure 75


     SET_PTR FIELDS:

     Pointer

          The pointer to be changed.  Allowable values are 0 and 1.

     Address
ToP   noToC   RFC0909 - Page 111
          The full address of the location whose contents  are  to  be
          loaded into the given pointer variable.





     11.5  SET_STATE Command

          The SET_STATE command sets the breakpoint state variable  to
     the  specified  value.   This  is  the  only method of changing a
     breakpoint's state from within  a  breakpoint.  The  breakpoint's
     state  may  be  also be changed by a START command from the host.
     The state variable is initialized to zero when the breakpoint  is
     created.


                  0             0 0   1         1
                  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                 +---------------+---------------+
               0 |               6               |
                 +---------------+---------------+
               1 | BREAKPOINT    |  SET_STATE    |
                 +---------------+---------------+
               2 |         State Value           |
                 +-------------------------------+


                         SET_STATE Command Format
                                 Figure 76


     SET_STATE FIELDS:

     State Value

          The new value for the breakpoint state variable.   Must  not
          be  greater  than  the  maximum state value specified in the
          CREATE BREAKPOINT command that created this breakpoint.
ToP   noToC   RFC0909 - Page 112
                                APPENDIX A


                            Diagram Conventions



          Command and message diagrams are used in  this  document  to
     illustrate  the  format  of these entities.   Words are listed in
     order of transmission down the page.   The  first  word  is  word
     zero.   Bits within a word run left to right, most significant to
     least.   However,   following  a  convention  observed  in  other
     protocol  documents,  bits are numbered in order of transmission;
     the most significant bit in a word is transmitted first.  The bit
     labelled '0' is the most significant bit.



                       0             0 0   1         1
                       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
                      +---------------+---------------+
                    0 |M|                           |L|
                      +---------------+---------------+
                    1 | Most Sig Octet| Least S. Octet|
                      +---------------+---------------+

                      M = most significant bit in word zero,
                          transmitted first
                      L = least significant bit in word zero,
                          transmitted last


                              Sample Diagram
                                 Figure 77
ToP   noToC   RFC0909 - Page 113
                                APPENDIX B


                              Command Summary



          The following table lists all non-breakpoint LDP commands in
     alphabetical order, with a brief description of each.
ToP   noToC   RFC0909 - Page 114
                            Sender
     Command            | Host Target | Function
     -------------------+-------------+---------------------------

     ABORT                 X            Abort outstanding commands
     ABORT_DONE                  X      Acknowledge ABORT
     ADDRESS_LIST                X      Return valid address ranges
     BREAKPOINT_DATA       X            Send breakpoint commands
     BREAKPOINT_LIST             X      Return list of breakpoints
     CONTINUE              X            Resume execution
     CREATE                X            Create target object
     CREATE_DONE                 X      Acknowledge CREATE
     DELETE                X            Delete target object
     DELETE_DONE                 X      Acknowledge DELETE
     EXCEPTION                   X      Report target exception
     ERROR                       X      Report error with a host command
     ERRACK                X            Acknowledge ERROR
     GET_OBJECT            X            Get object descriptor from name
     GET_PHYS_ADDRESS      X            Get address in physical form
     GOT_OBJECT                  X      Return object descriptor
     GOT_PHYS_ADDRESS            X      Return physical address
     HELLO                 X            Initiate LDP session
     HELLO_REPLY                 X      Return LDP parameters
     LIST_ADDRESSES        X            Request valid address ranges
     LIST_BREAKPOINTS      X            Request breakpoint list
     LIST_NAMES            X            Request name list
     LIST_PROCESSES        X            Request process list
     MOVE                  X            Read data from target
     MOVE_DONE                   X      Acknowledge MOVE completion
     MOVE_DATA                   X      Send data request by MOVE
     NAME_LIST                   X      Return name list
     PROCESS_LIST                X      Return process list
     READ                  X            Read data from target
     READ_DATA                   X      Return data requested by READ
     READ_DONE                   X      Acknowledge READ completion
     REPEAT_DATA           X            Write copies of data
     REPORT                X            Request status of object
     START                 X            Start target object
     STATUS                      X      Return status of object
     STEP                  X            Step execution of target object
     STOP                  X            Stop target object
     SYNCH                 X            Check sequence number
     SYNCH_REPLY                 X      Confirm sequence number
     WRITE                 X            Write data
     WRITE_MASK            X            Write data with mask
ToP   noToC   RFC0909 - Page 115
                              Command Summary
                                 Figure 78
ToP   noToC   RFC0909 - Page 116
                                APPENDIX C


                      Commands, Responses and Replies



          The following table shows the relationship between commands,
     responses  and  replies.   Commands are sent from the host to the
     target.  Some commands elicit responses and/or replies  from  the
     target.   Responses  and  replies are sent from the target to the
     host.  The distinction between them is that the target sends only
     one  reply  to  a  command,  but  may  send  multiple  responses.
     Responses always contain data, whereas replies may or may not.
ToP   noToC   RFC0909 - Page 117
          Command            | Response     | Reply
          -------------------+--------------+------------------

          ABORT                               ABORT_DONE
          BREAKPOINT_DATA
          CONTINUE
          CREATE                              CREATE_DONE
          DELETE                              DELETE_DONE
          GET_OBJECT                          GOT_OBJECT
          GET_PHYS_ADDRESS                    GOT_PHYS_ADDRESS
          HELLO                               HELLO_REPLY
          LIST_ADDRESSES                      ADDRESS_LIST
          LIST_BREAKPOINTS                    BREAKPOINT_LIST
          LIST_NAMES                          NAME_LIST
          LIST_PROCESSES                      PROCESS_LIST
          MOVE               MOVE_DATA        MOVE_DONE
          READ               READ_DATA        READ_DONE
          REPEAT_DATA
          REPORT                              STATUS
          START
          STEP
          STOP
          SYNCH                               SYNCH_REPLY
          WRITE
          WRITE_MASK


                      Commands, Responses and Replies
                                 Figure 79
ToP   noToC   RFC0909 - Page 118
                                APPENDIX D


                                 Glossary




     FSM

          Finite  state  machine.   Commands  of  each  breakpoint  or
          watchpoint   are  implemented  as  part  of  a  finite state
          machine.  A list of breakpoint commands is  associated  with
          each state.  There are several breakpoint commands to change
          from one state to another.
     host

          The 'host' in an LDP session is the  timesharing  system  on
          which the user process runs.


     long

          A long is a 32-bit quantity.

     octet

          An octet is an eight-bit quantity.

     RDP

          The  Reliable  Data  Protocol  (RDP) is  a  transport  layer
          protocol designed as a low-overhead alternative to TCP.  RDP
          is a connection oriented protocol  that  provides  reliable,
          sequenced message delivery.

     server process

          The LDP server process is the passive participant in an  LDP
          session.   The  server  process  usually resides on a target
          machine such as a PAD, PSN or gateway.  The  server  process
          waits for a user process to initiate a session, and responds
          to commands from the user  process.   In  response  to  user
          commands, the server may perform services on the target like
          reading and writing memory locations or setting breakpoints.
          'Server'  is  sometimes  employed as a shorthand for 'server
          process'.
ToP   noToC   RFC0909 - Page 119
     target

          The 'target' in an LDP session is the PSN,  PAD  or  gateway
          that  is  being  loaded,  dumped  or  debugged  by the host.
          Normally, LDP will be implemented in the target as a  server
          process.     However,   in   some   targets   with   strange
          requirements, notably the Butterfly, the target LDP may be a
          user process.


     user process

          The LDP user process is the active  participant  in  an  LDP
          session.   The  user  process  initiates  and terminates the
          session and sends commands  to  the  server  process   which
          control  the session.  The user process usually resides on a
          timesharing host and is  driven  by  a  higher-level  entity
          (e.g., an application program like an interactive debugger).
          'User' is  sometimes  employed  as  a  shorthand  for  'user
          process'.


     word

          A word is a sixteen-bit quantity.
ToP   noToC   RFC0909 - Page 120
                                   INDEX





     ABORT command............................................ 35
     ABORT_DONE reply......................................... 36
     address.............................................. 60, 66
     address descriptor....................................... 20
     address format................................... 19, 25, 31
     address ID............................................... 22
     address mode......................................... 20, 22
     address mode argument.................................... 21
     address offset........................................... 20
     addressing............................................... 19
     ADDRESS_LIST reply................................... 76, 77
     BASIC_DEBUGGER....................................... 12, 32
     breakpoint... 9, 13, 57, 60, 71, 79, 92, 93, 95, 96, 99, 107
     breakpoint commands.......................... 9, 94, 95, 107
     breakpoint counter........................ 94, 100, 101, 110
     breakpoint data...................................... 97, 99
     breakpoint state variable........................... 94, 107
     breakpoint variables..................................... 94
     BREAKPOINT_DATA command..................... 73, 94, 95, 107
     BREAKPOINT_LIST reply................................ 79, 80
     CHANGED condition....................................... 102
     command class............................................ 16
     command length field..................................... 16
     COMPARE Condition....................................... 103
     condition command header................................ 101
     conditional commands................................. 94, 99
     CONTINUE command......................................... 62
     control commands...................................... 9, 57
     COUNT condition.................................... 110, 111
     COUNT_EQ condition...................................... 101
     COUNT_GT condition...................................... 101
     COUNT_LT condition...................................... 101
     CREATE command............................... 69, 70, 73, 75
     create types............................................. 70
     CREATE_DONE reply.................................... 73, 75
     data octets...................................... 43, 47, 52
     data packing............................................. 10
     data transfer commands................................ 9, 41
     data transmission........................................ 10
     datagrams................................................. 5
     debugging.............................................. 1, 3
ToP   noToC   RFC0909 - Page 121
     default breakpoint................................... 71, 92
     DELETE command....................................... 73, 75
     DELETE_DONE reply........................................ 75
     descriptor........... 20, 57, 61, 62, 63, 64, 65, 73, 75, 93
     dumping................................................... 3
     ERRACK............................................... 10, 39
     ERROR codes.............................................. 38
     ERROR reply.......................................... 37, 67
     EXCEPTION trap........................................... 66
     finite state machine................................. 60, 93
     FSM breakpoint................................... 71, 92, 94
     FULL-DEBUGGER............................................ 12
     FULL_DEBUGGER............................................ 32
     gateway................................................ 3, 9
     GET_OBJECT command................................... 89, 91
     GET_PHYS_ADDR command................................ 87, 88
     GOT_OBJECT reply..................................... 89, 91
     GOT_PHYS_ADDR reply.................................. 87, 88
     HELLO command......................................... 9, 29
     HELLO_REPLY....................................... 9, 19, 30
     host descriptor.......................................... 41
     implementation....................................... 12, 31
     INC_COUNT command......................... 94, 107, 110, 111
     INCREMENT command....................................... 109
     internet.................................................. 5
     internet protocols........................................ 4
     IP........................................................ 5
     LDP command formats...................................... 15
     LDP header........................................... 15, 16
     LDP Version.............................................. 30
     LIST commands............................................ 73
     LIST_ADDRESSES command............................... 76, 77
     LIST_BREAKPOINTS command............................. 79, 80
     LIST_NAMES command................................... 84, 85
     LIST_PROCESSES command................................... 82
     LOADER_DUMPER........................................ 12, 32
     loading................................................ 1, 3
     long address format...................................... 20
     management commands...................................... 67
     memory object............................................ 73
     MOVE command................................. 22, 41, 47, 49
     MOVE sequence number..................................... 52
     MOVE_DATA response................................... 22, 51
     MOVE_DONE reply.......................................... 52
     NAME_LIST reply...................................... 84, 85
     offset............................................... 20, 22
     OR command.............................................. 111
ToP   noToC   RFC0909 - Page 122
     PAD.................................................... 3, 9
     pattern.................................................. 54
     PHYS_ADDRESS............................................. 57
     PHYS_MACRO............................................... 60
     PROCESS.................................................. 57
     PROCESS_CODE............................................. 60
     PROCESS_LIST reply....................................... 82
     protocol commands......................................... 9
     PSN.................................................... 3, 9
     RDP................................................... 5, 15
     READ command..................................... 41, 43, 44
     READ sequence number..................................... 47
     READ_DATA response................................... 45, 46
     READ_DONE reply.......................................... 47
     repeat count............................................. 54
     REPEAT_DATA command.................................. 41, 53
     REPORT command................................... 63, 64, 94
     sequence number...................................... 10, 39
     session................................................... 9
     SET_PTR command................................ 94, 111, 112
     SET_STATE command.............................. 94, 107, 113
     short address format..................................... 25
     START command........................................ 59, 60
     STATUS reply..................................... 64, 65, 94
     STEP command......................................... 62, 63
     STOP command......................................... 60, 61
     SYNCH.................................................... 10
     SYNCH command............................................ 33
     SYNCH_REPLY.............................................. 34
     system type.............................................. 30
     target start address......................... 43, 44, 46, 54
     transport................................................. 9
     watchpoint.......... 13, 57, 60, 71, 92, 93, 95, 96, 99, 107
     WRITE command........................................ 41, 42
     WRITE_MASK command....................................... 56