From: jkb@mrc-lmb.CAm.ac.UK (James Bonfield)
Newsgroups: gnu.gdb.bug
Subject: gdb-4.6 with C and Fortran on Dec5000/240
Date: 28 Sep 92 12:32:50 GMT
Distribution: gnu
Organization: GNUs Not Usenet

Hello,

I'm using the following hardware/software:

Decstation 5000/240 running Ultrix 4.2. gdb version 4.6

Upon running gdb on a large (1Meg) binary comprised of both Fortran and C, I
get the following error :- (with 'set complaints 1')

During symbol reading, size of array target type not known, assuming 4 bits.

And then a Segmentation fault. Here's the stack trace of where things died.

(top-gdb) where
#0  ecoff_swap_tir_in (bigend=0, ext_copy=0x1049ddb4, intern=0x7fff9c6c)
    at coff-msym.c:270
#1  0x46ed48 in parse_type (ax=0x1049ddb4, bs=0x0, bigend=0)
    at ./mipsread.c:1383
#2  0x46db8c in parse_symbol (sh=0x10080080, ax=0x1009ddb8, bigend=0)
    at ./mipsread.c:987
#3  0x474b50 in psymtab_to_symtab_1 (pst=0x100cf060,
    filename=0x100cf0b8 "../dbsysnew.f") at ./mipsread.c:2469
#4  0x4743c0 in psymtab_to_symtab_1 (pst=0x10067ed8,
    filename=0x100cf038 "../bap.f") at ./mipsread.c:2336
#5  0x4743c0 in psymtab_to_symtab_1 (pst=0x10067e50,
    filename=0x10067e90 "./crt0.s") at ./mipsread.c:2336
#6  0x46c6a8 in mipscoff_psymtab_to_symtab (pst=0x10067e50) at ./mipsread.c:418
#7  0x42bcf0 in psymtab_to_symtab (pst=0x10067e50) at symfile.c:303
#8  0x426be0 in find_pc_symtab (pc=4194672) at symtab.c:992
#9  0x404ca8 in blockvector_for_pc (pc=4194672, pindex=0x7fff9ff0)
    at blockframe.c:441
#10 0x404e0c in block_for_pc (pc=4194672) at blockframe.c:491
#11 0x43f708 in find_proc_desc (pc=4194672, next_frame=0x0) at mips-tdep.c:232
#12 0x43fa28 in init_extra_frame_info (fci=0x1004a010) at mips-tdep.c:310
#13 0x4043c8 in create_new_frame (addr=0, pc=4194672) at blockframe.c:128
#14 0x431864 in wait_for_inferior () at infrun.c:862
#15 0x4314c8 in child_create_inferior (
    exec_file=0x10055b88 "/home3/jkb/common/src/gnu/gdb-4.6/gdb/bap",
    allargs=0x10048fd8 "", env=0x10050008) at infrun.c:645
#16 0x42f45c in run_command (args=0x0, from_tty=1) at infcmd.c:244
#17 0x401364 in execute_command (p=0x1004900b "", from_tty=1) at main.c:915
#18 0x401580 in command_loop () at main.c:976
#19 0x401114 in main (argc=2, argv=0x7fffa344) at main.c:853
(top-gdb)

Looking at the code I see the 'array target type' error is printed at line
1601 of file mipsread.c.  There's an above comment about not being certain of
the symbol format - I guess this shows the problem up. Has anyone else come
across this problem and been able to solve it?

Interestingly enough, Ultrix's dbx has many hassles in debugging the same
program, but none seemingly immediately related to this. gdb was compiled
using the native cc compiler, and the program being debugged using the c89
compiler. I have not got gcc for the Dec so I have not (yet) tested things
with this. I expect it would make little difference as the unknown array size
appears to spring from a Fortran piece of code - unless there's a GNU fortran
compiler out there?

Anyway - if anyone has some hints and tips on possible solutions to this
problem, or maybe how to track down precisely what is wrong then the info will
be gratefully received.

	Cheers,

		James Bonfield

jkb@mrc-lmba.cam.ac.uk
Newsgroups: gnu.gdb.bug