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: [rfa] *read.c -Wuninitialized fixes



Better late than never.....

Yes Ok. I committed this given it has been sitting there for sooo long....

Elena


Andrew Cagney writes:
 > And the patch ....	* coffread.c (coff_symtab_read): Initialize
 >  	``fcn_first_line_addr''.  Check that the ``.bf'' always preceeds
 >  	the ``.ef'' info.
 > 	* dbxread.c (find_text_range): Initialize ``start'' and ``end''.
 > 
 > Index: coffread.c
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/coffread.c,v
 > retrieving revision 1.12
 > diff -p -r1.12 coffread.c
 > *** coffread.c	2000/10/24 21:13:08	1.12
 > --- coffread.c	2000/11/27 06:53:51
 > *************** coff_symtab_read (long symtab_offset, un
 > *** 747,753 ****
 >     char *filestring = "";
 >     int depth = 0;
 >     int fcn_first_line = 0;
 > !   CORE_ADDR fcn_first_line_addr;
 >     int fcn_last_line = 0;
 >     int fcn_start_addr = 0;
 >     long fcn_line_ptr = 0;
 > --- 747,753 ----
 >     char *filestring = "";
 >     int depth = 0;
 >     int fcn_first_line = 0;
 > !   CORE_ADDR fcn_first_line_addr = 0;
 >     int fcn_last_line = 0;
 >     int fcn_start_addr = 0;
 >     long fcn_line_ptr = 0;
 > *************** coff_symtab_read (long symtab_offset, un
 > *** 1016,1021 ****
 > --- 1016,1023 ----
 >   	    }
 >   	  else if (STREQ (cs->c_name, ".ef"))
 >   	    { 
 > + 	      if (!within_function)
 > + 		error ("Bad coff function information\n");
 >   	      /* the value of .ef is the address of epilogue code;
 >   	         not useful for gdb.  */
 >   	      /* { main_aux.x_sym.x_misc.x_lnsz.x_lnno
 > Index: dbxread.c
 > ===================================================================
 > RCS file: /cvs/src/src/gdb/dbxread.c,v
 > retrieving revision 1.9
 > diff -p -r1.9 dbxread.c
 > *** dbxread.c	2000/09/01 23:45:13	1.9
 > --- dbxread.c	2000/11/27 06:53:58
 > *************** find_text_range (bfd * sym_bfd, struct o
 > *** 213,219 ****
 >   {
 >     asection *sec;
 >     int found_any = 0;
 > !   CORE_ADDR start, end;
 >   
 >     for (sec = sym_bfd->sections; sec; sec = sec->next)
 >       if (bfd_get_section_flags (sym_bfd, sec) & SEC_CODE)
 > --- 213,220 ----
 >   {
 >     asection *sec;
 >     int found_any = 0;
 > !   CORE_ADDR start = 0;
 > !   CORE_ADDR end = 0;
 >   
 >     for (sec = sym_bfd->sections; sec; sec = sec->next)
 >       if (bfd_get_section_flags (sym_bfd, sec) & SEC_CODE)


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