diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-28 10:59:38 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-27 22:05:02 -0400 |
commit | 4b8791e10e574d3279e6783b58556893b0c92853 (patch) | |
tree | e348e10e55388797f1bb53f3b6ae5cc990f1d223 /gdb/block.h | |
parent | dfb138f9344ca671e7e16fffe36779d38d18c490 (diff) | |
download | gdb-4b8791e10e574d3279e6783b58556893b0c92853.zip gdb-4b8791e10e574d3279e6783b58556893b0c92853.tar.gz gdb-4b8791e10e574d3279e6783b58556893b0c92853.tar.bz2 |
gdb: remove BLOCK_{START,END} macros
Replace with equivalent methods.
Change-Id: I10a6c8a2a86462d9d4a6a6409a3f07a6bea66310
Diffstat (limited to 'gdb/block.h')
-rw-r--r-- | gdb/block.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gdb/block.h b/gdb/block.h index eedba91..7fe9824 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -90,11 +90,26 @@ struct blockranges struct block { + /* Return this block's start address. */ + CORE_ADDR start () const + { return m_start; } + + /* Set this block's start address. */ + void set_start (CORE_ADDR start) + { m_start = start; } + + /* Return this block's end address. */ + CORE_ADDR end () const + { return m_end; } + + /* Set this block's end address. */ + void set_end (CORE_ADDR end) + { m_end = end; } /* Addresses in the executable code that are in this block. */ - CORE_ADDR startaddr; - CORE_ADDR endaddr; + CORE_ADDR m_start; + CORE_ADDR m_end; /* The symbol that names this block, if the block is the body of a function (real or inlined); otherwise, zero. */ @@ -139,8 +154,6 @@ struct global_block struct compunit_symtab *compunit_symtab; }; -#define BLOCK_START(bl) (bl)->startaddr -#define BLOCK_END(bl) (bl)->endaddr #define BLOCK_FUNCTION(bl) (bl)->function #define BLOCK_SUPERBLOCK(bl) (bl)->superblock #define BLOCK_MULTIDICT(bl) (bl)->multidict @@ -186,7 +199,7 @@ struct global_block too). BLOCK_ENTRY_PC can then be redefined to be less DWARF-centric. */ #define BLOCK_ENTRY_PC(bl) (BLOCK_CONTIGUOUS_P (bl) \ - ? BLOCK_START (bl) \ + ? bl->start () \ : BLOCK_RANGE_START (bl,0)) struct blockvector |