This is the mail archive of the gdb-patches@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]

Re: [PATCH RFA] Call end_symtab() with SECT_OFF_TEXT (objfile)



Late reply. Sorry.

Yep, go ahead.

Elena



Kevin Buettner writes:
 > While digging around in the sources today, I noticed that there are
 > still a few places where end_symtab() is being called with 0 as its
 > third argument.  This used to be correct as it was the index of the
 > text section.  Now, however, it is possible for .text to be at a
 > section index other than zero, so it is necessary to use SECT_OFF_TEXT
 > to obtain this value.
 > 
 > I have *not* tested these changes since I don't have (fast) access
 > to the systems affected.  Even so, I think it's worth it to commit
 > these changes because the code is certainly wrong as is.
 > 
 > Okay to commit?
 > 
 > 	* coffread.c (coff_end_symtab): When calling end_symtab(),
 > 	use SECT_OFF_TEXT() instead of 0 to represent the .text
 > 	section.
 > 	* hp-symtab-read.c (hpread_expand_symtab): Likewise.
 > 	* hpread.c (hpread_expand_symtab, hpread_process_one_debug_symbol):
 > 	Likewise.
 > 
 > Index: coffread.c
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/coffread.c,v
 > retrieving revision 1.11
 > diff -u -p -r1.11 coffread.c
 > --- coffread.c	2000/08/07 15:02:48	1.11
 > +++ coffread.c	2000/09/08 23:33:56
 > @@ -475,7 +475,7 @@ coff_end_symtab (struct objfile *objfile
 >  
 >    last_source_start_addr = current_source_start_addr;
 >  
 > -  symtab = end_symtab (current_source_end_addr, objfile, 0);
 > +  symtab = end_symtab (current_source_end_addr, objfile, SECT_OFF_TEXT (objfile));
 >  
 >    if (symtab != NULL)
 >      free_named_symtabs (symtab->filename);
 > Index: hp-symtab-read.c
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/hp-symtab-read.c,v
 > retrieving revision 1.4
 > diff -u -p -r1.4 hp-symtab-read.c
 > --- hp-symtab-read.c	2000/07/30 01:48:25	1.4
 > +++ hp-symtab-read.c	2000/09/08 23:35:37
 > @@ -516,7 +516,7 @@ hpread_expand_symtab (struct objfile *ob
 >    current_objfile = NULL;
 >    hp_som_som_object_present = 1;	/* Indicate we've processed an HP SOM SOM file */
 >  
 > -  return end_symtab (text_offset + text_size, objfile, 0);
 > +  return end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
 >  }
 >  
 >  
 > Index: hpread.c
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/hpread.c,v
 > retrieving revision 1.5
 > diff -u -p -r1.5 hpread.c
 > --- hpread.c	2000/07/30 01:48:25	1.5
 > +++ hpread.c	2000/09/08 23:37:12
 > @@ -1064,7 +1064,7 @@ hpread_expand_symtab (struct objfile *ob
 >  
 >    current_objfile = NULL;
 >  
 > -  return end_symtab (text_offset + text_size, objfile, 0);
 > +  return end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
 >  }
 >  
 >  
 > @@ -1822,7 +1822,7 @@ hpread_process_one_debug_symbol (union d
 >  	case DNTT_TYPE_MODULE:
 >  	  /* Ending a module ends the symbol table for that module.  */
 >  	  valu = text_offset + text_size + offset;
 > -	  (void) end_symtab (valu, objfile, 0);
 > +	  (void) end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
 >  	  break;
 >  
 >  	case DNTT_TYPE_FUNCTION:
 > 

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