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]

gdb and binutils branch master updated. 7bab9b58fd9c05c20cbd56d778ffa05d9fe3af3e


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  7bab9b58fd9c05c20cbd56d778ffa05d9fe3af3e (commit)
      from  f194fefb5e345e8c3b55de1d957bc6d7b95667ad (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

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

commit 7bab9b58fd9c05c20cbd56d778ffa05d9fe3af3e
Author: Doug Evans <xdje42@gmail.com>
Date:   Tue Nov 18 08:28:04 2014 -0800

    Split up end_symtab_from_static_block into two.
    
    This patch is conceptually quite simple.
    If you look at end_symtab_from_static_block you'll see
    that the static_block == NULL case is completely different
    than the non-NULL case.
    
    There's a lot of complexity to handle the NULL case but it seems
    entirely unnecessary.  For example, whether blockvector is NULL
    is decided at the start, before this for loop:
    
      for (subfile = subfiles; subfile; subfile = nextsub)
    
    Secondly, after the for loop, we test symtab for non-NULL here:
    
      /* Set this for the main source file.  */
      if (symtab)
    
    but symtab will only ever be non-NULL if blockvector was non-NULL.
    And if blockvector was non_NULL so will symtab.
    
    The other case to consider is these lines of code executed before
    the for loop:
    
      /* Read the line table if it has to be read separately.
         This is only used by xcoffread.c.  */
      if (objfile->sf->sym_read_linetable != NULL)
        objfile->sf->sym_read_linetable (objfile);
    
      /* Handle the case where the debug info specifies a different path
         for the main source file.  It can cause us to lose track of its
         line number information.  */
      watch_main_source_file_lossage ();
    
    From my reading of the code, neither of these is useful
    in the static_block == NULL case.
    
    Thus we can make the code more readable by splitting these two cases up,
    which is what this patch does.
    
    gdb/ChangeLog:
    
    	* buildsym.c (main_subfile): New static global.
    	(free_subfiles_list): New function.
    	(start_symtab): Set main_subfile.
    	(restart_symtab): Replace init of subfiles, current_subfile with
    	call to free_subfiles_list.
    	(watch_main_source_file_lossage): Use main_subfile.
    	(reset_symtab_globals): Replace init of current_subfile with call
    	to free_subfiles_list.
    	(end_symtab_without_blockvector, end_symtab_with_blockvector): New
    	functions, split out from ...
    	(end_symtab_from_static_block): ... here.  Rewrite to call them.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog  |   14 ++
 gdb/buildsym.c |  408 +++++++++++++++++++++++++++++--------------------------
 2 files changed, 229 insertions(+), 193 deletions(-)


hooks/post-receive
-- 
gdb and binutils


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