Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Joel Brobecker'" <brobecker@adacore.com>, <gdb-patches@sourceware.org>
Cc: "'Mark Kettenis'" <mark.kettenis@xs4all.nl>
Subject: RE: [RFC-v2] amd64-windows: Fix funcall with by-pointer arguments
Date: Tue, 24 Sep 2013 22:02:00 -0000	[thread overview]
Message-ID: <000301ceb971$b0cdbf80$12693e80$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <1380040404-16932-1-git-send-email-brobecker@adacore.com>

  Following your commit,
I was able to recheck my code,
as you rebased it in:

https://sourceware.org/ml/gdb-patches/2013-09/msg00784.html

It still applies cleanly.

I ran I small script (in order to avoid running the whole testsuite,
as it takes ages for mingw hosts due to losts of timeouts...)

Here is the script:

>>>>>>>>>>>>>>>>>>>>Start of script 
#!/bin/bash

builddir=~/gdbcvs/build-cross-src-mingw64
srcdir=~/gdbcvs/src/gdb

# Obtained by grep -E '"(call|p|print) +[A-Za-z_][a-zA-Z0-9_]* *(' */*.exp
# in testsuite sub-directory

exp_list=`cd $srcdir/testsuite; grep  -E '"(call|p|print)
+[a-zA-Z_][a-zA-Z0-9_]
* *\(' */*exp -l`

exp_list=`echo ${exp_list} | tr '\n' ' '`

echo "exp_list is $exp_list"

function runtests {
cd $builddir
echo compiling
make all-gdb 1> make-$1.log 2>&1

cd gdb/testsuite
echo Running testsuite
echo "make check RUNTESTFLAGS=\"$exp_list\""
make check RUNTESTFLAGS="$exp_list" > ../make-tests-$1.log
cp gdb.sum gdb-$1.sum
cp gdb.log gdb-$1.log
cd $srcdir
}

runtests 0

patch -p 2 -i
../../patches/0002-Pierre-s-modifications-for-amd64-windows-funcalls.patch

runtests 1

patch -p 2 -i
../../patches/0002-Pierre-s-modifications-for-amd64-windows-funcalls.patch
-R

runtests 0b
>>>>>>>>>>>>>>>>>>>>End of script 
Diffgdb-0.sum and gdb-1.sum is given below,
most of the FAIL->PASS are related to the fact that your
patch mishandles "long double" types and passes them 
in xmm register when the need to be handled as copy-on-stack and pass
stack-address.

I will try to separate the patch into smaller pieces
for easier review.

Pierre Muller


*** gdb-0.sum	2013-09-24 23:25:04.777087500 +0200
--- gdb-1.sum	2013-09-24 23:30:50.094838600 +0200
***************
*** 1,4 ****
! Test Run By Pierre on Tue Sep 24 23:19:29 2013
  Target is x86_64-w64-mingw32
  Host   is x86_64-w64-mingw32
  Build  is i686-pc-cygwin
--- 1,4 ----
! Test Run By Pierre on Tue Sep 24 23:25:38 2013
  Target is x86_64-w64-mingw32
  Host   is x86_64-w64-mingw32
  Build  is i686-pc-cygwin
***************
*** 1274,1280 ****
  PASS: gdb.base/varargs.exp: print find_max1(10,1,2,3,4,5,6,7,8,29,0)
  PASS: gdb.base/varargs.exp: print find_max2(3,1,2,3)
  PASS: gdb.base/varargs.exp: print find_max_double(5,1.0,17.0,2.0,3.0,4.0)
! FAIL: gdb.base/varargs.exp: print find_max_float_real(4, fc1, fc2, fc3,
fc4)
  PASS: gdb.base/varargs.exp: print find_max_double_real(4, dc1, dc2, dc3,
dc4)
  PASS: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1, ldc2,
ldc3, ldc4)
  Running ../../../src/gdb/testsuite/gdb.arch/e500-abi.exp ...
--- 1274,1280 ----
  PASS: gdb.base/varargs.exp: print find_max1(10,1,2,3,4,5,6,7,8,29,0)
  PASS: gdb.base/varargs.exp: print find_max2(3,1,2,3)
  PASS: gdb.base/varargs.exp: print find_max_double(5,1.0,17.0,2.0,3.0,4.0)
! PASS: gdb.base/varargs.exp: print find_max_float_real(4, fc1, fc2, fc3,
fc4)
  PASS: gdb.base/varargs.exp: print find_max_double_real(4, dc1, dc2, dc3,
dc4)
  PASS: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1, ldc2,
ldc3, ldc4)
  Running ../../../src/gdb/testsuite/gdb.arch/e500-abi.exp ...
***************
*** 1425,1433 ****
  PASS: gdb.base/callfuncs.exp: p t_double_int(99.0, 99)
  PASS: gdb.base/callfuncs.exp: p t_int_double(99, 1.0)
  PASS: gdb.base/callfuncs.exp: p t_int_double(99, 99.0)
! FAIL: gdb.base/callfuncs.exp: p t_float_complex_values(fc1, fc2)
  PASS: gdb.base/callfuncs.exp: p t_float_complex_values(fc3, fc4)
! FAIL: gdb.base/callfuncs.exp: p t_float_complex_many_args(fc1, fc2, fc3,
fc4, fc1, fc2, fc3, fc4, fc1, fc2, fc3, fc4, fc1, fc2, fc3, fc4)
  PASS: gdb.base/callfuncs.exp: p t_float_complex_many_args(fc1, fc1, fc1,
fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1)
  PASS: gdb.base/callfuncs.exp: p t_double_complex_values(dc1, dc2)
  PASS: gdb.base/callfuncs.exp: p t_double_complex_values(dc3, dc4)
--- 1425,1433 ----
  PASS: gdb.base/callfuncs.exp: p t_double_int(99.0, 99)
  PASS: gdb.base/callfuncs.exp: p t_int_double(99, 1.0)
  PASS: gdb.base/callfuncs.exp: p t_int_double(99, 99.0)
! PASS: gdb.base/callfuncs.exp: p t_float_complex_values(fc1, fc2)
  PASS: gdb.base/callfuncs.exp: p t_float_complex_values(fc3, fc4)
! PASS: gdb.base/callfuncs.exp: p t_float_complex_many_args(fc1, fc2, fc3,
fc4, fc1, fc2, fc3, fc4, fc1, fc2, fc3, fc4, fc1, fc2, fc3, fc4)
  PASS: gdb.base/callfuncs.exp: p t_float_complex_many_args(fc1, fc1, fc1,
fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1)
  PASS: gdb.base/callfuncs.exp: p t_double_complex_values(dc1, dc2)
  PASS: gdb.base/callfuncs.exp: p t_double_complex_values(dc3, dc4)
***************
*** 1601,1607 ****
  PASS: gdb.cp/koenig.exp: p rfoo()
  PASS: gdb.cp/koenig.exp: p this->rfoo()
  Running ../../../src/gdb/testsuite/gdb.base/call-signal-resume.exp ...
! gdb compile failed, /tmp/ccGWbOM2.o: In function `gen_signal':
 
/home/Pierre/gdbcvs/build-cross-src-mingw64/gdb/testsuite/../../../src/gdb/t
estsuite/gdb.base/call-signals.c:35: undefined reference to `kill'
  collect2: error: ld returned 1 exit status
  UNTESTED: gdb.base/call-signal-resume.exp: call-signal-resume.exp
--- 1601,1607 ----
  PASS: gdb.cp/koenig.exp: p rfoo()
  PASS: gdb.cp/koenig.exp: p this->rfoo()
  Running ../../../src/gdb/testsuite/gdb.base/call-signal-resume.exp ...
