RFC 909 (rfc909) - Page 1 of 128


Loader Debugger Protocol



Alternative Format: Original Text Document



Loader Debugger Protocol



                                  RFC-909










                            Christopher Welles

                      BBN Communications Corporation


                              Walter Milliken

                             BBN Laboratories




                                 July 1984

Status of This Memo

   This RFC specifies a proposed protocol for the ARPA Internet
   community, and requests discussion and suggestions for
   improvements.  Distribution of this memo is unlimited.









                             Table of Contents





     1   Introduction.......................................... 1
     1.1   Purpose of This Document............................ 1
     1.2   Summary of Features................................. 2

     2   General Description................................... 3
     2.1   Motivation.......................................... 3
     2.2   Relation to Other Protocols......................... 4
     2.2.1   Transport Service Requirements.................... 5

     3   Protocol Operation.................................... 9
     3.1   Overview............................................ 9
     3.2   Session Management.................................. 9
     3.3   Command Sequencing................................. 10
     3.4   Data Packing and Transmission...................... 10
     3.5   Implementations.................................... 12

     4   Commands and Formats................................. 15
     4.1   Packet Format...................................... 15
     4.2   Command Format..................................... 16
     4.2.1   Command Header................................... 16
     4.3   Addressing......................................... 19
     4.3.1   Long Address Format.............................. 20
     4.3.2   Short Address Format............................. 25

     5   Protocol Commands.................................... 29
     5.1   HELLO Command...................................... 29
     5.2   HELLO_REPLY........................................ 29
     5.3   SYNCH Command...................................... 33
     5.4   SYNCH_REPLY........................................ 34
     5.5   ABORT Command...................................... 35
     5.6   ABORT_DONE Reply................................... 35
     5.7   ERROR Reply........................................ 36
     5.8   ERRACK Acknowledgement............................. 39

     6   Data Transfer Commands............................... 41
     6.1   WRITE Command...................................... 42
     6.2   READ Command....................................... 43
     6.3   READ_DATA Response................................. 45
     6.4   READ_DONE Reply.................................... 47
     6.5   MOVE Command....................................... 48
     6.6   MOVE_DATA Response................................. 50



                                                                Page i







     6.7   MOVE_DONE Reply.................................... 52
     6.8   REPEAT_DATA........................................ 53
     6.9   WRITE_MASK Command (Optional)...................... 54

     7   Control Commands..................................... 59
     7.1   START Command...................................... 59
     7.2   STOP Command....................................... 61
     7.3   CONTINUE Command................................... 62
     7.4   STEP Command....................................... 62
     7.5   REPORT Command..................................... 63
     7.6   STATUS Reply....................................... 64
     7.7   EXCEPTION Trap..................................... 66

     8   Management Commands.................................. 69
     8.1   CREATE Command..................................... 69
     8.2   CREATE_DONE Reply.................................. 74
     8.3   DELETE Command..................................... 75
     8.4   DELETE_DONE Reply.................................. 76
     8.5   LIST_ADDRESSES Command............................. 76
     8.6   ADDRESS_LIST Reply................................. 77
     8.7   LIST_BREAKPOINTS Command........................... 79
     8.8   BREAKPOINT_LIST Reply.............................. 80
     8.9   LIST_PROCESSES Command............................. 82
     8.10   PROCESS_LIST Reply................................ 83
     8.11   LIST_NAMES Command................................ 84
     8.12   NAME_LIST Reply................................... 85
     8.13   GET_PHYS_ADDR Command............................. 87
     8.14   GOT_PHYS_ADDR Reply............................... 88
     8.15   GET_OBJECT Command................................ 90
     8.16   GOT_OBJECT Reply.................................. 91

     9   Breakpoints and Watchpoints.......................... 93
     9.1   BREAKPOINT_DATA Command............................ 95

     10   Conditional Commands................................ 99
     10.1   Condition Command Format......................... 100
     10.2   COUNT Conditions................................. 101
     10.3   CHANGED Condition................................ 102
     10.4   COMPARE Condition................................ 103
     10.5   TEST Condition................................... 105

     11   Breakpoint Commands................................ 109
     11.1   INCREMENT Command................................ 109
     11.2   INC_COUNT Command................................ 110
     11.3   OR Command....................................... 111
     11.4   SET_PTR Command.................................. 112
     11.5   SET_STATE Command................................ 113



     Page ii







     A   Diagram Conventions................................. 115

     B   Command Summary..................................... 117

     C   Commands, Responses and Replies..................... 121

     D   Glossary............................................ 123











































                                                              Page iii







                                  FIGURES




     1  Relation to Other Protocols............................ 4
     2  Form of Data Exchange Between Layers................... 6
     3  Packing of 16-bit Words............................... 11
     4  Packing of 20-bit Words............................... 12
     5  Network Packet Format................................. 15
     6  LDP Command Header Format............................. 16
     7  Command Classes....................................... 17
     8  Command Types......................................... 18
     9  Long Address Format................................... 20
     10  Long Address Modes................................... 21
     11  Short Address Format................................. 26
     12  Short Address Modes.................................. 27
     13  HELLO Command Format................................. 29
     14  HELLO_REPLY Format................................... 30
     15  System Types......................................... 31
     16  Target Address Codes................................. 31
     17  Feature Levels....................................... 32
     18  Options.............................................. 33
     19  SYNCH Command Format................................. 33
     20  SYNCH_REPLY Format................................... 34
     21  ABORT Command Format................................. 35
     22  ABORT_DONE Reply Format.............................. 36
     23  ERROR Reply Format................................... 37
     24  ERROR Codes.......................................... 38
     25  ERRACK Command Format................................ 40
     26  WRITE Command Format................................. 42
     27  READ Command Format.................................. 44
     28  DATA Response Format................................. 46
     29  READ_DONE Reply Format............................... 47
     30  MOVE Command Format.................................. 49
     31  MOVE_DATA Response Format............................ 51
     32  MOVE_DONE Reply Format............................... 52
     33  REPEAT_DATA Command Format........................... 54
     34  WRITE_MASK Format.................................... 56
     35  START Command Format................................. 60
     36  STOP Command Format.................................. 61
     37  CONTINUE Command Format.............................. 62
     38  STEP Command Format.................................. 63
     39  REPORT Command Format................................ 64
     40  STATUS Reply Format.................................. 65
     41  EXCEPTION Format..................................... 66
     42  CREATE Command Format................................ 70



     Page iv







     43  Create Types......................................... 71
     44  CREATE BREAKPOINT Format............................. 71
     45  CREATE MEMORY_OBJECT Format.......................... 73
     46  CREATE_DONE Reply Format............................. 74
     47  DELETE Command Format................................ 75
     48  DELETE_DONE Reply Format............................. 76
     49  LIST_ADDRESSES Command Format........................ 77
     50  ADDRESS_LIST Reply Format............................ 78
     51  LIST_BREAKPOINTS Command Format...................... 80
     52  BREAKPOINT_LIST Reply Format......................... 81
     53  LIST_PROCESSES Command Format........................ 82
     54  PROCESS_LIST Reply Format............................ 84
     55  LIST_NAMES Command Format............................ 85
     56  NAME_LIST Reply Format............................... 86
     57  GET_PHYS_ADDR Command Format......................... 88
     58  GOT_PHYS_ADDR Reply Format........................... 89
     59  GET_OBJECT Command Format............................ 90
     60  GOT_OBJECT Reply Format.............................. 91
     61  Commands to Manipulate Breakpoints................... 93
     62  Breakpoint Conditional Command Lists................. 95
     63  BREAKPOINT_DATA Command Format....................... 96
     64  Breakpoint Data Stream Format........................ 97
     65  Conditional Command Summary.......................... 99
     66  Condition Command Header............................ 101
     67  COUNT Condition Format.............................. 101
     68  CHANGED Condition................................... 102
     69  COMPARE Condition................................... 104
     70  TEST Condition...................................... 106
     71  Breakpoint Command Summary.......................... 109
     72  INCREMENT Command Format............................ 110
     73  INC_COUNT Command Format............................ 111
     74  OR Command Format................................... 111
     75  SET_PTR Command Format.............................. 112
     76  SET_STATE Command Format............................ 113
     77  Sample Diagram...................................... 115
     78  Command Summary..................................... 118
     79  Commands, Responses and Replies..................... 122













                                                                Page v







                                 CHAPTER 1


                               Introduction



          The Loader-Debugger Protocol (LDP) is an  application  layer
     protocol   for  loading, dumping  and  debugging  target machines
     from hosts in a network environment.  This protocol  is  designed
     to  accommodate a variety  of  target  cpu  types.  It provides a
     powerful set of debugging services.  At  the  same  time,  it  is
     structured  so  that  a  simple  subset  may  be  implemented  in
     applications like boot  loading   where efficiency and space  are
     at a premium.


          The authors would like  to  thank  Dan  Franklin  and  Peter
     Cudhea  for providing many of the ideas on which this protocol is
     based.




     1.1  Purpose of This Document

          This is a technical specification for the LDP protocol.   It
     is intended to be comprehensive enough to be used by implementors
     of the  protocol.   It  contains  detailed  descriptions  of  the
     formats  and usage of over forty commands.  Readers interested in
     an overview of LDP should read the Summary  of  Features,  below,
     and  skim  Sections  2  through  3.1.   Also  see Appendix B, the
     Command Summary.  The remainder of the document reads  best  when
     accompanied by strong coffee or tea.