Changeset 268


Ignore:
Timestamp:
Nov 10, 2007, 3:35:56 AM (18 years ago)
Author:
Brendan Oakley
Message:

Make debug buffer larger, and fix alsahlp line endings, from Allan

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/drv32/read.cpp

    r32 r268  
    1111int   wrOffset= 0;
    1212char  *szprintBuf= 0;
     13#ifdef DEBUG
     14int   max_buf_size= 0x100000;
     15#else
     16int   max_buf_size= 0x10000;
     17#endif
    1318
    1419void * __ioremap(unsigned long physaddr, unsigned long size, unsigned long flags);
     
    3338      if( rdOffset > wrOffset )
    3439      {
    35         diffCount= 0x10000 - rdOffset + wrOffset;
     40        diffCount= max_buf_size - rdOffset + wrOffset;
    3641      } else
    3742      {
     
    4247     
    4348      rp->Count= transferCount;
    44       if( (rdOffset + transferCount) > 0x10000 )
     49      if( (rdOffset + transferCount) > max_buf_size )
    4550      {
    46         diffCount= 0x10000 - rdOffset;
     51        diffCount= max_buf_size - rdOffset;
    4752        memcpy( lin, szprintBuf + rdOffset, diffCount );
    4853        transferCount= transferCount - diffCount;
  • GPL/trunk/lib32/debug.c

    r128 r268  
    3939extern int wrOffset;
    4040extern char *szprintBuf;
     41extern int max_buf_size;
    4142
    4243char hextab[]="0123456789ABCDEF";
     
    570571   if( szprintBuf == 0 )
    571572   {
    572       VMAlloc( 0x10000, VMDHA_FIXED, &szprintBuf );
     573      VMAlloc( max_buf_size, VMDHA_FIXED, &szprintBuf );
    573574      if( szprintBuf )
    574          memset( szprintBuf, 0, 0x10000 );
     575         memset( szprintBuf, 0, max_buf_size );
    575576      wrOffset= 0;
    576577   }
    577578   if( szprintBuf )
    578579   {
    579        if( (len + wrOffset) > 0x10000 )
     580       if( (len + wrOffset) > max_buf_size )
    580581       {
    581582          int cntr;
    582           cntr= 0x10000 - wrOffset;
     583          cntr= max_buf_size - wrOffset;
    583584          memcpy( szprintBuf +  wrOffset, DbgStr, cntr );
    584585          DbgStr+= cntr;
     
    590591          memcpy( szprintBuf + wrOffset, DbgStr, len );
    591592          wrOffset= wrOffset + len;
    592           if( wrOffset >= 0x10000 )
     593          if( wrOffset >= max_buf_size )
    593594              wrOffset= 0;
    594595       }
    595596       if (fLineTerminate)
    596597       {
    597 //           if( (wrOffset+1) >= 0x10000 )
     598//           if( (wrOffset+1) >= max_buf_size )
    598599//               wrOffset= 0;
    599600           szprintBuf[wrOffset]= CR;
    600            if( ++wrOffset >= 0x10000 )
     601           if( ++wrOffset >= max_buf_size )
     602               wrOffset= 0;
     603           szprintBuf[wrOffset]= LF;
     604           if( ++wrOffset >= max_buf_size )
    601605               wrOffset= 0;
    602606       }
Note: See TracChangeset for help on using the changeset viewer.