! gdb compile failed, /tmp/cc2cnwEe.o: In function `gen_signal':
 
/home/Pierre/gdbcvs/build-cross-src-mingw64/gdb/testsuite/../../../src/gdb/t
estsuite/gdb.base/call-signals.c:35: undefined reference to `kill'
  collect2: error: ld returned 1 exit status
  UNTESTED: gdb.base/call-signal-resume.exp: call-signal-resume.exp
***************
*** 1778,1797 ****
  PASS: gdb.base/call-sc.exp: set width 0
  PASS: gdb.base/call-sc.exp: ptype; call-sc-tld (long double)
  PASS: gdb.base/call-sc.exp: ptype foo; call-sc-tld long double
! FAIL: gdb.base/call-sc.exp: p/c fun(); call call-sc-tld
  PASS: gdb.base/call-sc.exp: call Fun(foo); call call-sc-tld
  PASS: gdb.base/call-sc.exp: p/c L; call call-sc-tld
! FAIL: gdb.base/call-sc.exp: advance to fun for return; return call-sc-tld
! FAIL: gdb.base/call-sc.exp: zed L for return; return call-sc-tld
! FAIL: gdb.base/call-sc.exp: return foo; return call-sc-tld
! FAIL: gdb.base/call-sc.exp: return foo; synchronize pc to main()
! FAIL: gdb.base/call-sc.exp: return foo; synchronize pc to main()
! PASS: gdb.base/call-sc.exp: value foo returned; return call-sc-tld
! FAIL: gdb.base/call-sc.exp: advance to fun for finish; return call-sc-tld
(the program exited)
! FAIL: gdb.base/call-sc.exp: zed L for finish; return call-sc-tld
! FAIL: gdb.base/call-sc.exp: finish foo; return call-sc-tld (the program is
no longer running)
! FAIL: gdb.base/call-sc.exp: value foo finished; return call-sc-tld
! PASS: gdb.base/call-sc.exp: return and finish use same convention; return
call-sc-tld
  PASS: gdb.base/call-sc.exp: set print sevenbit-strings
  PASS: gdb.base/call-sc.exp: set print address off
  PASS: gdb.base/call-sc.exp: set width 0
--- 1778,1796 ----
  PASS: gdb.base/call-sc.exp: set width 0
  PASS: gdb.base/call-sc.exp: ptype; call-sc-tld (long double)
  PASS: gdb.base/call-sc.exp: ptype foo; call-sc-tld long double
! PASS: gdb.base/call-sc.exp: p/c fun(); call call-sc-tld
  PASS: gdb.base/call-sc.exp: call Fun(foo); call call-sc-tld
  PASS: gdb.base/call-sc.exp: p/c L; call call-sc-tld
! PASS: gdb.base/call-sc.exp: advance to fun for return; return call-sc-tld
! PASS: gdb.base/call-sc.exp: zed L for return; return call-sc-tld
! PASS: gdb.base/call-sc.exp: return foo; return call-sc-tld
! PASS: gdb.base/call-sc.exp: return foo; synchronize pc to main()
! FAIL: gdb.base/call-sc.exp: value foo returned; return call-sc-tld
! PASS: gdb.base/call-sc.exp: advance to fun for finish; return call-sc-tld
! PASS: gdb.base/call-sc.exp: zed L for finish; return call-sc-tld
! PASS: gdb.base/call-sc.exp: finish foo; return call-sc-tld
! PASS: gdb.base/call-sc.exp: value foo finished; return call-sc-tld
! KFAIL: gdb.base/call-sc.exp: return and finish use same convention; return
call-sc-tld (PRMS: gdb/1444)
  PASS: gdb.base/call-sc.exp: set print sevenbit-strings
  PASS: gdb.base/call-sc.exp: set print address off
  PASS: gdb.base/call-sc.exp: set width 0
***************
*** 2365,2373 ****
  PASS: gdb.cp/bool.exp: print return_true()
  PASS: gdb.cp/bool.exp: print return_false()
  Running ../../../src/gdb/testsuite/gdb.base/gnu-ifunc.exp ...
