Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:In debug config, reference the compiled sources; this allows stepping through the actual code in the debugger
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256:58bf02d1273e386086503360b95e1e56a26ce3732f16c517b2e3f6e09f5f905d
User & Date: ashepilko 2018-07-22 21:10:31
Context
2018-07-22
21:10
In debug config, reference the compiled sources; this allows stepping through the actual code in the debugger Leaf check-in: 58bf02d1 user: ashepilko tags: trunk
20:04
Set debug defines in CFLAGS when in debug config, so it applies project wide check-in: eb0f689d user: ashepilko tags: trunk
Changes

Changes to src/translate.c.

211
212
213
214
215
216
217







218
219
220
221
222
223
224
225
226

227
228
229
230
231
232
233
    char *arg;
    FILE *in = fopen(argv[1], "r");
    if( in==0 ){
      fprintf(stderr,"can not open %s\n", argv[1]);
      exit(1);
    }
    zInFile = argv[1];







    printf("#line 1 \"");
    for(arg=argv[1]; *arg; arg++){
      if( *arg!='\\' ){
        printf("%c", *arg);
      }else{
        printf("\\\\");
      }
    }
    printf("\"\n");

    trans(in, stdout);
    fclose(in);
  }else{
    trans(stdin, stdout);
  }
  return 0;
}







>
>
>
>
>
>
>









>







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
    char *arg;
    FILE *in = fopen(argv[1], "r");
    if( in==0 ){
      fprintf(stderr,"can not open %s\n", argv[1]);
      exit(1);
    }
    zInFile = argv[1];
#ifndef FOSSIL_DEBUG
    /* Set source line reference to the original source file.
     * This makes compiler show the original file name in the compile error
     * messages, instead of referring to the translated file.
     * NOTE: This somewhat complicates stepping in debugger, as the resuling
     * code would not match the referenced sources.
     */
    printf("#line 1 \"");
    for(arg=argv[1]; *arg; arg++){
      if( *arg!='\\' ){
        printf("%c", *arg);
      }else{
        printf("\\\\");
      }
    }
    printf("\"\n");
#endif
    trans(in, stdout);
    fclose(in);
  }else{
    trans(stdin, stdout);
  }
  return 0;
}