From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6672 invoked by alias); 5 Jun 2002 21:41:29 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6665 invoked from network); 5 Jun 2002 21:41:29 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 5 Jun 2002 21:41:29 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id DA97C3E16; Wed, 5 Jun 2002 17:41:42 -0400 (EDT) Message-ID: <3CFE8596.4010401@cygnus.com> Date: Wed, 05 Jun 2002 14:41:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0rc3) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: GDB broken on MIPS targets with unmarked binaries References: <20020605200429.GA7956@nevyn.them.org> <3CFE7825.2030001@cygnus.com> <20020605205834.GA22729@nevyn.them.org> <20020605210838.GA518@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00055.txt.bz2 > The expansion appears to be: >> tdep->mips_fp_register_double = (((((38) >= 38 && (38) < 38 +32) ? >> builtin_type_float : ((38) == 32 ) ? >> builtin_type_uint32 : ((38) >= 70 && (38) <= 89) ? >> builtin_type_uint32 : >> builtin_type_int))->main_type->length == 8); >> >> I can't see any reason for it to crash; I haven't reproduced this >> locally yet, although I'm working on it. The above expansion came from >> the second person to mention this to me. > > > I believe you're right about the patch at fault, though I don't know > what to do about it. This makes builtin_type_int == NULL during > evaluation of that expression, along with all the others. The patch isn't `at fault' - it is detecting a fault in mips_tdep.c :-) builtin_type_float would have contained a value from the previously selected ISA. That code is trying to reverse engineer the header files to figure out what the default should be for the given target. I think better would be to is set mips_fp_register_double=-1 and then change FP_REGISTER_DOUBLE to a real function (gdb multi-arch can now be assumed) that, when -1, apply the above logic (and even update the result). enjoy, Andrew