gdb/31: hppa_push_arguments alignment code is broken
Wed Feb 21 21:58:00 GMT 2001

>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
>Release:        CVS 2001-01-22

>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

This bug causes several tests in gdb.base/call-ar-st.exp
to fail, specifically "print_long_arg_list".

Run the gdb test suite.
Look at the results for "print_long_arg_list".
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.

More information about the Gdb-prs mailing list