From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29196 invoked by alias); 24 Apr 2002 07:58:39 -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 29180 invoked from network); 24 Apr 2002 07:58:35 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 24 Apr 2002 07:58:35 -0000 Received: from romulus.sfbay.redhat.com (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id AAA08086; Wed, 24 Apr 2002 00:58:34 -0700 (PDT) Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g3O7wUj12270; Wed, 24 Apr 2002 00:58:30 -0700 Date: Wed, 24 Apr 2002 00:58:00 -0000 From: Kevin Buettner Message-Id: <1020424075830.ZM12269@localhost.localdomain> In-Reply-To: David Edelsohn "PowerPC64 skip_prologue patch" (Apr 23, 11:41pm) References: <200204240341.XAA30704@makai.watson.ibm.com> To: David Edelsohn Subject: Re: PowerPC64 skip_prologue patch Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00918.txt.bz2 On Apr 23, 11:41pm, David Edelsohn wrote: > What is the status of the PowerPC64 skip_prologue patch? Without > this patch, GDB does not recognize standard PowerPC64 prologue > instructions which makes debugging very difficult. I'm working on it. Since we don't have a copyright assignment for these changes, I've been told that I should pseudo-cleanroom it. Basically, what I'm going to do is look at the testsuite failures that occur on PowerPC64 without the patch that you've posted, do my own analysis, and create my own fixes. I fully expect that the patches that I come up with will look remarkably similar to the ones that you've posted. (Sigh.) BTW, the patch you've just posted has more than just skip_prologue() changes in it. The following portions have already been dealt with: > @@ -842,9 +878,6 @@ > int nargs, struct value **args, struct type *type, > int gcc_p) > { > -#define TOC_ADDR_OFFSET 20 > -#define TARGET_ADDR_OFFSET 28 > - > int ii; > CORE_ADDR target_addr; > The above was taken care of by: 2002-04-08 Kevin Buettner From Jimi X : * rs6000-tdep.c (rs6000_fix_call_dummy): Delete unused macro definitions for TOC_ADDR_OFFSET and TARGET_ADDR_OFFSET. > @@ -975,7 +1008,8 @@ > ran_out_of_registers_for_arguments: > > saved_sp = read_sp (); > -#ifndef ELF_OBJECT_FORMAT > + > +#if !defined (ELF_OBJECT_FORMAT) || defined (ELF64_OBJECT_FORMAT) > /* location for 8 parameters are always reserved. */ > sp -= wordsize * 8; > > @@ -984,7 +1018,7 @@ > > /* stack pointer must be quadword aligned */ > sp &= -16; > -#endif > +#endif /* ! ELF_OBJECT_FORMAT || ELF64_OBJECT_FORMAT */ > > /* if there are more arguments, allocate space for them in > the stack, then push them starting from the ninth one. */ For the above patch, I decided that ELF_OBJECT_FORMAT was no longer needed. So I did: 2002-04-08 Kevin Buettner * config/powerpc/tm-ppc-eabi.h (ELF_OBJECT_FORMAT): Delete. * rs6000-tdep.c (rs6000_push_arguments): Eliminate ELF_OBJECT_FORMAT ifdef. > @@ -1284,6 +1318,16 @@ > if (fi->next->signal_handler_caller) > return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET, > wordsize); > + else if (wordsize == 8) > + { > + /* FIXME: If this is ever called, cause skip prologue should > + get it right, then on a 64-bit target DEFAULT_LR_SAVE is > + different (should be 16 not 8), if target is 32 bits then > + we let the definition decide since it is ABI > + dependent. */ > + return read_memory_addr (FRAME_CHAIN (fi) + 16, > + wordsize); > + } > else > return read_memory_addr (FRAME_CHAIN (fi) + DEFAULT_LR_SAVE, > wordsize); I dealt with this differently too... 2002-04-12 Kevin Buettner * ppc-tdep.h (struct gdbarch_tdep): Add new member ``lr_frame_offset''. * rs6000-tdep.c (rs6000_frame_saved_pc): Use ``lr_frame_offset'' from tdep struct instead of DEFAULT_LR_SAVE. (rs6000_gdbarch_init): Initialize ``lr_frame_offset''. * config/powerpc/tm-ppc-eabi.h (DEFAULT_LR_SAVE): Delete. * config/rs6000/tm-rs6000.h (DEFAULT_LR_SAVE): Delete.