This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] *read.c -Wuninitialized fixes
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: Re: [rfa] *read.c -Wuninitialized fixes
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 27 Nov 2000 18:03:03 +1100
- References: <3A2206A3.EA2ACA96@cygnus.com>
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)