annotation issue with newer gdb's?

Bob Rossi bob@brasko.net
Sat Apr 4 23:33:39 GMT 2020


Hi,

In older versions of gdb (at least until 7.11 which i'm using and
possibly later) I see the following behavior when starting gdb and
typing, 'b main'

    "\r\n\032\032post-prompt\r\n"
    "Breakpoint 1 at 0x4006c0: file test.cpp, line 42.\r\n"
    "\r\n\032\032breakpoints-invalid\r\n"

In GDB 9.1, I'm see the following,

    "\r\n\032\032post-prompt\r\n"
    "\r\nBreakpoint 1 at \033[34m0x4006c0\033[m: file \033[32mtest.cpp\033[m, line 42."
    "\r\n\032\032breakpoints-invalid\r\n"

You can see that the newline moved on the "Breakpoint 1" line
from the end of the line (in older versions) to the beginning of the
line (in newer versions).

This ultimately caused CGDB to misbehave.

Correctly working CGDB,
    Reading symbols from ./main...done.
    (gdb) b main
    Breakpoint 1 at 0x4006c0: file test.cpp, line 42.
    (gdb) 

Incorrectly working CGDB,
    Reading symbols from ./main...
    (gdb) b main

    Breakpoint 1 at 0x4006c0: file test.cpp, line 42.(gdb) 

Was this change to the annotations made on purpose?

Thanks,
Bob Rossi


More information about the Gdb mailing list