aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2021-11-19 20:59:59 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-02-06 15:48:18 -0500
commit43b49762a17718fe13718238a8c0af9b62b682d4 (patch)
tree8be30b479fd70e628e0f8a4e2085465549f98768 /gdb/symtab.h
parent0b17a4f78fb969e7c1ae298561ef6963c73006a7 (diff)
downloadgdb-43b49762a17718fe13718238a8c0af9b62b682d4.zip
gdb-43b49762a17718fe13718238a8c0af9b62b682d4.tar.gz
gdb-43b49762a17718fe13718238a8c0af9b62b682d4.tar.bz2
gdb: add compunit_symtab::add_filetab method
Add a method to append a filetab/symtab to a compunit_symtab. There is a single place where this is done currently, in allocate_symtab. Change-Id: Ie86c6e34d175728173d1cffdce44acd6cff6c31d
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index f6d787c..3fa4d5f 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1459,6 +1459,20 @@ struct compunit_symtab
m_objfile = objfile;
}
+ void add_filetab (symtab *filetab)
+ {
+ if (this->filetabs == nullptr)
+ {
+ this->filetabs = filetab;
+ this->last_filetab = filetab;
+ }
+ else
+ {
+ this->last_filetab->next = filetab;
+ this->last_filetab = filetab;
+ }
+ }
+
/* Return the primary filetab of the compunit. */
symtab *primary_filetab () const;