Subject: Re: dbx information on hpfcc

From: Zheng Gengbing <[email-masked]>
Date: Thu, 11 Apr 1996 09:05:26 +0800 (EAT)

On Wed, 10 Apr 1996, Guansong Zhang wrote:

> here may be something useful.
> 
> % dbx
> dbx Version 3.1.
> Type 'help' for help.
> enter object file name (default is `a.out', ^=BB to exit): hpfcc
> reading symbolic information ...
> 
> (dbx) run -l intrinsic.dep
> 
> segmentation violation in strcasecmp at 0xd00e7c4c
> 0xd00e7c4c (strcasecmp+0x4) 89040000        lbz   r8,0x0(r4)
> 
> (dbx) where
> 
> strcasecmp(0x2005cc58, 0x11e6ea) at 0xd00e7c4c
> look_up_record(symbol =3D 0x2007aad8), line 58 in "checktype.c"
> sub_hedr_check(thisbfnd =3D 0x200607d0), line 595 in "ym.c"
> function_stmt(), line 503 in "ym.c"
> check_specification_stmt(cur_bfnd =3D 0x200607d0), line 387 in "hpfcc.c"
> check_one_program_unit(unit_hdr =3D 0x20060604, unit_end =3D (nil)), line=
>  208 in
> "hpfcc.c"
> semantic_check(), line 129 in "hpfcc.c"
> main(argc =3D 2, argv =3D 0x2ff7fcc0, envp =3D 0x2ff7fcc8), line 105 in "=
> hpfcc.c"
> 

	Ok , After debug the same point in our machine , I found the problem.
Now , I'm sure it will be ok about this kind of core dump.

	In our machine & RS6000 AIX4.1 , they can endure that:
			strcasecmp( symbol , NULL) ,
                     			     ^^^^
but your machine seems cannot affort .

	I will pay attention to this later .

	The only place I modified is in file 'checktype.c'
Line 57:
		for (temp = global_default; temp; temp = temp->thread) { <<<
   >>>>>>           if (temp->variant != T_RECORD ) continue;   <<<<<
                    if (!strcasecmp(symbol->ident, temp->name->ident)
                        && temp->variant==T_RECORD  && p==temp->name->scope)
                        return temp;
                } <<<<<

	You can get the *1.27 now , I hope it will reduce some of the core dump
in testsuite .

Thanks a lot ,

Zheng Gengbin