public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* annotation issue with newer gdb's?
@ 2020-04-04 23:33 Bob Rossi
  2020-04-06 18:46 ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Bob Rossi @ 2020-04-04 23:33 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: annotation issue with newer gdb's?
  2020-04-04 23:33 annotation issue with newer gdb's? Bob Rossi
@ 2020-04-06 18:46 ` Joel Brobecker
  2020-04-15  2:00   ` Bob Rossi
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2020-04-06 18:46 UTC (permalink / raw)
  To: Bob Rossi; +Cc: gdb

> 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?

I haven't followed development much, lately ( :-( ), but I don't
think so. This looks similer to:

https://sourceware.org/bugzilla/show_bug.cgi?id=25190

That particular PR is reported as being fixed for 9.1, so it's
not the same problem, or the fix was incomplete.

Have you tried master, by any chance?

-- 
Joel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: annotation issue with newer gdb's?
  2020-04-06 18:46 ` Joel Brobecker
@ 2020-04-15  2:00   ` Bob Rossi
  0 siblings, 0 replies; 3+ messages in thread
From: Bob Rossi @ 2020-04-15  2:00 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb

On Mon, Apr 06, 2020 at 11:46:47AM -0700, Joel Brobecker wrote:
> > 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?
> 
> I haven't followed development much, lately ( :-( ), but I don't
> think so. This looks similer to:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=25190

Thanks for pointing to the bug report.

> That particular PR is reported as being fixed for 9.1, so it's
> not the same problem, or the fix was incomplete.
> 
> Have you tried master, by any chance?

Not yet. I might have to.

However, I was playing around and found out that when
    set height 0
is used, gdb shows the bug. However if,
    set pagination off
is used, the error is gone.

I found that really strange as the documentation seems
to indicate that 'set height 0' and 'set pagination off'
are equivalent. I guess not!

I may change CGDB to set pagination off to work around
this issue. Is there anything else I should do at this point?

Thanks,
Bob Rossi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-15  2:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 23:33 annotation issue with newer gdb's? Bob Rossi
2020-04-06 18:46 ` Joel Brobecker
2020-04-15  2:00   ` Bob Rossi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).