diff options
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -519,9 +519,6 @@ print_lines(char *src, int start_line, int nlines) return -1; } - /* set binary mode so that byte offset calculations will be right */ - os_setbinmode(s->fd, O_BINARY); - if (fstat(s->fd, &sbuf) == 0 && s->mtime < sbuf.st_mtime) { fprintf(out_fp, _("WARNING: source file `%s' modified since program compilation.\n"), src); @@ -537,9 +534,11 @@ print_lines(char *src, int start_line, int nlines) src, strerror(errno)); return -1; } - os_setbinmode(s->fd, O_BINARY); } + /* set binary mode so that byte offset calculations will be right */ + os_setbinmode(s->fd, O_BINARY); + if (s->line_offset == NULL && find_lines(s) != 0) return -1; if (start_line < 1 || start_line > s->srclines) { |