Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/9] Convert breakpoint iteration macros to ranges
Date: Thu, 27 May 2021 11:35:49 -0400	[thread overview]
Message-ID: <20210527153558.3016335-1-simon.marchi@polymtl.ca> (raw)

This all started with me finding that the update_global_location_list
function was hard to read, notably because the breakpoint iteration
macros are a bit hard to read (require multiple local variables and
pointers to pointers).  So this removes all breakpoint-related iteration
macros in favor of functions that return iterable ranges.

Patch 5 also converts the bp_locations array into a vector, which
simplifies things a bit.

In the end, the update_global_location_list is still hard to understand
(big surprise), but I think that the code in general is a bit tidier
like this.

I regtested this on Linux, with the unix and native-extended-gdbserver
boards.

Simon Marchi (9):
  gdb: add all_breakpoints function
  gdb: add all_breakpoints_safe function
  gdb: add all_tracepoints function
  gdb: add breakpoint::locations method
  gdb: make bp_locations an std::vector
  gdb: add all_bp_locations function
  gdb: add all_bp_locations_at_addr function
  gdb: remove iterate_over_breakpoints function
  gdb: remove iterate_over_bp_locations function

 gdb/ada-lang.c                   |   4 +-
 gdb/breakpoint.c                 | 866 +++++++++++--------------------
 gdb/breakpoint.h                 |  69 ++-
 gdb/dummy-frame.c                |   7 +-
 gdb/guile/scm-breakpoint.c       |  10 +-
 gdb/jit.c                        |   2 +-
 gdb/python/py-breakpoint.c       |  27 +-
 gdb/python/py-finishbreakpoint.c |  17 +-
 gdb/record-full.c                |  26 +-
 gdb/remote.c                     |   3 +-
 gdb/solib-svr4.c                 |   7 +-
 gdb/tracepoint.c                 |  31 +-
 gdb/tui/tui-winsource.c          |   9 +-
 13 files changed, 420 insertions(+), 658 deletions(-)

-- 
2.31.1


             reply	other threads:[~2021-05-27 15:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 15:35 Simon Marchi via Gdb-patches [this message]
2021-05-27 15:35 ` [PATCH 1/9] gdb: add all_breakpoints function Simon Marchi via Gdb-patches
2021-05-27 15:35 ` [PATCH 2/9] gdb: add all_breakpoints_safe function Simon Marchi via Gdb-patches
2021-05-27 17:35   ` Tom Tromey
2021-05-27 17:58     ` Simon Marchi via Gdb-patches
2021-05-27 18:15       ` Tom Tromey
2021-05-27 15:35 ` [PATCH 3/9] gdb: add all_tracepoints function Simon Marchi via Gdb-patches
2021-05-27 15:35 ` [PATCH 4/9] gdb: add breakpoint::locations method Simon Marchi via Gdb-patches
2021-05-27 15:35 ` [PATCH 5/9] gdb: make bp_locations an std::vector Simon Marchi via Gdb-patches
2021-05-27 15:35 ` [PATCH 6/9] gdb: add all_bp_locations function Simon Marchi via Gdb-patches
2021-05-27 15:35 ` [PATCH 7/9] gdb: add all_bp_locations_at_addr function Simon Marchi via Gdb-patches
2021-05-27 18:04   ` Tom Tromey
2021-05-27 18:13     ` Simon Marchi via Gdb-patches
2021-05-27 15:35 ` [PATCH 8/9] gdb: remove iterate_over_breakpoints function Simon Marchi via Gdb-patches
2021-10-21 10:20   ` Tom de Vries via Gdb-patches
2021-10-21 11:29     ` [PATCH, master + 11][gdb/tui] Fix breakpoint display functionality Tom de Vries via Gdb-patches
2021-10-21 12:10       ` Tom de Vries via Gdb-patches
2021-10-21 14:28         ` Simon Marchi via Gdb-patches
2021-05-27 15:35 ` [PATCH 9/9] gdb: remove iterate_over_bp_locations function Simon Marchi via Gdb-patches
2021-05-27 18:14 ` [PATCH 0/9] Convert breakpoint iteration macros to ranges Tom Tromey
2021-05-27 18:59   ` Simon Marchi via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210527153558.3016335-1-simon.marchi@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox