From 62ea19c1000856c2633a952c52269fca4143931a Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Sun, 6 Jan 2019 23:31:45 +0000 Subject: [PATCH] gdb: Fix skip of `\r` before `\n` in source output In this commit: commit 62f29fda90cf1d5a1899f57ef78452471c707fd6 Date: Tue Oct 9 22:21:05 2018 -0600 Highlight source code using GNU Source Highlight A bug was introduced such that when displaying source code from a file with lines `\r\n` GDB would print `^M` at the end of each line. This caused a regression on the test gdb.fortran/nested-funcs.exp, which happens to have `\r\n` line endings. gdb/ChangeLog: * source.c (print_source_lines_base): Fix skip of '\r' if next character is '\n'. --- gdb/ChangeLog | 5 +++++ gdb/source.c | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8230afc881..3ea75762f9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-01-08 Andrew Burgess + + * source.c (print_source_lines_base): Fix skip of '\r' if next + character is '\n'. + 2019-01-06 Tom Tromey * c-exp.y (struct c_parse_state)