diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-19 21:18:05 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-02-06 15:48:18 -0500 |
commit | 102cc23543fc37b42c4814f594f130f862397178 (patch) | |
tree | 641e7dce863b6e1aa80b58aafeb5bc2ae862fa49 /gdb/symmisc.c | |
parent | 36664835fa3f81503633024e0e834be4d84276e1 (diff) | |
download | binutils-102cc23543fc37b42c4814f594f130f862397178.zip binutils-102cc23543fc37b42c4814f594f130f862397178.tar.gz binutils-102cc23543fc37b42c4814f594f130f862397178.tar.bz2 |
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
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r-- | gdb/symmisc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 8b57434..b4b58f6 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -74,7 +74,7 @@ print_objfile_statistics (void) i = linetables = 0; for (compunit_symtab *cu : objfile->compunits ()) { - for (symtab *s : compunit_filetabs (cu)) + for (symtab *s : cu->filetabs ()) { i++; if (SYMTAB_LINETABLE (s) != NULL) @@ -126,7 +126,7 @@ dump_objfile (struct objfile *objfile) printf_filtered ("Symtabs:\n"); for (compunit_symtab *cu : objfile->compunits ()) { - for (symtab *symtab : compunit_filetabs (cu)) + for (symtab *symtab : cu->filetabs ()) { printf_filtered ("%s at %s", symtab_to_filename_for_display (symtab), @@ -469,7 +469,7 @@ maintenance_print_symbols (const char *args, int from_tty) for (compunit_symtab *cu : objfile->compunits ()) { - for (symtab *s : compunit_filetabs (cu)) + for (symtab *s : cu->filetabs ()) { int print_for_source = 0; @@ -756,7 +756,7 @@ maintenance_info_symtabs (const char *regexp, int from_tty) { int printed_compunit_symtab_start = 0; - for (symtab *symtab : compunit_filetabs (cust)) + for (symtab *symtab : cust->filetabs ()) { QUIT; @@ -1025,7 +1025,7 @@ maintenance_info_line_tables (const char *regexp, int from_tty) { for (compunit_symtab *cust : objfile->compunits ()) { - for (symtab *symtab : compunit_filetabs (cust)) + for (symtab *symtab : cust->filetabs ()) { QUIT; |