! gdb compile failed, /tmp/ccIypBHh.s: Assembler messages:
! /tmp/ccIypBHh.s:3: Warning: .type pseudo-op used outside of .def/.endef
ignored.
! /tmp/ccIypBHh.s:3: Error: junk at end of line, first unrecognized
character is `g'
  UNTESTED: gdb.base/gnu-ifunc.exp: Could not compile dynamic executable
././gdb.base/gnu-ifunc.
  Running ../../../src/gdb/testsuite/gdb.base/wchar.exp ...
  PASS: gdb.base/wchar.exp: print narrow
--- 2364,2372 ----
  PASS: gdb.cp/bool.exp: print return_true()
  PASS: gdb.cp/bool.exp: print return_false()
  Running ../../../src/gdb/testsuite/gdb.base/gnu-ifunc.exp ...
! gdb compile failed, /tmp/ccrPsyHD.s: Assembler messages:
! /tmp/ccrPsyHD.s:3: Warning: .type pseudo-op used outside of .def/.endef
ignored.
! /tmp/ccrPsyHD.s:3: Error: junk at end of line, first unrecognized
character is `g'
  UNTESTED: gdb.base/gnu-ifunc.exp: Could not compile dynamic executable
././gdb.base/gnu-ifunc.
  Running ../../../src/gdb/testsuite/gdb.base/wchar.exp ...
  PASS: gdb.base/wchar.exp: print narrow
***************
*** 2737,2744 ****
  PASS: gdb.base/dfp-test.exp: Backtrace function with correct _Decimal64
arguments.
  PASS: gdb.base/dfp-test.exp: Correct _Decimal64 return value from called
function.
  PASS: gdb.base/dfp-test.exp: Call function with correct _Decimal128
arguments.
! FAIL: gdb.base/dfp-test.exp: Backtrace function with correct _Decimal128
arguments.
! FAIL: gdb.base/dfp-test.exp: Correct _Decimal128 return value from called
function.
  PASS: gdb.base/dfp-test.exp: Call function with mixed decimal float
arguments TEST.
  PASS: gdb.base/dfp-test.exp: Call function with mixed decimal float
arguments.
  PASS: gdb.base/dfp-test.exp: Call function with many _Decimal32 arguments.
--- 2736,2743 ----
  PASS: gdb.base/dfp-test.exp: Backtrace function with correct _Decimal64
arguments.
  PASS: gdb.base/dfp-test.exp: Correct _Decimal64 return value from called
function.
  PASS: gdb.base/dfp-test.exp: Call function with correct _Decimal128
arguments.
! PASS: gdb.base/dfp-test.exp: Backtrace function with correct _Decimal128
arguments.
! PASS: gdb.base/dfp-test.exp: Correct _Decimal128 return value from called
function.
  PASS: gdb.base/dfp-test.exp: Call function with mixed decimal float
arguments TEST.
  PASS: gdb.base/dfp-test.exp: Call function with mixed decimal float
arguments.
  PASS: gdb.base/dfp-test.exp: Call function with many _Decimal32 arguments.
***************
*** 3166,3172 ****
  PASS: gdb.base/call-rt-st.exp: finish out from loop_count (line 777)
  PASS: gdb.base/call-rt-st.exp: print print_struct_rep(*struct1)
  PASS: gdb.base/call-rt-st.exp: print print_one_large_struct(*list1)
! FAIL: gdb.base/call-rt-st.exp: print print_one_double(*d1)
  PASS: gdb.base/call-rt-st.exp: print print_two_floats(*f3)
  PASS: gdb.base/call-rt-st.exp: print print_bit_flags_char(*cflags)
  PASS: gdb.base/call-rt-st.exp: print print_bit_flags_short(*sflags)
