This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RDI log facility now interprets C Library packets


I have added support for "C Support Library" calls to the log facility
(contributed by Grant some time ago).

Note that I had to get the channel number from the packet header as the
C Library packets do not encode it with the reason.  This was causing
them to be printed as CI_PRIVATE.

It should show up in the next snapshot.  The patch is attached in case
someone wants to try it.


-- 
Fernando Nasser
Cygnus Solutions - Toronto Office       E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299




Index: devsw.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/rdi-share/devsw.c,v
retrieving revision 1.5
diff -c -r1.5 devsw.c
*** devsw.c     1999/11/02 11:28:53     1.5
--- devsw.c     2000/01/04 22:32:20
***************
*** 17,22 ****
--- 17,23 ----
  #include <string.h>
  
  #include "adp.h"
+ #include "sys.h"
  #include "hsys.h"
  #include "rxtx.h"
  #include "drivers.h"
***************
*** 107,112 ****
--- 108,114 ----
  {
    unsigned r;
    int i;
+   unsigned char channel;
    
    if (!fp)
      return;
***************
*** 116,127 ****
      fprintf(fp,"%02x ",p->data[i]);
    fprintf(fp,"\n");
  
    r = WordAt(p->data+4);
    
    fprintf(fp,"R=%08x ",r);
    fprintf(fp,"%s ", r&0x80000000 ? "H<-T" : "H->T");
  
!   switch ((r>>16) & 0xff)
      {
       case CI_PRIVATE: fprintf(fp,"CI_PRIVATE: "); break;
       case CI_HADP: fprintf(fp,"CI_HADP: "); break;
--- 118,131 ----
      fprintf(fp,"%02x ",p->data[i]);
    fprintf(fp,"\n");
  
+   channel = p->data[0];
+ 
    r = WordAt(p->data+4);
    
    fprintf(fp,"R=%08x ",r);
    fprintf(fp,"%s ", r&0x80000000 ? "H<-T" : "H->T");
  
!   switch (channel)
      {
       case CI_PRIVATE: fprintf(fp,"CI_PRIVATE: "); break;
       case CI_HADP: fprintf(fp,"CI_HADP: "); break;
***************
*** 176,181 ****
--- 180,207 ----
       case ADP_Stopped: fprintf(fp," ADP_Stopped "); break;
       case ADP_TDCC_ToHost: fprintf(fp," ADP_TDCC_ToHost "); break;
       case ADP_TDCC_FromHost: fprintf(fp," ADP_TDCC_FromHost "); break;
+ 
+      case CL_Unrecognised: fprintf(fp," CL_Unrecognised "); break;
+      case CL_WriteC: fprintf(fp," CL_WriteC "); break;
+      case CL_Write0: fprintf(fp," CL_Write0 "); break;
+      case CL_ReadC: fprintf(fp," CL_ReadC "); break;
+      case CL_System: fprintf(fp," CL_System "); break;
+      case CL_GetCmdLine: fprintf(fp," CL_GetCmdLine "); break;
+      case CL_Clock: fprintf(fp," CL_Clock "); break;
+      case CL_Time: fprintf(fp," CL_Time "); break;
+      case CL_Remove: fprintf(fp," CL_Remove "); break;
+      case CL_Rename: fprintf(fp," CL_Rename "); break;
+      case CL_Open: fprintf(fp," CL_Open "); break;
+      case CL_Close: fprintf(fp," CL_Close "); break;
+      case CL_Write: fprintf(fp," CL_Write "); break;
+      case CL_WriteX: fprintf(fp," CL_WriteX "); break;
+      case CL_Read: fprintf(fp," CL_Read "); break;
+      case CL_ReadX: fprintf(fp," CL_ReadX "); break;
+      case CL_Seek: fprintf(fp," CL_Seek "); break;
+      case CL_Flen: fprintf(fp," CL_Flen "); break;
+      case CL_IsTTY: fprintf(fp," CL_IsTTY "); break;
+      case CL_TmpNam: fprintf(fp," CL_TmpNam "); break;
+ 
       default: fprintf(fp," BadReason "); break;
      }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]