This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: symtab/644: internal error when opening object with no .datasection
- From: Brian Taylor <briant at model dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 7 Apr 2003 20:38:01 -0000
- Subject: Re: symtab/644: internal error when opening object with no .datasection
- Reply-to: Brian Taylor <briant at model dot com>
The following reply was made to PR symtab/644; it has been noted by GNATS.
From: Brian Taylor <briant at model dot com>
To: nobody at sources dot redhat dot com, gdb-gnats at sources dot redhat dot com,
dcbecker at lucent dot com, gdb-prs at sources dot redhat dot com
Cc:
Subject: Re: symtab/644: internal error when opening object with no .data
section
Date: Mon, 07 Apr 2003 13:28:28 -0700
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=644
I have made a small change to gdb/dbxread.c which avoids the assumption
of having a .data section.
The following diff -c compares the gdb version 5.3 (dbxread.c.orig) with
the modified dbxread.c.
*** dbxread.c.orig 2003-03-10 13:47:12.000000000 -0800
--- dbxread.c 2003-03-13 18:22:17.000000000 -0800
***************
*** 1274,1280 ****
CORE_ADDR last_function_start = 0;
struct cleanup *back_to;
bfd *abfd;
! int textlow_not_set;
/* Current partial symtab */
struct partial_symtab *pst;
--- 1274,1280 ----
CORE_ADDR last_function_start = 0;
struct cleanup *back_to;
bfd *abfd;
! int textlow_not_set, sect_index = -1;
/* Current partial symtab */
struct partial_symtab *pst;
***************
*** 1729,1735 ****
switch (p[1])
{
case 'S':
! nlist.n_value += ANOFFSET (objfile->section_offsets,
SECT_OFF_DATA (objfile));
#ifdef STATIC_TRANSFORM_NAME
namestring = STATIC_TRANSFORM_NAME (namestring);
#endif
--- 1729,1738 ----
switch (p[1])
{
case 'S':
! if ((sect_index = objfile->sect_index_data) == -1) {
! sect_index = SECT_OFF_BSS (objfile);
! }
! nlist.n_value += ANOFFSET (objfile->section_offsets, sect_index);
#ifdef STATIC_TRANSFORM_NAME
namestring = STATIC_TRANSFORM_NAME (namestring);
#endif
***************
*** 1740,1746 ****
psymtab_language, objfile);
continue;
case 'G':
! nlist.n_value += ANOFFSET (objfile->section_offsets,
SECT_OFF_DATA (objfile));
/* The addresses in these entries are reported to be
wrong. See the code that reads 'G's for symtabs. */
add_psymbol_to_list (namestring, p - namestring,
--- 1743,1752 ----
psymtab_language, objfile);
continue;
case 'G':
! if ((sect_index = objfile->sect_index_data) == -1) {
! sect_index = SECT_OFF_BSS (objfile);
! }
! nlist.n_value += ANOFFSET (objfile->section_offsets, sect_index);
/* The addresses in these entries are reported to be
wrong. See the code that reads 'G's for symtabs. */
add_psymbol_to_list (namestring, p - namestring,