void ObjTracer::extract_str(const Object * const obj, ObjWriteMode flag) { if ( !check_obj ( obj ) ) { ALOG(LOG_VERBOSE, "YWB", "OBJECT NULL"); fprintf(traceFile_, "\n"); return; } else { StringObject * so = (StringObject *) obj; const u2 *s = so->chars(); if ( s == NULL ) { ALOG(LOG_VERBOSE, "YWB","string is null"); return; } this->record_str( obj, s, sizeof(u2) * so->length(), flag ); } }
void Tracer::extract_str (Object * obj, ObjWriteMode flag) { if ( !check_obj ( obj ) ) { FILE *f; ALOG(LOG_VERBOSE, "YWB", "OBJECT NULL"); if (flag == OPC_OBJ || flag == OPC_STR) f = fpObj_; else if (flag == FUNC_STR || flag == FUNC_OBJ) f = fpFuncs_; else { ALOG ( LOG_VERBOSE, "YWB", "error in which file to write" ); return; } fprintf(f, "\n"); fflush(f); return; } /* if ( strcmp (obj->clazz->descriptor, "Ljava/lang/String;") != 0) { ALOG(LOG_VERBOSE,"YWB","NOT STRING"); return; } */ { StringObject * so = (StringObject *) obj; const u2 *s = so->chars(); if ( s == NULL ) { ALOG(LOG_VERBOSE, "YWB","string is null"); return; } this->record_str( s, sizeof(u2) * so->length(), flag ); } }