void AddDataMethod( id_type access_type, TypeInfo *typ, List *varlist ) { /************************************************************************/ unsigned varcnt; VarInfo *info; if( inSubPgm ) { return; } assert( varlist ); assert( typ ); SRU.curr.vars.varlist = varlist; copyTypeInfo( &(SRU.curr.vars.type), typ ); SRU.curr.vars.access_id = access_type; SRU.curr.vars.typ_id = isTypeKnown( &SRU.curr.vars.type ); if( !SRU.curr.vars.typ_id ) { SRU.curr.vars.fake = TRUE; // NYI - put out a good error msg varcnt = GetListCount( SRU.curr.vars.varlist ); for( ; varcnt > 0; varcnt-- ) { info = GetListItem( SRU.curr.vars.varlist, varcnt - 1 ); Warning( UNKNOWN_DATA_TYPE, info->name, typ->name ); } } else { SRU.curr.vars.fake = FALSE; } SRU.curr_typ = SRU_VARIABLE; }
void SetFunction( TypeInfo *ret, char *fname ) { /***********************************************/ if( inSubPgm ) { return; } assert( fname ); assert( ret ); copyTypeInfo( &( SRU.curr.sp.ret_type ), ret ); SRU.curr.sp.name = MemStrDup( fname ); SRU.curr.sp.typ = ST_FUNCTION; SRU.curr_typ = SRU_SUBPROG; SRU.curr.sp.typ_id = isTypeKnown( ret ); /* we must first set sp info */ if( !SRU.curr.sp.typ_id ) { /* issue warning if unknown type is found and set fake bit */ /* only issue a warning for forward definitions so we don't issue * the same warning twice */ if( SRU.sections->data.sec.primary == ST_FORWARD ) { Warning( UNKNOWN_TYPE, ret->name, fname ); } SRU.curr.sp.fake = TRUE; } }
QString WatchData::toString() const { const char *doubleQuoteComma = "\","; QString res; QTextStream str(&res); str << QLatin1Char('{'); if (!iname.isEmpty()) str << "iname=\"" << iname << doubleQuoteComma; str << "sortId=\"" << sortId << doubleQuoteComma; if (!name.isEmpty() && name != iname) str << "name=\"" << name << doubleQuoteComma; if (error) str << "error,"; if (address) { str.setIntegerBase(16); str << "addr=\"0x" << address << doubleQuoteComma; str.setIntegerBase(10); } if (referencingAddress) { str.setIntegerBase(16); str << "referencingaddr=\"0x" << referencingAddress << doubleQuoteComma; str.setIntegerBase(10); } if (!exp.isEmpty()) str << "exp=\"" << exp << doubleQuoteComma; if (!variable.isEmpty()) str << "variable=\"" << variable << doubleQuoteComma; if (isValueNeeded()) str << "value=<needed>,"; if (isValueKnown() && !value.isEmpty()) str << "value=\"" << value << doubleQuoteComma; if (!editvalue.isEmpty()) str << "editvalue=\"<...>\","; // str << "editvalue=\"" << editvalue << doubleQuoteComma; if (!dumperFlags.isEmpty()) str << "dumperFlags=\"" << dumperFlags << doubleQuoteComma; if (isTypeNeeded()) str << "type=<needed>,"; if (isTypeKnown() && !type.isEmpty()) str << "type=\"" << type << doubleQuoteComma; if (isHasChildrenNeeded()) str << "hasChildren=<needed>,"; if (isHasChildrenKnown()) str << "hasChildren=\"" << (hasChildren ? "true" : "false") << doubleQuoteComma; if (isChildrenNeeded()) str << "children=<needed>,"; str.flush(); if (res.endsWith(QLatin1Char(','))) res.truncate(res.size() - 1); return res + QLatin1Char('}'); }
void AddParm( TypeInfo *typ, char *tname, ArrayInfo *array ) { /*************************************************************/ /* add parameter to current function's list */ var_rec *ptmp; if( inSubPgm ) { return; } assert( tname ); assert( typ ); ptmp = MemMalloc( sizeof( var_rec ) ); memset( ptmp, 0, sizeof( var_rec ) ); if( SRU.curr.sp.last_parm ) { SRU.curr.sp.last_parm->next = ptmp; } else { SRU.curr.sp.parm_list = ptmp; } SRU.curr.sp.last_parm = ptmp; copyTypeInfo( &ptmp->type, typ ); ptmp->typ_id = isTypeKnown( typ ); if( !ptmp->typ_id ) { ptmp->fake = TRUE; } ptmp->next = NULL; ptmp->name = MemStrDup( tname ); if( array == NULL ) { ptmp->array = NULL; } else { ptmp->array = MemMalloc( sizeof( ArrayInfo ) ); memcpy( ptmp->array, array, sizeof( ArrayInfo ) ); } }