public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Convert breakpoint iteration macros to ranges
@ 2021-05-27 15:35 Simon Marchi
  2021-05-27 15:35 ` [PATCH 1/9] gdb: add all_breakpoints function Simon Marchi
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Simon Marchi @ 2021-05-27 15:35 UTC (permalink / raw)
  To: gdb-patches

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


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

end of thread, other threads:[~2021-10-21 14:28 UTC | newest]

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

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).