[Bug tui/28483] [gdb/tui] breakpoint creation not displayed

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Thu Oct 21 22:28:18 GMT 2021


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

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The gdb-11-branch branch has been updated by Tom de Vries
<vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cfd85eb3ef8d1c823daaa00783c4244089587a3a

commit cfd85eb3ef8d1c823daaa00783c4244089587a3a
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Oct 22 00:28:14 2021 +0200

    [gdb/tui] Fix breakpoint display functionality

    In commit 81e6b8eb208 "Make tui-winsource not use breakpoint_chain", a loop
    body was transformed into a lambda function body:
    ...
    -      for (bp = breakpoint_chain;
    -           bp != NULL;
    -           bp = bp->next)
    +      iterate_over_breakpoints ([&] (breakpoint *bp) -> bool
    ...
    and consequently:
    - a continue was replaced by a return, and
    - a final return was added.

    Then in commit 240edef62f0 "gdb: remove iterate_over_breakpoints function",
we
    transformed back to a loop body:
    ...
    -      iterate_over_breakpoints ([&] (breakpoint *bp) -> bool
    +      for (breakpoint *bp : all_breakpoints ())
    ...
    but without reverting the changes that introduced the two returns.

    Consequently, breakpoints no longer show up in the tui source window.

    Fix this by reverting the changes that introduced the two returns.

    Build on x86_64-linux, tested with all .exp test-cases that contain
    tuiterm_env.

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

    gdb/ChangeLog:

    2021-10-22  Tom de Vries  <tdevries@suse.de>

            PR tui/28483
            * tui/tui-winsource.c
(tui_source_window_base::update_breakpoint_info):
            Fix returns in loop body.

    gdb/testsuite/ChangeLog:

    2021-10-22  Tom de Vries  <tdevries@suse.de>

            PR tui/28483
            * gdb.tui/break.exp: New file.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list