From b9179dbce95be8ab496758e27909ad5ea2cdd8cd Mon Sep 17 00:00:00 2001 From: Elena Zannoni Date: Mon, 26 Mar 2001 02:48:23 +0000 Subject: [PATCH] 2001-03-25 Elena Zannoni From Andrew Cagney * 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''. --- gdb/ChangeLog | 9 +++++++++ gdb/coffread.c | 4 +++- gdb/dbxread.c | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3dfb65e3d27..38efd9f4c0b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2001-03-25 Elena Zannoni + + From Andrew Cagney + + * 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''. + 2001-03-23 Andrew Cagney * config/sparc/tm-sp64.h (GDB_MULTI_ARCH): Down grade to diff --git a/gdb/coffread.c b/gdb/coffread.c index 526e0e40c9e..7f775de49f2 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -740,7 +740,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, char *filestring = ""; int depth = 0; int fcn_first_line = 0; - CORE_ADDR fcn_first_line_addr; + CORE_ADDR fcn_first_line_addr = 0; int fcn_last_line = 0; int fcn_start_addr = 0; long fcn_line_ptr = 0; @@ -1009,6 +1009,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, } 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 diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 56a1ccddf2d..0452e5b2400 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -213,7 +213,8 @@ find_text_range (bfd * sym_bfd, struct objfile *objfile) { asection *sec; int found_any = 0; - CORE_ADDR start, end; + 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) -- 2.30.2