From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12003 invoked by alias); 22 Jan 2002 18:01:32 -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 11931 invoked from network); 22 Jan 2002 18:01:22 -0000 Received: from unknown (HELO localhost.cygnus.com) (216.138.202.10) by sources.redhat.com with SMTP; 22 Jan 2002 18:01:22 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id B8F543F18; Tue, 22 Jan 2002 13:01:20 -0500 (EST) Message-ID: <3C4DA8F0.7040102@cygnus.com> Date: Tue, 22 Jan 2002 10:01:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.7) Gecko/20020103 X-Accept-Language: en-us MIME-Version: 1.0 To: Richard.Earnshaw@arm.com Cc: gdb@sources.redhat.com Subject: Re: ARM floating point regs regression References: <200201221729.RAA05113@cam-mail2.cambridge.arm.com> Content-Type: multipart/mixed; boundary="------------030003020906010001060906" X-SW-Source: 2002-01/txt/msg00245.txt.bz2 This is a multi-part message in MIME format. --------------030003020906010001060906 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1054 > I don't know how but almost all the lines initializing TYPE_FLOATFORMAT >> were lost. >> (try the attached, if it works, I'll add a few extra assertions so that the coredump can't occure). > > > Hmm, I think I understand why it is failing. > > Although the FPA has an extended float format (which is used for stacking > regs across function calls), this type isn't used for "long double". So I > suspect the initialization code in gdbtypes.c is not setting it up > correctly for this case. It shouldn't have got that far. the FPA extended float should have TYPE_FLOATFORMAT set so that GDB can correctly and directly manipulate the floating point value - no conversions being needed. The above should stop this. Only as a last resort should gdb be trying to map a floating point type onto one of float, double or long double. BTW, it didn't work this way in the past. In the ``good old days'' GDB would convert hardware floating point formats into float, double, or long double (no matter how lossy that process was). Andrew --------------030003020906010001060906 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 4742 2002-01-22 Andrew Cagney * gdbtypes.c (_initialize_gdbtypes): Initialize TYPE_FLOATFORMAT for builtin_type_ieee_single_little, builtin_type_ieee_double_big, builtin_type_ieee_double_little, builtin_type_ieee_double_littlebyte_bigword, builtin_type_m68881_ext, builtin_type_i960_ext, builtin_type_m88110_ext, builtin_type_m88110_harris_ext, builtin_type_arm_ext_big, builtin_type_arm_ext_littlebyte_bigword, builtin_type_ia64_spill_big, builtin_type_ia64_spill_little and builtin_type_ia64_quad_big, builtin_type_ia64_quad_little. Index: gdbtypes.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtypes.c,v retrieving revision 1.37 diff -p -r1.37 gdbtypes.c *** gdbtypes.c 2002/01/20 19:42:04 1.37 --- gdbtypes.c 2002/01/22 17:54:14 *************** _initialize_gdbtypes (void) *** 3328,3342 **** --- 3328,3346 ---- builtin_type_ieee_single_little = init_type (TYPE_CODE_FLT, floatformat_ieee_single_little.totalsize / 8, 0, "builtin_type_ieee_single_little", NULL); + TYPE_FLOATFORMAT (builtin_type_ieee_single_little) = &floatformat_ieee_single_little; builtin_type_ieee_double_big = init_type (TYPE_CODE_FLT, floatformat_ieee_double_big.totalsize / 8, 0, "builtin_type_ieee_double_big", NULL); + TYPE_FLOATFORMAT (builtin_type_ieee_double_big) = &floatformat_ieee_double_big; builtin_type_ieee_double_little = init_type (TYPE_CODE_FLT, floatformat_ieee_double_little.totalsize / 8, 0, "builtin_type_ieee_double_little", NULL); + TYPE_FLOATFORMAT (builtin_type_ieee_double_little) = &floatformat_ieee_double_little; builtin_type_ieee_double_littlebyte_bigword = init_type (TYPE_CODE_FLT, floatformat_ieee_double_littlebyte_bigword.totalsize / 8, 0, "builtin_type_ieee_double_littlebyte_bigword", NULL); + TYPE_FLOATFORMAT (builtin_type_ieee_double_littlebyte_bigword) = &floatformat_ieee_double_littlebyte_bigword; builtin_type_i387_ext = init_type (TYPE_CODE_FLT, floatformat_i387_ext.totalsize / 8, 0, "builtin_type_i387_ext", NULL); *************** _initialize_gdbtypes (void) *** 3344,3376 **** --- 3348,3390 ---- builtin_type_m68881_ext = init_type (TYPE_CODE_FLT, floatformat_m68881_ext.totalsize / 8, 0, "builtin_type_m68881_ext", NULL); + TYPE_FLOATFORMAT (builtin_type_m68881_ext) = &floatformat_m68881_ext; builtin_type_i960_ext = init_type (TYPE_CODE_FLT, floatformat_i960_ext.totalsize / 8, 0, "builtin_type_i960_ext", NULL); + TYPE_FLOATFORMAT (builtin_type_i960_ext) = &floatformat_i960_ext; builtin_type_m88110_ext = init_type (TYPE_CODE_FLT, floatformat_m88110_ext.totalsize / 8, 0, "builtin_type_m88110_ext", NULL); + TYPE_FLOATFORMAT (builtin_type_m88110_ext) = &floatformat_m88110_ext; builtin_type_m88110_harris_ext = init_type (TYPE_CODE_FLT, floatformat_m88110_harris_ext.totalsize / 8, 0, "builtin_type_m88110_harris_ext", NULL); + TYPE_FLOATFORMAT (builtin_type_m88110_harris_ext) = &floatformat_m88110_harris_ext; builtin_type_arm_ext_big = init_type (TYPE_CODE_FLT, floatformat_arm_ext_big.totalsize / 8, 0, "builtin_type_arm_ext_big", NULL); + TYPE_FLOATFORMAT (builtin_type_arm_ext_big) = &floatformat_arm_ext_big; builtin_type_arm_ext_littlebyte_bigword = init_type (TYPE_CODE_FLT, floatformat_arm_ext_littlebyte_bigword.totalsize / 8, 0, "builtin_type_arm_ext_littlebyte_bigword", NULL); + TYPE_FLOATFORMAT (builtin_type_arm_ext_littlebyte_bigword) = &floatformat_arm_ext_littlebyte_bigword; builtin_type_ia64_spill_big = init_type (TYPE_CODE_FLT, floatformat_ia64_spill_big.totalsize / 8, 0, "builtin_type_ia64_spill_big", NULL); + TYPE_FLOATFORMAT (builtin_type_ia64_spill_big) = &floatformat_ia64_spill_big; builtin_type_ia64_spill_little = init_type (TYPE_CODE_FLT, floatformat_ia64_spill_little.totalsize / 8, 0, "builtin_type_ia64_spill_little", NULL); + TYPE_FLOATFORMAT (builtin_type_ia64_spill_little) = &floatformat_ia64_spill_little; builtin_type_ia64_quad_big = init_type (TYPE_CODE_FLT, floatformat_ia64_quad_big.totalsize / 8, 0, "builtin_type_ia64_quad_big", NULL); + TYPE_FLOATFORMAT (builtin_type_ia64_quad_big) = &floatformat_ia64_quad_big; builtin_type_ia64_quad_little = init_type (TYPE_CODE_FLT, floatformat_ia64_quad_little.totalsize / 8, 0, "builtin_type_ia64_quad_little", NULL); + TYPE_FLOATFORMAT (builtin_type_ia64_quad_little) = &floatformat_ia64_quad_little; add_show_from_set ( add_set_cmd ("overload", no_class, var_zinteger, (char *) &overload_debug, --------------030003020906010001060906--