forked from espressif/esp-idf
gcov: Do not use shrunk ROM's fake stdout and stderr FILE struct
This commit is contained in:
@@ -52,18 +52,11 @@ void gcov_dump_task(void *pvParameter)
|
|||||||
}
|
}
|
||||||
ESP_EARLY_LOGV(TAG, "Config apptrace down buf");
|
ESP_EARLY_LOGV(TAG, "Config apptrace down buf");
|
||||||
esp_apptrace_down_buffer_config(down_buf, ESP_GCOV_DOWN_BUF_SIZE);
|
esp_apptrace_down_buffer_config(down_buf, ESP_GCOV_DOWN_BUF_SIZE);
|
||||||
/* we are directing the std outputs to the fake ones in order to reduce stack usage */
|
|
||||||
FILE *old_stderr = stderr;
|
|
||||||
FILE *old_stdout = stdout;
|
|
||||||
stderr = (FILE *) &__sf_fake_stderr;
|
|
||||||
stdout = (FILE *) &__sf_fake_stdout;
|
|
||||||
ESP_EARLY_LOGV(TAG, "Dump data...");
|
ESP_EARLY_LOGV(TAG, "Dump data...");
|
||||||
__gcov_dump();
|
__gcov_dump();
|
||||||
// reset dump status to allow incremental data accumulation
|
// reset dump status to allow incremental data accumulation
|
||||||
__gcov_reset();
|
__gcov_reset();
|
||||||
free(down_buf);
|
free(down_buf);
|
||||||
stderr = old_stderr;
|
|
||||||
stdout = old_stdout;
|
|
||||||
ESP_EARLY_LOGV(TAG, "Finish file transfer session");
|
ESP_EARLY_LOGV(TAG, "Finish file transfer session");
|
||||||
dump_result = esp_apptrace_fstop(ESP_APPTRACE_DEST_TRAX);
|
dump_result = esp_apptrace_fstop(ESP_APPTRACE_DEST_TRAX);
|
||||||
if (dump_result != ESP_OK) {
|
if (dump_result != ESP_OK) {
|
||||||
|
Reference in New Issue
Block a user