Remove the "listhead" argument from finish_block
authorTom Tromey <tom@tromey.com>
Mon, 21 May 2018 06:41:21 +0000 (00:41 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 20 Jul 2018 15:42:44 +0000 (09:42 -0600)
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.

gdb/ChangeLog
gdb/buildsym.c
gdb/buildsym.h
gdb/coffread.c
gdb/dbxread.c
gdb/dwarf2read.c
gdb/xcoffread.c

index a8d20576e6e3b4945f7652333dd9f458f69db8c1..cfac8e092570762982d76d50d777ec272861b1de 100644 (file)
@@ -1,3 +1,14 @@
+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.
index d6c5393958ae26ae39072bba37fcf26c75f47cf0..4c1512110444c20b9a41a85d107f72a4e7788c80 100644 (file)
@@ -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 ())
index e0668f8678d55c082e5f3ce6a17fc17fd8fb1d0f..10dce3edba85d62856942ce7f0488a48498d632c 100644 (file)
@@ -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,
index 758cd49b3947fdfc4ea0f52ac4c4f04bf8ed2845..2d7859bd5d109047ef4719cabc0edef7010445af 100644 (file)
@@ -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.  */
index b5cec28ae48b69aeb12dbc812e9c3e42f96bbe13..e79d2a858af60a5bdda386864e16e28f69ecc8e2 100644 (file)
@@ -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);
 
index 62c87e635e6554074b6d9bcaf2b991fbd9c6f9a4..e6a8a188b1970f55541f2db3c528d8352a50bdd8 100644 (file)
@@ -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
index 98efa969c3821123182d271acb8d2edf7519ec03..f8dd3e9e0a2b90b582b5b373eb610940f9a4f7fa 100644 (file)
@@ -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
This page took 0.04443 seconds and 4 git commands to generate.