diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 22:30:06 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-27 22:05:03 -0400 |
commit | f73b4922a06f5455c1f0173d3b2026dba957d1b7 (patch) | |
tree | b27b5f8b748788fcf1b22dffad546ad5e83de0d4 /gdb/cli | |
parent | f5cb8afdd297dd68273d98a10fbfd350dff918d8 (diff) | |
download | binutils-gdb-f73b4922a06f5455c1f0173d3b2026dba957d1b7.tar.gz |
gdb: remove BLOCK_NRANGES macro
Replace with range for loops.
Change-Id: Icbe04f9b6f9e6ddae2e15b2409c61f7a336bc3e3
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-cmds.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index f7c556a4e0c..7a6a8ea20a1 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1442,10 +1442,11 @@ print_disassembly (struct gdbarch *gdbarch, const char *name, } else { - for (int i = 0; i < BLOCK_NRANGES (block); i++) + for (const blockrange &range : block->ranges ()) { - CORE_ADDR range_low = BLOCK_RANGE (block)[i].start (); - CORE_ADDR range_high = BLOCK_RANGE (block)[i].end (); + CORE_ADDR range_low = range.start (); + CORE_ADDR range_high = range.end (); + gdb_printf (_("Address range %ps to %ps:\n"), styled_string (address_style.style (), paddress (gdbarch, range_low)), |