[pushed,2/3] gdb: rename partial_symtab::read_dependencies to expand_dependencies

Message ID 20200329192833.3691258-3-simon.marchi@polymtl.ca
State New
Headers show
Series
  • Small cleanups in the psymtab department
Related show

Commit Message

Pedro Alves via Gdb-patches March 29, 2020, 7:28 p.m.
This method calls partial_symtab::expand_psymtab on all dependencies of
a psymtab.  Given that there is also a partial_symtab::read_symtab
method, I think it would be clearer to name this function
expand_dependencies, rather than read_dependencies.

gdb/ChangeLog:

	* psympriv.h (partial_symtab) <read_dependencies>: Rename to...
	<expand_dependencies>: ... this.
	* psymtab.c (partial_symtab::read_dependencies): Rename to...
	(partial_symtab::expand_dependencies): ... this.
	* dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
	Update.
	(dwarf2_psymtab::expand_psymtab): Update.
	* dbxread.c (dbx_psymtab_to_symtab_1): Update.
	* mdebugread.c (psymtab_to_symtab_1): Update.
	* xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
---
 gdb/ChangeLog     | 13 +++++++++++++
 gdb/dbxread.c     |  2 +-
 gdb/dwarf2/read.c |  4 ++--
 gdb/mdebugread.c  |  2 +-
 gdb/psympriv.h    |  2 +-
 gdb/psymtab.c     |  2 +-
 gdb/xcoffread.c   |  2 +-
 7 files changed, 20 insertions(+), 7 deletions(-)

-- 
2.25.2

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9e5c1cb3ae00..2b4d94ddecaf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@ 
+2020-03-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* psympriv.h (partial_symtab) <read_dependencies>: Rename to...
+	<expand_dependencies>: ... this.
+	* psymtab.c (partial_symtab::read_dependencies): Rename to...
+	(partial_symtab::expand_dependencies): ... this.
+	* dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
+	Update.
+	(dwarf2_psymtab::expand_psymtab): Update.
+	* dbxread.c (dbx_psymtab_to_symtab_1): Update.
+	* mdebugread.c (psymtab_to_symtab_1): Update.
+	* xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
+
 2020-03-29  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	* psympriv.h (discard_psymtab): Remove.
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index ecc416e0b5d7..715009dc9578 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2071,7 +2071,7 @@  dbx_psymtab_to_symtab_1 (legacy_psymtab *pst, struct objfile *objfile)
   gdb_assert (!pst->readin);
 
   /* Read in all partial symtabs on which this one is dependent.  */
-  pst->read_dependencies (objfile);
+  pst->expand_dependencies (objfile);
 
   if (LDSYMLEN (pst))		/* Otherwise it's a dummy.  */
     {
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 8c5046ef41c5..1ec5c1e582b7 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -5840,7 +5840,7 @@  struct dwarf2_include_psymtab : public partial_symtab
       return;
     /* It's an include file, no symbols to read for it.
        Everything is in the parent symtab.  */
-    read_dependencies (objfile);
+    expand_dependencies (objfile);
     m_readin = true;
   }
 
@@ -8775,7 +8775,7 @@  dwarf2_psymtab::expand_psymtab (struct objfile *objfile)
   if (readin)
     return;
 
-  read_dependencies (objfile);
+  expand_dependencies (objfile);
 
   dw2_do_instantiate_symtab (per_cu_data, false);
   gdb_assert (get_compunit_symtab () != nullptr);
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 5d2fbcd27490..f4bb24447153 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -3856,7 +3856,7 @@  psymtab_to_symtab_1 (legacy_psymtab *pst, struct objfile *objfile)
   /* Read in all partial symtabs on which this one is dependent.
      NOTE that we do have circular dependencies, sigh.  We solved
      that by setting pst->readin before this point.  */
-  pst->read_dependencies (objfile);
+  pst->expand_dependencies (objfile);
 
   /* Do nothing if this is a dummy psymtab.  */
 
diff --git a/gdb/psympriv.h b/gdb/psympriv.h
index 79f83a4d6cf9..9bc960a77d41 100644
--- a/gdb/psympriv.h
+++ b/gdb/psympriv.h
@@ -134,7 +134,7 @@  struct partial_symtab
   virtual void expand_psymtab (struct objfile *) = 0;
 
   /* Ensure that all the dependencies are read in.  */
-  void read_dependencies (struct objfile *);
+  void expand_dependencies (struct objfile *);
 
   /* Return true if the symtab corresponding to this psymtab has been
      readin.  */
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 8aa9c6e87bb5..56c1b68b541c 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1706,7 +1706,7 @@  partial_symtab::partial_symtab (const char *filename_, struct objfile *objfile)
 /* See psympriv.h.  */
 
 void
-partial_symtab::read_dependencies (struct objfile *objfile)
+partial_symtab::expand_dependencies (struct objfile *objfile)
 {
   for (int i = 0; i < number_of_dependencies; ++i)
     {
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index dca4c46fb119..1ac01c801174 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1826,7 +1826,7 @@  xcoff_psymtab_to_symtab_1 (legacy_psymtab *pst, struct objfile *objfile)
   gdb_assert (!pst->readin);
 
   /* Read in all partial symtabs on which this one is dependent.  */
-  pst->read_dependencies (objfile);
+  pst->expand_dependencies (objfile);
 
   if (((struct symloc *) pst->read_symtab_private)->numsyms != 0)
     {