diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-19 22:25:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-02-06 15:48:18 -0500 |
commit | af39c5c8749757724a0f62dcb51be59cf3ecc678 (patch) | |
tree | a960f6bfd23ad6080061d29dbec58125cc33f106 /gdb/symtab.h | |
parent | 0d9acb4531cfe336b2b335fbaa1f2ef878a6e4d9 (diff) | |
download | gdb-af39c5c8749757724a0f62dcb51be59cf3ecc678.zip gdb-af39c5c8749757724a0f62dcb51be59cf3ecc678.tar.gz gdb-af39c5c8749757724a0f62dcb51be59cf3ecc678.tar.bz2 |
gdb: remove COMPUNIT_BLOCKVECTOR macro, add getter/setter
Add a getter and a setter for a compunit_symtab's blockvector. Remove
the corresponding macro and adjust all callers.
Change-Id: I99484c6619dcbbea7c5d89c72aa660316ca62f64
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index b72abab..f9318ff 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1409,7 +1409,7 @@ using symtab_range = next_range<symtab>; #define SYMTAB_LINETABLE(symtab) ((symtab)->linetable) #define SYMTAB_LANGUAGE(symtab) ((symtab)->language) #define SYMTAB_BLOCKVECTOR(symtab) \ - COMPUNIT_BLOCKVECTOR (SYMTAB_COMPUNIT (symtab)) + (SYMTAB_COMPUNIT (symtab)->blockvector ()) #define SYMTAB_OBJFILE(symtab) \ (SYMTAB_COMPUNIT (symtab)->objfile ()) #define SYMTAB_PSPACE(symtab) (SYMTAB_OBJFILE (symtab)->pspace) @@ -1511,6 +1511,16 @@ struct compunit_symtab m_dirname = dirname; } + const struct blockvector *blockvector () const + { + return m_blockvector; + } + + void set_blockvector (const struct blockvector *blockvector) + { + m_blockvector = blockvector; + } + /* Make PRIMARY_FILETAB the primary filetab of this compunit symtab. PRIMARY_FILETAB must already be a filetab of this compunit symtab. */ @@ -1564,7 +1574,7 @@ struct compunit_symtab /* List of all symbol scope blocks for this symtab. It is shared among all symtabs in a given compilation unit. */ - const struct blockvector *blockvector; + const struct blockvector *m_blockvector; /* Section in objfile->section_offsets for the blockvector and the linetable. Probably always SECT_OFF_TEXT. */ @@ -1606,7 +1616,6 @@ struct compunit_symtab using compunit_symtab_range = next_range<compunit_symtab>; -#define COMPUNIT_BLOCKVECTOR(cust) ((cust)->blockvector) #define COMPUNIT_BLOCK_LINE_SECTION(cust) ((cust)->block_line_section) #define COMPUNIT_LOCATIONS_VALID(cust) ((cust)->locations_valid) #define COMPUNIT_EPILOGUE_UNWIND_VALID(cust) ((cust)->epilogue_unwind_valid) |