This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/31: hppa_push_arguments alignment code is broken
- To: gdb-gnats at sources dot redhat dot com
- Subject: gdb/31: hppa_push_arguments alignment code is broken
- From: chastain at redhat dot com
- Date: 22 Feb 2001 05:57:32 -0000
- Reply-To: chastain at redhat dot com
>Number: 31
>Category: gdb
>Synopsis: hppa_push_arguments alignment code is broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 21 21:58:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: chastain@redhat.com
>Release: CVS 2001-01-22
>Organization:
>Environment:
hppa1.1-hp-hpux10.20
hppa1.1-hp-hpux11.00
>Description:
>From the PA-RISC Run-Time Architecture Document:
"Value parameters are mapped to a sequential list of argument
words with successive parameters mapping to successive argument words,
except 64-bit parameters, which must be aligned on 64-bit boundaries."
The 32-bit version of hppa_push_arguments has this code:
if ((bytes_reserved == 2 * REGISTER_SIZE)
&& (offset[i] % 2 * REGISTER_SIZE))
{
...
}
% and * have the same precedence and they associate
left-to-right!
This bug causes several tests in gdb.base/call-ar-st.exp
to fail, specifically "print_long_arg_list".
>How-To-Repeat:
Run the gdb test suite.
Look at the results for "print_long_arg_list".
>Fix:
First note that there are two versions of
hppa_push_arguments: a 64-bit version and a 32-bit version.
This bug is in the 32-bit version.
Then fix the precedence problem.
After fixing the precedence problem, some tests still FAIL.
There is tricky code here to deal with arguments with
lengths like 3 bytes and 5 bytes. It does not work in all
cases and it needs sorting out.
>Release-Note:
>Audit-Trail:
>Unformatted: