diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-20 21:54:11 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:46 -0500 |
commit | 652099717dbb767c9d3eaed4c533486dd99d5e5b (patch) | |
tree | 1165879a9bb9e6d433559addb0e492e602d7c4c5 /gdb/symtab.h | |
parent | 012cfab919e7da355b2ac7f86674211cbce26041 (diff) | |
download | fsf-binutils-gdb-652099717dbb767c9d3eaed4c533486dd99d5e5b.zip fsf-binutils-gdb-652099717dbb767c9d3eaed4c533486dd99d5e5b.tar.gz fsf-binutils-gdb-652099717dbb767c9d3eaed4c533486dd99d5e5b.tar.bz2 |
gdb: remove SYMTAB_OBJFILE macro
Remove the macro, replace with an equivalent method.
Change-Id: I8f9ecd290ad28502e53c1ceca5006ba78bf042eb
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 1935113..9cfbd71 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1405,6 +1405,8 @@ struct symtab const struct blockvector *blockvector () const; + struct objfile *objfile () const; + /* Unordered chain of all filetabs in the compunit, with the exception that the "main" source file is the first entry in the list. */ @@ -1437,9 +1439,7 @@ struct symtab using symtab_range = next_range<symtab>; -#define SYMTAB_OBJFILE(symtab) \ - (symtab->compunit ()->objfile ()) -#define SYMTAB_PSPACE(symtab) (SYMTAB_OBJFILE (symtab)->pspace) +#define SYMTAB_PSPACE(symtab) ((symtab)->objfile ()->pspace) #define SYMTAB_DIRNAME(symtab) ((symtab)->compunit ()->dirname ()) /* Compunit symtabs contain the actual "symbol table", aka blockvector, as well @@ -1689,6 +1689,12 @@ symtab::blockvector () const return this->compunit ()->blockvector (); } +inline struct objfile * +symtab::objfile () const +{ + return this->compunit ()->objfile (); +} + /* Return the language of CUST. */ extern enum language compunit_language (const struct compunit_symtab *cust); |