This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines
- From: Daniel Jacobowitz <drow at false dot org>
- To: Janani Janakiraman <janani at linux dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 3 Oct 2006 15:20:01 -0400
- Subject: Re: [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines
- References: <4522B5E2.mailKT8130U2Q@jananij.austin.ibm.com>
On Tue, Oct 03, 2006 at 02:11:30PM -0500, Janani Janakiraman wrote:
> This fixes a problem on Powerpc 64 machines while running gdb on 64 bit
> programs. The problem is with the alignment of the function arguments
> when they are pushed to the stack in the ppc64_sysv_abi_push_dummy_call.
> GCC expects the values to be right aligned.
Is Andrew's comment about the ABI correct, or incorrect? Do you know
for sure?
> ! /* WARNING: cagney/2003-09-21: As best I can
> ! tell, the ABI specifies that the value should
> ! be left aligned. Unfortunately, GCC doesn't
> ! do this - it instead right aligns even sized
> ! values and puts odd sized values on the
> ! stack. Work around that by putting both a
> ! left and right aligned value into the
> ! register (hopefully no one notices :-^).
> ! Arrrgh! */
--
Daniel Jacobowitz
CodeSourcery