diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-20 17:17:11 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-04-27 22:05:03 -0400 |
commit | 414705d1c2d359694459d3991a0975d051ac70b5 (patch) | |
tree | 201d88e54b350f7a39e38863cb15fb5b4930a34b /gdb/block.h | |
parent | bad9471aab31d1b5aa733b8985b8e40e2a97b8e7 (diff) | |
download | gdb-414705d1c2d359694459d3991a0975d051ac70b5.zip gdb-414705d1c2d359694459d3991a0975d051ac70b5.tar.gz gdb-414705d1c2d359694459d3991a0975d051ac70b5.tar.bz2 |
gdb: remove BLOCKVECTOR_MAP macro
Replace with equivalent methods.
Change-Id: I4e56c76dfc363c1447686fb29c4212ea18b4dba0
Diffstat (limited to 'gdb/block.h')
-rw-r--r-- | gdb/block.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gdb/block.h b/gdb/block.h index b6b8b86..b9f4e97 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -296,12 +296,24 @@ struct blockvector const struct block *static_block () const { return this->block (STATIC_BLOCK); } + /* Return the address -> block map of this blockvector. */ + addrmap *map () + { return m_map; } + + /* Const version of the above. */ + const addrmap *map () const + { return m_map; } + + /* Set this blockvector's address -> block map. */ + void set_map (addrmap *map) + { m_map = map; } + +private: /* An address map mapping addresses to blocks in this blockvector. This pointer is zero if the blocks' start and end addresses are enough. */ - struct addrmap *map; + struct addrmap *m_map; -private: /* Number of blocks in the list. */ int m_num_blocks; @@ -309,8 +321,6 @@ private: struct block *m_blocks[1]; }; -#define BLOCKVECTOR_MAP(blocklist) ((blocklist)->map) - /* Return the objfile of BLOCK, which must be non-NULL. */ extern struct objfile *block_objfile (const struct block *block); |