This is the mail archive of the gdb@sources.redhat.com 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]

dwarf2read crash


GDB will currently crash whenever the child is re-run.  This due
to failure to flush the cache created here:

  2000-05-30  Daniel Berlin  <dan@cgsoftware.com>

        * dwarf2read.c (TYPE_HASH_SIZE): New define for controlling size
        of type hash.
        (dwarf2_cached_types): New variable that is the cached types.
        (tag_type_to_type): Do the actual caching of types here.


r~


	* dwarf2read.c (dwarf2_empty_hash_tables): Renamed from
	dwarf2_empty_die_ref_table; zero dwarf2_cached_types as well.
	Update all callers.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/dwarf2read.c,v
retrieving revision 2.47
diff -c -p -d -r2.47 dwarf2read.c
*** dwarf2read.c	2000/07/12 09:27:55	2.47
--- dwarf2read.c	2000/07/13 00:34:43
*************** void dump_die_list (struct die_info *);
*** 737,743 ****
  
  void store_in_ref_table (unsigned int, struct die_info *);
  
! static void dwarf2_empty_die_ref_table (void);
  
  static unsigned int dwarf2_get_ref_die_offset (struct attribute *);
  
--- 737,743 ----
  
  void store_in_ref_table (unsigned int, struct die_info *);
  
! static void dwarf2_empty_hash_tables (void);
  
  static unsigned int dwarf2_get_ref_die_offset (struct attribute *);
  
*************** read_comp_unit (info_ptr, abfd)
*** 2914,2921 ****
    char *cur_ptr;
    int nesting_level;
  
!   /* Reset die reference table, we are building a new one now. */
!   dwarf2_empty_die_ref_table ();
  
    cur_ptr = info_ptr;
    nesting_level = 0;
--- 2914,2922 ----
    char *cur_ptr;
    int nesting_level;
  
!   /* Reset die reference table and cached types table; we are
!      building new ones now.  */
!   dwarf2_empty_hash_tables ();
  
    cur_ptr = info_ptr;
    nesting_level = 0;
*************** store_in_ref_table (offset, die)
*** 5613,5621 ****
  
  
  static void
! dwarf2_empty_die_ref_table ()
  {
    memset (die_ref_table, 0, sizeof (die_ref_table));
  }
  
  static unsigned int
--- 5614,5623 ----
  
  
  static void
! dwarf2_empty_hash_tables ()
  {
    memset (die_ref_table, 0, sizeof (die_ref_table));
+   memset (dwarf2_cached_types, 0, sizeof(dwarf2_cached_types));
  }
  
  static unsigned int

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