--- 3165,3171 ----
  PASS: gdb.base/call-rt-st.exp: finish out from loop_count (line 777)
  PASS: gdb.base/call-rt-st.exp: print print_struct_rep(*struct1)
  PASS: gdb.base/call-rt-st.exp: print print_one_large_struct(*list1)
! PASS: gdb.base/call-rt-st.exp: print print_one_double(*d1)
  PASS: gdb.base/call-rt-st.exp: print print_two_floats(*f3)
  PASS: gdb.base/call-rt-st.exp: print print_bit_flags_char(*cflags)
  PASS: gdb.base/call-rt-st.exp: print print_bit_flags_short(*sflags)
***************
*** 3821,3830 ****
  
  		=== gdb Summary ===
  
! # of expected passes		3437
! # of unexpected failures	160
  # of expected failures		11
! # of known failures		28
  # of unresolved testcases	3
  # of untested testcases		13
  # of unsupported tests		6
--- 3820,3829 ----
  
  		=== gdb Summary ===
  
! # of expected passes		3450
! # of unexpected failures	145
  # of expected failures		11
! # of known failures		29
  # of unresolved testcases	3
  # of untested testcases		13
  # of unsupported tests		6
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : mardi 24 septembre 2013 18:33
> À : gdb-patches@sourceware.org
> Cc : Pierre Muller; Mark Kettenis
> Objet : Re: [RFC-v2] amd64-windows: Fix funcall with by-pointer arguments
> 
> Hello,
> 
> > Once again, I'm short of time to finish what I had hoped to be able
> > to complete. But I thought I'd send an update anyway. The first patch
> > is an update to the patch I wrote in January, rebased for today's HEAD.
> > This is what I have tested and intend to check in soon.
> >
> > Left to do on my end, is clean things up in amd64-tdep, because many
> > hooks in the tdep structure can now be removed, and replaced by
> > direct calls. But this is independent of your changes, so we can
> > both work at the same time.
> 
> I have now checked in the patch re-implementing function call on
> amd64-windows. After this was done, I was able to revert all changes
> that added hooks in the gdbarch_tdep and in the amd64 sysV code
> to tweak it for amd64-windows, since the two implementations are
> now completely distinct.
> 
> All patches were tested on x86_64-linux and x86_64-windows.
> And just in case, I tested them on x86-windows as well.
> 
> Thanks,
> --
> Joel


  parent reply	other threads:[~2013-09-24 22:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 17:23 Joel Brobecker
2012-10-24 17:23 ` [RFA 2/2] amd64-windows: Arguments passed by pointer Joel Brobecker
2012-10-24 17:24 ` [RFA 1/2] Revert "amd64-windows: memory args passed by pointer during function calls." Joel Brobecker
2012-10-25 13:18 ` amd64-windows: Fix funcall with by-pointer arguments Mark Kettenis
2013-01-16 11:59   ` Joel Brobecker
2013-09-13 22:11     ` [RFC-v2] " Pierre Muller
2013-09-16 20:57       ` Joel Brobecker
2013-09-17 13:50         ` Joel Brobecker
2013-09-20 23:20           ` Joel Brobecker
2013-09-24 16:33             ` Joel Brobecker
2013-09-24 16:33               ` [commit 3/4] Revert use of memory_args_by_pointer in i386 gdbarch_tdep Joel Brobecker
2013-09-24 16:33               ` [commit 2/4] Revert use of integer_param_regs_saved_in_caller_frame " Joel Brobecker
2013-09-24 16:33               ` [commit 4/4] Revert use of classify callback " Joel Brobecker
2013-09-24 16:33               ` [commit 1/4] Reimplement function calls on amd64-windows Joel Brobecker
2013-09-24 17:26                 ` fixed ChangeLog: " Joel Brobecker
2013-09-24 16:53               ` [RFC-v2] amd64-windows: Fix funcall with by-pointer arguments Mark Kettenis
2013-09-24 22:02               ` Pierre Muller [this message]
2013-09-26  0:34                 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000301ceb971$b0cdbf80$12693e80$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox