This is the mail archive of the gdb-prs@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]
Other format: [Raw text]

gdb/644: internal error when opening object with no .data section


>Number:         644
>Category:       gdb
>Synopsis:       internal error when opening object with no .data section
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 13 11:18:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dan Becker
>Release:        5.1 and 5.2
>Organization:
>Environment:
solaris
>Description:
for an object file that has no .data section, when starting
gdb for that file, get error, preventing gdb from starting.

$ gdb bad.o
GNU gdb 5.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.6"...partial-stab.h:441: gdb-internal-error: sect_index_data not initialized

An internal GDB error was detected. ...

if I change the bad.c source file, to create an initialized
global variable (and hence creating a .data section),
no error.

problem does not appear to occur with version 5.0, but does
with 5.1 and 5.2

to workaround, add an initialized global variable to the
file so that there is a .data section.
>How-To-Repeat:
create a simple bad.c file with no .data section, and 
at least one global variable. then
compile with "gcc -g -c bad.c"

for example:

int junk;
foo(){junk++;}

then execute gdb bad.o
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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