@@ -1,2 +1,2 | |||
|
1 | 1 | 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters |
|
2 | 042275d1388a0f360073a0d85bf50d128f4b8cfc header/lfr_common_headers | |
|
2 | 7053a75ef0a55a40e950a8302065856f3bd06a26 header/lfr_common_headers |
@@ -24,14 +24,17 args = parser.parse_args() | |||
|
24 | 24 | |
|
25 | 25 | def main(): |
|
26 | 26 | with open(args.gcov_file,'r') as gcov: |
|
27 | files = [] | |
|
27 | 28 | for line in gcov.readlines(): |
|
28 | 29 | head,dest_file,data = line.split(',') |
|
29 | if head == '_GCOV_': | |
|
30 |
|
|
|
31 | with open(dest_file,'wb') as gcda_file: | |
|
32 | gcda_file.write(bytes([int(''.join(value),16) for value in zip(data[::2],data[1::2]) ])) | |
|
33 | else: | |
|
34 | raise | |
|
30 | if dest_file not in files: | |
|
31 | files.append(dest_file) | |
|
32 | if head == '_GCOV_': | |
|
33 | print(f"Writing {dest_file}\n") | |
|
34 | with open(dest_file,'wb') as gcda_file: | |
|
35 | gcda_file.write(bytes([int(''.join(value),16) for value in zip(data[::2],data[1::2]) ])) | |
|
36 | else: | |
|
37 | raise | |
|
35 | 38 | |
|
36 | 39 | |
|
37 | 40 | if __name__ == "__main__": |
@@ -66,7 +66,6 static void gcov_write_block (unsigned); | |||
|
66 | 66 | static gcov_unsigned_t *gcov_write_words (unsigned); |
|
67 | 67 | GCOV_LINKAGE int gcov_send (void); |
|
68 | 68 | GCOV_LINKAGE int gcov_close(void); |
|
69 | //static const gcov_unsigned_t *gcov_read_words (unsigned); | |
|
70 | 69 | |
|
71 | 70 | extern struct gcov_info * gcov_list; |
|
72 | 71 | extern gcov_unsigned_t gcov_crc32; |
@@ -176,42 +175,13 void gcov_exit (void) | |||
|
176 | 175 | /* Now merge each file. */ |
|
177 | 176 | for (gi_ptr = gcov_list; gi_ptr; gi_ptr = gi_ptr->next) |
|
178 | 177 | { |
|
179 | // struct gcov_summary this_object, object; | |
|
180 | // struct gcov_ctr_summary *cs_obj, *cs_tobj, *cs_prg, *cs_tprg, *cs_all; | |
|
181 | // int error = 0; | |
|
182 | // gcov_unsigned_t tag, length; | |
|
183 | // gcov_position_t summary_pos = 0; | |
|
178 | ||
|
184 | 179 | struct gcov_summary program; |
|
185 | 180 | gcov_type *values[GCOV_COUNTERS]; |
|
186 | 181 | const struct gcov_fn_info *fi_ptr; |
|
187 | 182 | unsigned fi_stride; |
|
188 | 183 | unsigned c_ix, f_ix, n_counts; |
|
189 | 184 | |
|
190 | #if 0 | |
|
191 | memset (&this_object, 0, sizeof (this_object)); | |
|
192 | memset (&object, 0, sizeof (object)); | |
|
193 | ||
|
194 | ||
|
195 | /* Totals for this object file. */ | |
|
196 | ci_ptr = gi_ptr->counts; | |
|
197 | for (t_ix = 0; t_ix < GCOV_COUNTERS_SUMMABLE; t_ix++) | |
|
198 | { | |
|
199 | if (!((1 << t_ix) & gi_ptr->ctr_mask)) | |
|
200 | continue; | |
|
201 | ||
|
202 | cs_ptr = &this_object.ctrs[t_ix]; | |
|
203 | cs_ptr->num += ci_ptr->num; | |
|
204 | for (c_num = 0; c_num < ci_ptr->num; c_num++) | |
|
205 | { | |
|
206 | cs_ptr->sum_all += ci_ptr->values[c_num]; | |
|
207 | if (cs_ptr->run_max < ci_ptr->values[c_num]) | |
|
208 | cs_ptr->run_max = ci_ptr->values[c_num]; | |
|
209 | } | |
|
210 | ||
|
211 | ci_ptr++; | |
|
212 | } | |
|
213 | #endif | |
|
214 | ||
|
215 | 185 | c_ix = 0; |
|
216 | 186 | for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++) |
|
217 | 187 | if ((1 << t_ix) & gi_ptr->ctr_mask) |
@@ -235,169 +205,6 void gcov_exit (void) | |||
|
235 | 205 | continue; |
|
236 | 206 | } |
|
237 | 207 | |
|
238 | #if 0 | |
|
239 | tag = gcov_read_unsigned (); | |
|
240 | if (tag) | |
|
241 | { | |
|
242 | /* Merge data from file. */ | |
|
243 | if (tag != GCOV_DATA_MAGIC) | |
|
244 | { | |
|
245 | fprintf (stderr, "profiling:%s:Not a gcov data file\n", | |
|
246 | gi_ptr->filename); | |
|
247 | read_fatal:; | |
|
248 | gcov_close (); | |
|
249 | continue; | |
|
250 | } | |
|
251 | length = gcov_read_unsigned (); | |
|
252 | if (!gcov_version (gi_ptr, length)) | |
|
253 | goto read_fatal; | |
|
254 | ||
|
255 | length = gcov_read_unsigned (); | |
|
256 | if (length != gi_ptr->stamp) | |
|
257 | { | |
|
258 | /* Read from a different compilation. Overwrite the | |
|
259 | file. */ | |
|
260 | gcov_truncate (); | |
|
261 | goto rewrite; | |
|
262 | } | |
|
263 | ||
|
264 | /* Merge execution counts for each function. */ | |
|
265 | for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++) | |
|
266 | { | |
|
267 | fi_ptr = (const struct gcov_fn_info *) | |
|
268 | ((const char *) gi_ptr->functions + f_ix * fi_stride); | |
|
269 | tag = gcov_read_unsigned (); | |
|
270 | length = gcov_read_unsigned (); | |
|
271 | ||
|
272 | /* Check function. */ | |
|
273 | if (tag != GCOV_TAG_FUNCTION | |
|
274 | || length != GCOV_TAG_FUNCTION_LENGTH | |
|
275 | || gcov_read_unsigned () != fi_ptr->ident | |
|
276 | || gcov_read_unsigned () != fi_ptr->checksum) | |
|
277 | { | |
|
278 | read_mismatch:; | |
|
279 | fprintf (stderr, "profiling:%s:Merge mismatch for %s\n", | |
|
280 | gi_ptr->filename, | |
|
281 | f_ix + 1 ? "function" : "summaries"); | |
|
282 | goto read_fatal; | |
|
283 | } | |
|
284 | ||
|
285 | c_ix = 0; | |
|
286 | for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++) | |
|
287 | { | |
|
288 | gcov_merge_fn merge; | |
|
289 | ||
|
290 | if (!((1 << t_ix) & gi_ptr->ctr_mask)) | |
|
291 | continue; | |
|
292 | ||
|
293 | n_counts = fi_ptr->n_ctrs[c_ix]; | |
|
294 | merge = gi_ptr->counts[c_ix].merge; | |
|
295 | ||
|
296 | tag = gcov_read_unsigned (); | |
|
297 | length = gcov_read_unsigned (); | |
|
298 | if (tag != GCOV_TAG_FOR_COUNTER (t_ix) | |
|
299 | || length != GCOV_TAG_COUNTER_LENGTH (n_counts)) | |
|
300 | goto read_mismatch; | |
|
301 | (*merge) (values[c_ix], n_counts); | |
|
302 | values[c_ix] += n_counts; | |
|
303 | c_ix++; | |
|
304 | } | |
|
305 | if ((error = gcov_is_error ())) | |
|
306 | goto read_error; | |
|
307 | } | |
|
308 | ||
|
309 | f_ix = ~0u; | |
|
310 | /* Check program & object summary */ | |
|
311 | while (1) | |
|
312 | { | |
|
313 | gcov_position_t base = gcov_position (); | |
|
314 | int is_program; | |
|
315 | ||
|
316 | tag = gcov_read_unsigned (); | |
|
317 | if (!tag) | |
|
318 | break; | |
|
319 | length = gcov_read_unsigned (); | |
|
320 | is_program = tag == GCOV_TAG_PROGRAM_SUMMARY; | |
|
321 | if (length != GCOV_TAG_SUMMARY_LENGTH | |
|
322 | || (!is_program && tag != GCOV_TAG_OBJECT_SUMMARY)) | |
|
323 | goto read_mismatch; | |
|
324 | gcov_read_summary (is_program ? &program : &object); | |
|
325 | if ((error = gcov_is_error ())) | |
|
326 | goto read_error; | |
|
327 | if (is_program && program.checksum == gcov_crc32) | |
|
328 | { | |
|
329 | summary_pos = base; | |
|
330 | goto rewrite; | |
|
331 | } | |
|
332 | } | |
|
333 | } | |
|
334 | ||
|
335 | if (!gcov_is_eof ()) | |
|
336 | { | |
|
337 | read_error:; | |
|
338 | fprintf (stderr, error < 0 ? "profiling:%s:Overflow merging\n" | |
|
339 | : "profiling:%s:Error merging\n", gi_ptr->filename); | |
|
340 | goto read_fatal; | |
|
341 | } | |
|
342 | rewrite:; | |
|
343 | gcov_rewrite (); | |
|
344 | if (!summary_pos) | |
|
345 | memset (&program, 0, sizeof (program)); | |
|
346 | /* Merge the summaries. */ | |
|
347 | f_ix = ~0u; | |
|
348 | for (t_ix = 0; t_ix < GCOV_COUNTERS_SUMMABLE; t_ix++) | |
|
349 | { | |
|
350 | cs_obj = &object.ctrs[t_ix]; | |
|
351 | cs_tobj = &this_object.ctrs[t_ix]; | |
|
352 | cs_prg = &program.ctrs[t_ix]; | |
|
353 | cs_tprg = &this_program.ctrs[t_ix]; | |
|
354 | cs_all = &all.ctrs[t_ix]; | |
|
355 | ||
|
356 | if ((1 << t_ix) & gi_ptr->ctr_mask) | |
|
357 | { | |
|
358 | if (!cs_obj->runs++) | |
|
359 | cs_obj->num = cs_tobj->num; | |
|
360 | else if (cs_obj->num != cs_tobj->num) | |
|
361 | goto read_mismatch; | |
|
362 | cs_obj->sum_all += cs_tobj->sum_all; | |
|
363 | if (cs_obj->run_max < cs_tobj->run_max) | |
|
364 | cs_obj->run_max = cs_tobj->run_max; | |
|
365 | cs_obj->sum_max += cs_tobj->run_max; | |
|
366 | ||
|
367 | if (!cs_prg->runs++) | |
|
368 | cs_prg->num = cs_tprg->num; | |
|
369 | else if (cs_prg->num != cs_tprg->num) | |
|
370 | goto read_mismatch; | |
|
371 | cs_prg->sum_all += cs_tprg->sum_all; | |
|
372 | if (cs_prg->run_max < cs_tprg->run_max) | |
|
373 | cs_prg->run_max = cs_tprg->run_max; | |
|
374 | cs_prg->sum_max += cs_tprg->run_max; | |
|
375 | } | |
|
376 | else if (cs_obj->num || cs_prg->num) | |
|
377 | goto read_mismatch; | |
|
378 | ||
|
379 | if (!cs_all->runs && cs_prg->runs) | |
|
380 | memcpy (cs_all, cs_prg, sizeof (*cs_all)); | |
|
381 | else if (!all.checksum | |
|
382 | && (!GCOV_LOCKED || cs_all->runs == cs_prg->runs) | |
|
383 | && memcmp (cs_all, cs_prg, sizeof (*cs_all))) | |
|
384 | { | |
|
385 | fprintf (stderr, "profiling:%s:Invocation mismatch - some data files may have been removed%s", | |
|
386 | gi_ptr->filename, GCOV_LOCKED | |
|
387 | ? "" : " or concurrent update without locking support"); | |
|
388 | all.checksum = ~0u; | |
|
389 | } | |
|
390 | } | |
|
391 | ||
|
392 | c_ix = 0; | |
|
393 | for (t_ix = 0; t_ix < GCOV_COUNTERS; t_ix++) | |
|
394 | if ((1 << t_ix) & gi_ptr->ctr_mask) | |
|
395 | { | |
|
396 | values[c_ix] = gi_ptr->counts[c_ix].values; | |
|
397 | c_ix++; | |
|
398 | } | |
|
399 | ||
|
400 | #endif | |
|
401 | 208 | program.checksum = gcov_crc32; |
|
402 | 209 | |
|
403 | 210 | /* Write out the data. */ |
@@ -436,19 +243,9 rewrite:; | |||
|
436 | 243 | } |
|
437 | 244 | } |
|
438 | 245 | |
|
439 | /* Object file summary. */ | |
|
440 | // gcov_write_summary (GCOV_TAG_OBJECT_SUMMARY, &object); | |
|
441 | ||
|
442 | /* Generate whole program statistics. */ | |
|
443 | // gcov_seek (summary_pos); | |
|
444 | // gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, &program); | |
|
445 | 246 | gcov_send(); |
|
446 | 247 | gcov_close(); |
|
447 | /* if ((error = gcov_send ())) | |
|
448 | fprintf (stderr, error < 0 ? | |
|
449 | "profiling:%s:Overflow writing\n" : | |
|
450 | "profiling:%s:Error writing\n", | |
|
451 | gi_ptr->filename);*/ | |
|
248 | ||
|
452 | 249 | } |
|
453 | 250 | |
|
454 | 251 | printf("_GCOVEXIT_END_,core%d\n", coreId); |
@@ -525,7 +322,6 GCOV_LINKAGE int gcov_send (void) | |||
|
525 | 322 | |
|
526 | 323 | GCOV_LINKAGE int gcov_close(void) |
|
527 | 324 | { |
|
528 | /*printf("%s: %s\n", __func__, gcov_var.filename);*/ | |
|
529 | 325 | memset(gcov_var.filename, 0, strlen(gcov_var.filename)); |
|
530 | 326 | |
|
531 | 327 | // Clear the start variable because will be tested in the gcov_open |
@@ -536,23 +332,6 GCOV_LINKAGE int gcov_close(void) | |||
|
536 | 332 | return gcov_var.error; |
|
537 | 333 | } |
|
538 | 334 | |
|
539 | /* Write out the | |
|
540 | current block, if needs be. */ | |
|
541 | /*static void gcov_write_block (unsigned size) { | |
|
542 | unsigned int bw = 0; | |
|
543 | unsigned int i; | |
|
544 | ||
|
545 | printf("_GCOV_,%s,", gcov_var.filename); | |
|
546 | for(i = 0; i < size << 2; i++) { | |
|
547 | char str[5] = {0}; | |
|
548 | ||
|
549 | printf("%02X", ((unsigned char*)(gcov_var.buffer))[i]); | |
|
550 | } | |
|
551 | printf("\n"); | |
|
552 | ||
|
553 | gcov_var.start += size; | |
|
554 | gcov_var.offset -= size; | |
|
555 | }*/ | |
|
556 | 335 | |
|
557 | 336 | static void gcov_write_block (unsigned size) { |
|
558 | 337 | unsigned char *buffer = (unsigned char*) gcov_var.buffer; |
@@ -621,8 +400,6 gcov_write_counter (gcov_type value) | |||
|
621 | 400 | else |
|
622 | 401 | buffer[1] = 0; |
|
623 | 402 | |
|
624 | // if (value < 0) | |
|
625 | // gcov_var.error = -1; | |
|
626 | 403 | } |
|
627 | 404 | |
|
628 | 405 | /* Write a tag TAG and length LENGTH. */ |
@@ -657,120 +434,11 gcov_write_summary (gcov_unsigned_t tag, | |||
|
657 | 434 | } |
|
658 | 435 | } |
|
659 | 436 | |
|
660 | /* Return a pointer to read BYTES bytes from the gcov file. Returns | |
|
661 | NULL on failure (read past EOF). */ | |
|
662 | #if 0 | |
|
663 | GCOV_LINKAGE const gcov_unsigned_t * | |
|
664 | gcov_read_words (unsigned words) | |
|
665 | { | |
|
666 | const gcov_unsigned_t *result; | |
|
667 | unsigned excess = gcov_var.length - gcov_var.offset; | |
|
668 | ||
|
669 | GCOV_CHECK_READING (); | |
|
670 | if (excess < words) | |
|
671 | { | |
|
672 | gcov_var.start += gcov_var.offset; | |
|
673 | if (excess) | |
|
674 | { | |
|
675 | GCOV_CHECK (excess == 1); | |
|
676 | memcpy (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, 4); | |
|
677 | } | |
|
678 | gcov_var.offset = 0; | |
|
679 | gcov_var.length = excess; | |
|
680 | GCOV_CHECK (!gcov_var.length || gcov_var.length == 1); | |
|
681 | excess = GCOV_BLOCK_SIZE; | |
|
682 | excess = fread (gcov_var.buffer + gcov_var.length, | |
|
683 | 1, excess << 2, gcov_var.file) >> 2; | |
|
684 | gcov_var.length += excess; | |
|
685 | if (gcov_var.length < words) | |
|
686 | { | |
|
687 | gcov_var.overread += words - gcov_var.length; | |
|
688 | gcov_var.length = 0; | |
|
689 | return 0; | |
|
690 | } | |
|
691 | } | |
|
692 | result = &gcov_var.buffer[gcov_var.offset]; | |
|
693 | gcov_var.offset += words; | |
|
694 | return result; | |
|
695 | } | |
|
696 | ||
|
697 | ||
|
698 | /* Read unsigned value from a coverage file. Sets error flag on file | |
|
699 | error, overflow flag on overflow */ | |
|
700 | ||
|
701 | GCOV_LINKAGE gcov_unsigned_t | |
|
702 | gcov_read_unsigned (void) | |
|
703 | { | |
|
704 | gcov_unsigned_t value; | |
|
705 | const gcov_unsigned_t *buffer = gcov_read_words (1); | |
|
706 | ||
|
707 | if (!buffer) | |
|
708 | return 0; | |
|
709 | value = from_file (buffer[0]); | |
|
710 | return value; | |
|
711 | } | |
|
712 | ||
|
713 | /* Read counter value from a coverage file. Sets error flag on file | |
|
714 | error, overflow flag on overflow */ | |
|
715 | #endif | |
|
716 | 437 | GCOV_LINKAGE gcov_type |
|
717 | 438 | gcov_read_counter (void) |
|
718 | 439 | { |
|
719 | #if 0 | |
|
720 | gcov_type value; | |
|
721 | const gcov_unsigned_t *buffer = gcov_read_words (2); | |
|
722 | ||
|
723 | if (!buffer) | |
|
724 | return 0; | |
|
725 | value = from_file (buffer[0]); | |
|
726 | if (sizeof (value) > sizeof (gcov_unsigned_t)) | |
|
727 | value |= ((gcov_type) from_file (buffer[1])) << 32; | |
|
728 | else if (buffer[1]) | |
|
729 | gcov_var.error = -1; | |
|
730 | ||
|
731 | if (value < 0) | |
|
732 | gcov_var.error = -1; | |
|
733 | return value; | |
|
734 | #endif | |
|
735 | 440 | return 0; |
|
736 | 441 | } |
|
737 | #if 0 | |
|
738 | ||
|
739 | /* Read string from coverage file. Returns a pointer to a static | |
|
740 | buffer, or NULL on empty string. You must copy the string before | |
|
741 | calling another gcov function. */ | |
|
742 | ||
|
743 | GCOV_LINKAGE void | |
|
744 | gcov_read_summary (struct gcov_summary *summary) | |
|
745 | { | |
|
746 | unsigned ix; | |
|
747 | struct gcov_ctr_summary *csum; | |
|
748 | ||
|
749 | summary->checksum = gcov_read_unsigned (); | |
|
750 | for (csum = summary->ctrs, ix = GCOV_COUNTERS_SUMMABLE; ix--; csum++) | |
|
751 | { | |
|
752 | csum->num = gcov_read_unsigned (); | |
|
753 | csum->runs = gcov_read_unsigned (); | |
|
754 | csum->sum_all = gcov_read_counter (); | |
|
755 | csum->run_max = gcov_read_counter (); | |
|
756 | csum->sum_max = gcov_read_counter (); | |
|
757 | } | |
|
758 | } | |
|
759 | ||
|
760 | /* Move to the a set position in a gcov file. BASE is zero to move to | |
|
761 | the end, and nonzero to move to that position. */ | |
|
762 | ||
|
763 | GCOV_LINKAGE void | |
|
764 | gcov_seek (gcov_position_t base) | |
|
765 | { | |
|
766 | GCOV_CHECK_WRITING (); | |
|
767 | if (gcov_var.offset) | |
|
768 | gcov_write_block (gcov_var.offset); | |
|
769 | fseek (gcov_var.file, base << 2, base ? SEEK_SET : SEEK_END); | |
|
770 | gcov_var.start = ftell (gcov_var.file) >> 2; | |
|
771 | } | |
|
772 | ||
|
773 | #endif | |
|
774 | 442 | |
|
775 | 443 | /* Add a new object file onto the bb chain. Invoked automatically |
|
776 | 444 | when running an object file's global ctors. */ |
@@ -786,7 +454,7 gcov_seek (gcov_position_t base) | |||
|
786 | 454 | gcov_unsigned_t crc32 = gcov_crc32; |
|
787 | 455 | |
|
788 | 456 | /* Added by LESIA*/ |
|
789 |
|
|
|
457 | printf("Covered file: %s\n", info->filename); | |
|
790 | 458 | /* End of Added by LESIA*/ |
|
791 | 459 | |
|
792 | 460 | do |
@@ -420,7 +420,7 extern void __gcov_merge_delta (gcov_typ | |||
|
420 | 420 | // We limit GCOV_BLOCK_SIZE to 512 unsigned long because post processing with |
|
421 | 421 | // DOS batch cannot handle command lines bigger than 8191 characters, knowing |
|
422 | 422 | // that for each char, we print 4 characters (e.g "\x00") |
|
423 |
#define GCOV_BLOCK_SIZE (1 << |
|
|
423 | #define GCOV_BLOCK_SIZE (1 << 11) | |
|
424 | 424 | #define MAXFILENAME (1024) |
|
425 | 425 | |
|
426 | 426 | GCOV_LINKAGE struct gcov_var |
@@ -480,52 +480,6 GCOV_LINKAGE void gcov_write_unsigned (g | |||
|
480 | 480 | #endif |
|
481 | 481 | #define GCOV_CHECK_READING() GCOV_CHECK(gcov_var.mode > 0) |
|
482 | 482 | #define GCOV_CHECK_WRITING() GCOV_CHECK(gcov_var.mode < 0) |
|
483 | #if 0 | |
|
484 | /* Save the current position in the gcov file. */ | |
|
485 | 483 | |
|
486 | static inline gcov_position_t | |
|
487 | gcov_position (void) | |
|
488 | { | |
|
489 | GCOV_CHECK_READING (); | |
|
490 | return gcov_var.start + gcov_var.offset; | |
|
491 | } | |
|
492 | ||
|
493 | /* Return nonzero if we read to end of file. */ | |
|
494 | ||
|
495 | static inline int | |
|
496 | gcov_is_eof (void) | |
|
497 | { | |
|
498 | return !gcov_var.overread; | |
|
499 | } | |
|
500 | ||
|
501 | /* Return nonzero if the error flag is set. */ | |
|
502 | ||
|
503 | static inline int | |
|
504 | gcov_is_error (void) | |
|
505 | { | |
|
506 | return gcov_var.file ? gcov_var.error : 1; | |
|
507 | } | |
|
508 | ||
|
509 | /* Move to beginning of file and initialize for writing. */ | |
|
510 | ||
|
511 | static inline void | |
|
512 | gcov_rewrite (void) | |
|
513 | { | |
|
514 | GCOV_CHECK_READING (); | |
|
515 | gcov_var.mode = -1; | |
|
516 | gcov_var.start = 0; | |
|
517 | gcov_var.offset = 0; | |
|
518 | fseek (gcov_var.file, 0L, SEEK_SET); | |
|
519 | } | |
|
520 | ||
|
521 | #ifdef __MINGW32__ | |
|
522 | #define ftruncate _chsize | |
|
523 | #endif | |
|
524 | static inline void | |
|
525 | gcov_truncate (void) | |
|
526 | { | |
|
527 | ftruncate (fileno (gcov_var.file), 0L); | |
|
528 | } | |
|
529 | #endif | |
|
530 | 484 | #endif /* GCC_GCOV_IO_H */ |
|
531 | 485 | //#endif /* __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ */ |
@@ -1,10 +1,11 | |||
|
1 | 1 | /* Test for GCC >= 3.4.4 && <= 4.4.6 */ |
|
2 | #if ( ( __GNUC__ > 3 ) || \ | |
|
2 | /*#if ( ( __GNUC__ > 3 ) || \ | |
|
3 | 3 |
|
|
4 | 4 |
|
|
5 | 5 |
|
|
6 | 6 |
|
|
7 | 7 |
|
|
8 | */ | |
|
8 | 9 | /* Routines required for instrumenting a program. */ |
|
9 | 10 | /* Compile this one with gcc. */ |
|
10 | 11 | /* Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
@@ -130,4 +131,4 void | |||
|
130 | 131 | counters[3] += all; |
|
131 | 132 | } |
|
132 | 133 | } |
|
133 | #endif /* __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ */ | |
|
134 | //#endif /* __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ */ |
@@ -19,10 +19,10 if(fix-b2bst) | |||
|
19 | 19 | set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -mfix-b2bst") |
|
20 | 20 | endif() |
|
21 | 21 | |
|
22 | if(Coverage) | |
|
23 | set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage") | |
|
24 | set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage") | |
|
25 | endif() | |
|
22 | #if(Coverage) | |
|
23 | # set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage") | |
|
24 | # set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage") | |
|
25 | #endif() | |
|
26 | 26 | |
|
27 | 27 | |
|
28 | 28 | set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_LINKER> <FLAGS> -Xlinker -Map=<TARGET>.map <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") |
General Comments 0
You need to be logged in to leave comments.
Login now