message.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* $Header$ */
  2. #define BUFLEN 24 /* size of buffer in message header */
  3. struct message_hdr {
  4. int m_type;
  5. /* Possible values of m_type: */
  6. #define DB_RUN 020000 /* set for commands that cause child to run */
  7. #define SETBP 0 /* set breakpoint at address in m_size */
  8. #define CLRBP 1 /* clear breakpoint at address in m_size */
  9. #define SETSS (2|DB_RUN) /* set single stepping, # of steps in m_size */
  10. #define SETSSF (3|DB_RUN) /* set single stepping, counting calls as one step */
  11. #define GETEMREGS 4 /* get EM registers, m_size contains level */
  12. #define GETBYTES 5 /* get data; m_size contains size, m_buf contains address */
  13. #define GETSTR 6 /* get string; m_buf contains address */
  14. #define SETBYTES 7 /* set data; m_buf contains address, m_size contains size */
  15. #define CALL 8 /* call function;
  16. m_size contains size of parameter buffer,
  17. m_buf contains address + size of function result
  18. */
  19. #define CONT (9|DB_RUN) /* continue */
  20. #define SETEMREGS 10 /* set EM registers, m_size contains level
  21. Actually, only the program counter is set.
  22. */
  23. #define DB_SS 040000 /* debugger wants single stepping (to be orred with
  24. SETSS(F) or CONT
  25. */
  26. #define CLRSS 12 /* clear single stepping */
  27. #define DUMP 13 /* dump command */
  28. #define DGLOB 14 /* data area */
  29. #define DSTACK 15 /* stack area */
  30. #define SETTRACE 16 /* start tracing; range in m_mes */
  31. #define CLRTRACE 17 /* end tracing */
  32. #define OK 50 /* answer of child to most messages */
  33. #define FAIL 51 /* answer of child when something goes wrong */
  34. #define DATA 52 /* answer of child when data requested */
  35. #define END_SS 53 /* when stopped because of user single stepping */
  36. long m_size; /* size */
  37. char m_buf[BUFLEN]; /* some of the data required included in message */
  38. };
  39. #define LB_OFF 0
  40. #define AB_OFF 1
  41. #define PC_OFF 2
  42. #define HP_OFF 3
  43. #define SP_OFF 4
  44. #define IN_FD 3
  45. #define OUT_FD 6