diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 22:21:21 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-27 22:05:03 -0400 |
commit | 6dd5a4bd44b7b7d2daf195dd5e48faeaf7231c17 (patch) | |
tree | c62d9b1cebef0e187266649bb031db7c62875a78 /gdb/block.h | |
parent | 3fe38936f6c0fe5d724806a1646fb7b67638b420 (diff) | |
download | gdb-6dd5a4bd44b7b7d2daf195dd5e48faeaf7231c17.zip gdb-6dd5a4bd44b7b7d2daf195dd5e48faeaf7231c17.tar.gz gdb-6dd5a4bd44b7b7d2daf195dd5e48faeaf7231c17.tar.bz2 |
gdb: remove BLOCK_RANGE_{START,END} macros
Replace with equivalent methods on blockrange.
Change-Id: I20fd8f624e0129782c36768291891e7582d77c74
Diffstat (limited to 'gdb/block.h')
-rw-r--r-- | gdb/block.h | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/gdb/block.h b/gdb/block.h index 2f71f3c..60e53c6 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -38,19 +38,35 @@ struct addrmap; struct blockrange { - blockrange (CORE_ADDR startaddr_, CORE_ADDR endaddr_) - : startaddr (startaddr_), - endaddr (endaddr_) + blockrange (CORE_ADDR start, CORE_ADDR end) + : m_start (start), + m_end (end) { } + /* Return this blockrange's start address. */ + CORE_ADDR start () const + { return m_start; } + + /* Set this blockrange's start address. */ + void set_start (CORE_ADDR start) + { m_start = start; } + + /* Return this blockrange's end address. */ + CORE_ADDR end () const + { return m_end; } + + /* Set this blockrange's end address. */ + void set_end (CORE_ADDR end) + { m_end = end; } + /* Lowest address in this range. */ - CORE_ADDR startaddr; + CORE_ADDR m_start; /* One past the highest address in the range. */ - CORE_ADDR endaddr; + CORE_ADDR m_end; }; /* Two or more non-contiguous ranges in the same order as that provided @@ -203,14 +219,6 @@ struct global_block #define BLOCK_CONTIGUOUS_P(bl) (BLOCK_RANGES (bl) == nullptr \ || BLOCK_NRANGES (bl) <= 1) -/* Obtain the start address of the Nth range for block BL. */ - -#define BLOCK_RANGE_START(bl,n) (BLOCK_RANGE (bl)[n].startaddr) - -/* Obtain the end address of the Nth range for block BL. */ - -#define BLOCK_RANGE_END(bl,n) (BLOCK_RANGE (bl)[n].endaddr) - /* Define the "entry pc" for a block BL to be the lowest (start) address for the block when all addresses within the block are contiguous. If non-contiguous, then use the start address for the first range in the @@ -227,7 +235,7 @@ struct global_block #define BLOCK_ENTRY_PC(bl) (BLOCK_CONTIGUOUS_P (bl) \ ? bl->start () \ - : BLOCK_RANGE_START (bl,0)) + : BLOCK_RANGE (bl)[0].start ()) struct blockvector { |