gdb: move compunit_filetabs to compunit_symtab::filetabs

Make compunit_filetabs, used to iterate a compunit_symtab's filetabs, a
method of compunit_symtab.  The name filetabs conflicts with the current
name of the field.  Rename the field to m_filetabs, since at this point
nothing outside of compunit_symtab uses it, so we should treat it as
private (even though it's not actually private).  Rename the
last_filetab field to m_last_filetab as well (it's only used on
compunit_symtab::add_filetab).

Adjust the COMPUNIT_FILETABS macro to keep its current behavior of
returning the first filetab.

Change-Id: I537b553a44451c52d24b18ee1bfa47e23747cfc3
This commit is contained in:
Simon Marchi 2021-11-19 21:18:05 -05:00 committed by Simon Marchi
parent 36664835fa
commit 102cc23543
7 changed files with 39 additions and 41 deletions

View file

@ -651,7 +651,7 @@ objfile_relocate1 (struct objfile *objfile,
{
for (compunit_symtab *cust : objfile->compunits ())
{
for (symtab *s : compunit_filetabs (cust))
for (symtab *s : cust->filetabs ())
{
struct linetable *l;