This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Remove the "listhead" argument from finish_block


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c233e9c641a84e69603bd94d0e85050c361b64a6

commit c233e9c641a84e69603bd94d0e85050c361b64a6
Author: Tom Tromey <tom@tromey.com>
Date:   Mon May 21 00:41:21 2018 -0600

    Remove the "listhead" argument from finish_block
    
    finish_block is only ever called with "&local_symbols" as the
    "listhead" argument.  So, remove this argument.
    
    gdb/ChangeLog
    2018-07-20  Tom Tromey  <tom@tromey.com>
    
    	* xcoffread.c (read_xcoff_symtab): Update.
    	* dwarf2read.c (read_func_scope, read_lexical_block_scope):
    	Update.
    	* dbxread.c (process_one_symbol): Update.
    	* coffread.c (coff_symtab_read): Update.
    	* buildsym.h (finish_block): Update.
    	* buildsym.c (finish_block): Remove "listhead" argument.
    	(end_symtab_get_static_block): Update.

Diff:
---
 gdb/ChangeLog    | 11 +++++++++++
 gdb/buildsym.c   |  5 ++---
 gdb/buildsym.h   |  1 -
 gdb/coffread.c   |  4 ++--
 gdb/dbxread.c    |  6 +++---
 gdb/dwarf2read.c |  4 ++--
 gdb/xcoffread.c  |  4 ++--
 7 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a8d2057..cfac8e0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,16 @@
 2018-07-20  Tom Tromey  <tom@tromey.com>
 
+	* xcoffread.c (read_xcoff_symtab): Update.
+	* dwarf2read.c (read_func_scope, read_lexical_block_scope):
+	Update.
+	* dbxread.c (process_one_symbol): Update.
+	* coffread.c (coff_symtab_read): Update.
+	* buildsym.h (finish_block): Update.
+	* buildsym.c (finish_block): Remove "listhead" argument.
+	(end_symtab_get_static_block): Update.
+
+2018-07-20  Tom Tromey  <tom@tromey.com>
+
 	* buildsym.h (class scoped_free_pendings): Remove constructor.
 	* buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
 	method.
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index d6c5393..4c15121 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -576,12 +576,11 @@ finish_block_internal (struct symbol *symbol,
 
 struct block *
 finish_block (struct symbol *symbol,
-	      struct pending **listhead,
 	      struct pending_block *old_blocks,
 	      const struct dynamic_prop *static_link,
 	      CORE_ADDR start, CORE_ADDR end)
 {
-  return finish_block_internal (symbol, listhead, old_blocks, static_link,
+  return finish_block_internal (symbol, &local_symbols, old_blocks, static_link,
 				start, end, 0, 0);
 }
 
@@ -1196,7 +1195,7 @@ end_symtab_get_static_block (CORE_ADDR end_addr, int expandable, int required)
       struct context_stack cstk = pop_context ();
 
       /* Make a block for the local symbols within.  */
-      finish_block (cstk.name, &local_symbols, cstk.old_blocks, NULL,
+      finish_block (cstk.name, cstk.old_blocks, NULL,
 		    cstk.start_addr, end_addr);
 
       if (!buildsym_compunit->m_context_stack.empty ())
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index e0668f8..10dce3e 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -144,7 +144,6 @@ extern struct symbol *find_symbol_in_list (struct pending *list,
 					   char *name, int length);
 
 extern struct block *finish_block (struct symbol *symbol,
-				   struct pending **listhead,
 				   struct pending_block *old_blocks,
 				   const struct dynamic_prop *static_link,
 				   CORE_ADDR start,
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 758cd49..2d7859b 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1135,7 +1135,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
 		enter_linenos (fcn_line_ptr, fcn_first_line,
 			       fcn_last_line, objfile);
 
-	      finish_block (cstk.name, &local_symbols, cstk.old_blocks,
+	      finish_block (cstk.name, cstk.old_blocks,
 			    NULL, cstk.start_addr,
 			    fcn_cs_saved.c_value
 			    + fcn_aux_saved.x_sym.x_misc.x_fsize
@@ -1177,7 +1177,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
 		    cs->c_value + ANOFFSET (objfile->section_offsets,
 					    SECT_OFF_TEXT (objfile));
 		  /* Make a block for the local symbols within.  */
-		  finish_block (0, &local_symbols, cstk.old_blocks, NULL,
+		  finish_block (0, cstk.old_blocks, NULL,
 				cstk.start_addr, tmpaddr);
 		}
 	      /* Now pop locals of block just finished.  */
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index b5cec28..e79d2a8 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2516,7 +2516,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
 	  cstk = pop_context ();
 
 	  /* Make a block for the local symbols within.  */
-	  block = finish_block (cstk.name, &local_symbols,
+	  block = finish_block (cstk.name,
 				cstk.old_blocks, NULL,
 				cstk.start_addr, cstk.start_addr + valu);
 
@@ -2603,7 +2603,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
 		  cstk.start_addr = valu;
 		}
 	      /* Make a block for the local symbols within.  */
-	      finish_block (0, &local_symbols, cstk.old_blocks, NULL,
+	      finish_block (0, cstk.old_blocks, NULL,
 			    cstk.start_addr, valu);
 	    }
 	}
@@ -2890,7 +2890,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name,
 
 		  cstk = pop_context ();
 		  /* Make a block for the local symbols within.  */
-		  block = finish_block (cstk.name, &local_symbols,
+		  block = finish_block (cstk.name,
 					cstk.old_blocks, NULL,
 					cstk.start_addr, valu);
 
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 62c87e6..e6a8a18 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -13685,7 +13685,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
 
   struct context_stack cstk = pop_context ();
   /* Make a block for the local symbols within.  */
-  block = finish_block (cstk.name, &local_symbols, cstk.old_blocks,
+  block = finish_block (cstk.name, cstk.old_blocks,
 			cstk.static_link, lowpc, highpc);
 
   /* For C++, set the block's scope.  */
@@ -13781,7 +13781,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
   if (local_symbols != NULL || (*get_local_using_directives ()) != NULL)
     {
       struct block *block
-        = finish_block (0, &local_symbols, cstk.old_blocks, NULL,
+        = finish_block (0, cstk.old_blocks, NULL,
 			cstk.start_addr, highpc);
 
       /* Note that recording ranges after traversing children, as we
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 98efa96..f8dd3e9 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1408,7 +1408,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
 		  break;
 		}
 
-	      finish_block (cstk.name, &local_symbols, cstk.old_blocks,
+	      finish_block (cstk.name, cstk.old_blocks,
 			    NULL, cstk.start_addr,
 			    (fcn_cs_saved.c_value
 			     + fcn_aux_saved.x_sym.x_misc.x_fsize
@@ -1499,7 +1499,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
 	      if (local_symbols && !outermost_context_p ())
 		{
 		  /* Make a block for the local symbols within.  */
-		  finish_block (cstk.name, &local_symbols,
+		  finish_block (cstk.name,
 				cstk.old_blocks, NULL,
 				cstk.start_addr,
 				(cs->c_value


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]