target: fix profiler output on Windows
Open output file in binary mode to disable EOL conversion on Windows (and sometimes cygwin depending on installation settings and path). Change-Id: I38276dd1af011ce5781b0264b7cbb08c32a1a2ad Signed-off-by: Richard Allen <rsaxvc@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8278 Reviewed-by: Karl Palsson <karlp@tweak.au> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
ff22f78d46
commit
5cb184a732
|
@ -4209,7 +4209,7 @@ static void write_gmon(uint32_t *samples, uint32_t sample_num, const char *filen
|
|||
uint32_t start_address, uint32_t end_address, struct target *target, uint32_t duration_ms)
|
||||
{
|
||||
uint32_t i;
|
||||
FILE *f = fopen(filename, "w");
|
||||
FILE *f = fopen(filename, "wb");
|
||||
if (!f)
|
||||
return;
|
||||
write_string(f, "gmon");
|
||||
|
|
Loading…
Reference in New Issue