From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31355 invoked by alias); 16 Aug 2002 03:11:19 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31346 invoked from network); 16 Aug 2002 03:11:18 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 16 Aug 2002 03:11:18 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id UAA18571; Thu, 15 Aug 2002 20:07:09 -0700 (PDT) Message-ID: <3D5C6970.C1E4DA47@redhat.com> Date: Thu, 15 Aug 2002 20:11:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Andrew Cagney CC: gdb-patches@sources.redhat.com, cagney@redhat.com Subject: Re: [PATCH] mips gdbarch-ification References: <3D5C50C5.A666EDF9@redhat.com> <3D5C5866.2070607@ges.redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-08/txt/msg00407.txt.bz2 Andrew Cagney wrote: > > Michael, > > The below should not be part of this change, be sure to not commit it. > > (but thanks for cleaning up those methods) > Andrew Yoiks! I must have diffed the wrong file. Don't worry, (somehow) I managed to check in (only) the right changes. This is what comes of having so many patches outstanding (hint hint) > > *************** mips_frame_chain (struct frame_info *fra > > *** 2294,2302 **** > > we loop forever if we see a zero size frame. */ > > if (PROC_FRAME_REG (proc_desc) == SP_REGNUM > > && PROC_FRAME_OFFSET (proc_desc) == 0 > > ! /* The previous frame from a sigtramp frame might be frameless > > ! and have frame size zero. */ > > ! && !frame->signal_handler_caller) > > return 0; > > else > > return get_frame_pointer (frame, proc_desc); > > --- 2302,2312 ---- > > we loop forever if we see a zero size frame. */ > > if (PROC_FRAME_REG (proc_desc) == SP_REGNUM > > && PROC_FRAME_OFFSET (proc_desc) == 0 > > ! /* The previous frame from a sigtramp frame might be frameless > > ! and have frame size zero. */ > > ! && !frame->signal_handler_caller > > ! /* Check if this is a call dummy frame. */ > > ! && frame->pc != mips_call_dummy_address ()) > > return 0; > > else > > return get_frame_pointer (frame, proc_desc); > > *************** mips_o32o64_push_arguments (int nargs, > > *** 2959,2965 **** > > argreg = A0_REGNUM; > > float_argreg = FPA0_REGNUM; > > > > ! /* the struct_return pointer occupies the first parameter-passing reg */ > > if (struct_return) > > { > > if (mips_debug) > > --- 2969,2975 ---- > > argreg = A0_REGNUM; > > float_argreg = FPA0_REGNUM; > > > > ! /* The struct_return pointer occupies the first parameter-passing reg. */ > > if (struct_return) > > { > > if (mips_debug) > > *************** mips_pop_frame (void) > > *** 3346,3358 **** > > if (frame->saved_regs == NULL) > > FRAME_INIT_SAVED_REGS (frame); > > for (regnum = 0; regnum < NUM_REGS; regnum++) > > ! { > > ! if (regnum != SP_REGNUM && regnum != PC_REGNUM > > ! && frame->saved_regs[regnum]) > > ! write_register (regnum, > > ! read_memory_integer (frame->saved_regs[regnum], > > ! MIPS_SAVED_REGSIZE)); > > ! } > > write_register (SP_REGNUM, new_sp); > > flush_cached_frames (); > > > > --- 3356,3377 ---- > > if (frame->saved_regs == NULL) > > FRAME_INIT_SAVED_REGS (frame); > > for (regnum = 0; regnum < NUM_REGS; regnum++) > > ! if (regnum != SP_REGNUM && regnum != PC_REGNUM > > ! && frame->saved_regs[regnum]) > > ! { > > ! /* Floating point registers must not be sign extended, > > ! in case MIPS_SAVED_REGSIZE = 4 but sizeof (FP0_REGNUM) == 8. */ > > ! > > ! if (FP0_REGNUM <= regnum && regnum < FP0_REGNUM + 32) > > ! write_register (regnum, > > ! read_memory_unsigned_integer (frame->saved_regs[regnum], > > ! MIPS_SAVED_REGSIZE)); > > ! else > > ! write_register (regnum, > > ! read_memory_integer (frame->saved_regs[regnum], > > ! MIPS_SAVED_REGSIZE)); > > ! } > > ! > > write_register (SP_REGNUM, new_sp); > > flush_cached_frames (); > > > > *************** return_value_location (struct type *valt > > *** 4079,4093 **** > > if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG > > && len < MIPS_SAVED_REGSIZE) > > { > > ! /* "un-left-justify" the value in the low register */ > > ! lo->reg_offset = MIPS_SAVED_REGSIZE - len; > > ! lo->len = len; > > hi->reg_offset = 0; > > hi->len = 0; > > } > > else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG > > && len > MIPS_SAVED_REGSIZE /* odd-size structs */ > > && len < MIPS_SAVED_REGSIZE * 2 > > && (TYPE_CODE (valtype) == TYPE_CODE_STRUCT || > > TYPE_CODE (valtype) == TYPE_CODE_UNION)) > > { > > --- 4098,4125 ---- > > if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG > > && len < MIPS_SAVED_REGSIZE) > > { > > ! if ((gdbarch_tdep (current_gdbarch) -> mips_abi == MIPS_ABI_N32 > > ! || gdbarch_tdep (current_gdbarch) -> mips_abi == MIPS_ABI_N64) > > ! && (TYPE_CODE (valtype) == TYPE_CODE_STRUCT > > ! || TYPE_CODE (valtype) == TYPE_CODE_UNION)) > > ! { > > ! /* Values are already aligned in the low register. */ > > ! lo->reg_offset = 0; > > ! } > > ! else > > ! { > > ! /* "un-left-justify" the value in the low register */ > > ! lo->reg_offset = MIPS_SAVED_REGSIZE - len; > > ! } > > hi->reg_offset = 0; > > + lo->len = len; > > hi->len = 0; > > } > > else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG > > && len > MIPS_SAVED_REGSIZE /* odd-size structs */ > > && len < MIPS_SAVED_REGSIZE * 2 > > + && gdbarch_tdep (current_gdbarch) -> mips_abi != MIPS_ABI_N32 > > + && gdbarch_tdep (current_gdbarch) -> mips_abi != MIPS_ABI_N64 > > && (TYPE_CODE (valtype) == TYPE_CODE_STRUCT || > > TYPE_CODE (valtype) == TYPE_CODE_UNION)) > > {