6
Preprocessor setting in TDP: -------------------------------------------------------------- --------------------- my $defines = ""; my $includes = ""; my $ret; print "\n 1) preprocessing \n"; foreach $D ( @$Defines ) { $defines .= " \"-D$D\"" ; } foreach $I ( @$Includes ) { $includes .= " \"-I$I\"" ; } my ($dirpath,$basename,$Ext) = SplitFileName($src); unlink($out); $ret=SystemP("cpp.exe –E $cflags \"$src\" $defines $includes"); if (! -f $out) { rename("$basename.i", "$out"); } print"\nsrc=$src \n cflag=$cflags \n define=$defines \n out=$out \n include=$includes\n basename=$basename.i \n"; print"\n 2) preprocessing done\n"; return($ret); o/p window

RTRT Setting for Instrumentation

Embed Size (px)

DESCRIPTION

djihdd

Citation preview

Page 1: RTRT Setting for Instrumentation

Preprocessor setting in TDP:-----------------------------------------------------------------------------------

my $defines = "";my $includes = "";my $ret;print "\n 1) preprocessing \n";

foreach $D ( @$Defines ) {$defines .= " \"-D$D\"" ;

}foreach $I ( @$Includes ) {

$includes .= " \"-I$I\"" ;}

my ($dirpath,$basename,$Ext) = SplitFileName($src);unlink($out);

$ret=SystemP("cpp.exe –E $cflags \"$src\" $defines $includes");

if (! -f $out) {rename("$basename.i", "$out"); }

print"\nsrc=$src \n cflag=$cflags \n define=$defines \n out=$out \n include=$includes\n basename=$basename.i \n";

print"\n 2) preprocessing done\n";return($ret);

o/p window

Page 2: RTRT Setting for Instrumentation

If we change$ret=SystemP("cpp.exe –E $cflags \"$src\" $defines $includes"); $ret=SystemP("cpp.exe –E $cflags $src $defines $includes");

Means removed quotation from $src theno/p in message window are----------------------------------------------

try.c: Preprocessing... 1) preprocessing Turbo C++ Preprocessor Version 3.00 Copyright (c) 1992 Borland Internationalc:\try.c:

Available memory 4127840

src=c:\try.c cflag= define= out=cvisual6_TC_my\try.i include= basename=try.i

2) preprocessing donetry.c: Instrumenting...TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,31]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,31]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,31]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,32]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,32]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,32]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,33]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,33]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,33]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,34]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,4......same warning message

Page 3: RTRT Setting for Instrumentation

.

.

.

TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,2]TestRT attolcc1 - WARNING: Lexical input ignored \ [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,1]

TestRT attolcc1 - ERROR: syntax error near : [C:\DOCUMENTS AND SETTINGS\SACHIN\DESKTOP\TESTRT4TC\TRY17JULY\CVISUAL6_TC_MY\TRY.I,1]

Failed.

---------------------------------------------------------------------------------

And If we open the try.i file then its content is

c:\try.c 1: C:\TC\INCLUDE\stdio.h 1: C:\TC\INCLUDE\stdio.h 2: C:\TC\INCLUDE\stdio.h 3: C:\TC\INCLUDE\stdio.h 4: C:\TC\INCLUDE\stdio.h 5: C:\TC\INCLUDE\stdio.h 6: C:\TC\INCLUDE\stdio.h 7: C:\TC\INCLUDE\stdio.h 8: C:\TC\INCLUDE\stdio.h 9: C:\TC\INCLUDE\stdio.h 10: C:\TC\INCLUDE\stdio.h 11: C:\TC\INCLUDE\stdio.h 12: C:\TC\INCLUDE\stdio.h 13:

.

.

.

.C:\TC\INCLUDE\_null.h 12: C:\TC\INCLUDE\_null.h 13: C:\TC\INCLUDE\_null.h 14: C:\TC\INCLUDE\_null.h 15: C:\TC\INCLUDE\_null.h 16: C:\TC\INCLUDE\_null.h 17: C:\TC\INCLUDE\stdio.h 18: C:\TC\INCLUDE\stdio.h 19: C:\TC\INCLUDE\stdio.h 20: C:\TC\INCLUDE\stdio.h 21: C:\TC\INCLUDE\stdio.h 22: typedef unsigned size_t;

Page 4: RTRT Setting for Instrumentation

C:\TC\INCLUDE\stdio.h 23: C:\TC\INCLUDE\stdio.h 24: C:\TC\INCLUDE\stdio.h 25: C:\TC\INCLUDE\stdio.h 26: C:\TC\INCLUDE\stdio.h 27: typedef long fpos_t;C:\TC\INCLUDE\stdio.h 28: C:\TC\INCLUDE\stdio.h 29: C:\TC\INCLUDE\stdio.h 30: C:\TC\INCLUDE\stdio.h 31:...C:\TC\INCLUDE\stdio.h 196: int cdecl fcloseall(void);C:\TC\INCLUDE\stdio.h 197: FILE *cdecl fdopen(int __handle, char *__type);C:\TC\INCLUDE\stdio.h 198: int cdecl fgetchar(void);C:\TC\INCLUDE\stdio.h 199: int cdecl flushall(void);C:\TC\INCLUDE\stdio.h 200: int cdecl fputchar(int __c);C:\TC\INCLUDE\stdio.h 201: FILE * cdecl _fsopen (const char *__path, const char *__mode,C:\TC\INCLUDE\stdio.h 202: int __shflag);C:\TC\INCLUDE\stdio.h 203: int cdecl getw(FILE *__stream);C:\TC\INCLUDE\stdio.h 204: int cdecl putw(int __w, FILE *__stream);C:\TC\INCLUDE\stdio.h 205: int cdecl rmtmp(void);C:\TC\INCLUDE\stdio.h 206: char * cdecl _strerror(const char *__s);C:\TC\INCLUDE\stdio.h 207: char * cdecl tempnam(char *__dir, char *__pfx);C:\TC\INCLUDE\stdio.h 208: C:\TC\INCLUDE\stdio.h 209: C:\TC\INCLUDE\stdio.h 210: C:\TC\INCLUDE\stdio.h 211: C:\TC\INCLUDE\stdio.h 212: int cdecl _fgetc(FILE *__stream); C:\TC\INCLUDE\stdio.h 213: int cdecl _fputc(char __c, FILE *__stream); C:\TC\INCLUDE\stdio.h 214: C:\TC\INCLUDE\stdio.h 215: C:\TC\INCLUDE\stdio.h 216: C:\TC\INCLUDE\stdio.h 217: C:\TC\INCLUDE\stdio.h 218: C:\TC\INCLUDE\stdio.h 219: C:\TC\INCLUDE\stdio.h 220: C:\TC\INCLUDE\stdio.h 221: C:\TC\INCLUDE\stdio.h 222: C:\TC\INCLUDE\stdio.h 223: C:\TC\INCLUDE\stdio.h 224: C:\TC\INCLUDE\stdio.h 225: C:\TC\INCLUDE\stdio.h 226: C:\TC\INCLUDE\stdio.h 227: C:\TC\INCLUDE\stdio.h 228: C:\TC\INCLUDE\stdio.h 229: C:\TC\INCLUDE\stdio.h 230: C:\TC\INCLUDE\stdio.h 231: C:\TC\INCLUDE\stdio.h 232: C:\TC\INCLUDE\stdio.h 233: C:\TC\INCLUDE\stdio.h 234: C:\TC\INCLUDE\stdio.h 235: C:\TC\INCLUDE\stdio.h 236: C:\TC\INCLUDE\stdio.h 237: C:\TC\INCLUDE\stdio.h 238:

Page 5: RTRT Setting for Instrumentation

C:\TC\INCLUDE\stdio.h 239: C:\TC\INCLUDE\stdio.h 240: c:\try.c 2: c:\try.c 3: void main()c:\try.c 4: {c:\try.c 5: printf("enter two number\n");c:\try.c 6: }c:\try.c 7: c:\try.c 8: c:\try.c 9: c:\try.c 10: