Example #1
0
static  bool    LblName( label_handle lbl, bool no_prefix )
/*********************************************************/
{
    if( !ValidLbl( lbl ) )
        return( false );
    if( no_prefix ) {
        if( lbl->lbl.sym == NULL ) {
            return( false );
        }
    } else {
        DumpChar( 'L' );
        DumpPtr( lbl );
        if( lbl->lbl.sym == NULL ) {
            return( true );
        }
    }
    DumpChar( '(' );
    if( AskIfRTLabel( lbl ) ) {
        DumpXString( AskRTName( SYM2RTIDX( lbl->lbl.sym ) ) );
    } else if( AskIfCommonLabel( lbl ) ) {
        DumpLiteral( "Common import => [" );
        DumpUInt( (unsigned)(pointer_int)lbl->lbl.sym );
        DumpLiteral( "] " );
    } else {
        DumpXString( FEName( lbl->lbl.sym ) );
    }
    DumpChar( ')' );
    return( true );
}
Example #2
0
static void DumpString(const TString* s, DumpState* D)
{
 if (s==NULL)
 {
  lu_int32 size=0;
  DumpUInt(size,D);
 }
 else
 {
  size_t size=s->tsv.len+1;		/* include trailing '\0' */
  if (size>0xFFFFFFFFUL)
    error(D,"string is too long");
  DumpUInt((lu_int32)size,D);
  DumpBlock(getstr(s),size*sizeof(char),D);
 }
}
Example #3
0
static void DumpFunction(const Proto* f, DumpState* D)
{
 int i;
 DumpInt(f->linedefined,D);
 DumpInt(f->lastlinedefined,D);
 DumpChar(f->numparams,D);
 DumpChar(f->is_vararg,D);
 DumpChar(f->maxstacksize,D);
 DumpInt(f->sizecode,D);
 for (i=0; i<f->sizecode; i++) DumpUInt(f->code[i],D);
 DumpConstants(f,D);
 DumpUpvalues(f,D);
 DumpDebug(f,D);
}