[v2,0/8] Fix inferior call for C++ pass-by-reference arguments

Message ID 1561368588-21858-1-git-send-email-tankut.baris.aktemur@intel.com
Headers show
Series
  • Fix inferior call for C++ pass-by-reference arguments
Related show

Message

Tankut Baris Aktemur June 24, 2019, 9:29 a.m.
Hi All,

This is a set of patches to fix GDB's conformance to C++ ABI when
invoking functions that have call-by-value arguments of aggregate
types that should be implicitly passed by reference.

The v1 of the series is available at
https://sourceware.org/ml/gdb-patches/2019-04/msg00461.html

Changes since v1:
* Patches 1-3 have been revised according to the reviews
  (thanks to Andrew Burgess).
* The patches have been rebased to the current master.

Regards,
-Baris

Tankut Baris Aktemur (8):
  gdb: recognize new DWARF attributes: defaulted, deleted, calling conv.
  infcall, c++: allow more info to be computed for pass-by-reference
    values
  infcall, c++: collect more pass-by-reference information
  infcall: refactor 'call_function_by_hand_dummy'
  infcall: move assertions in 'call_function_by_hand_dummy' to an
    earlier spot
  infcall: remove unused parameter in 'value_arg_coerce'
  infcall: handle pass-by-reference arguments appropriately
  testsuite, cp: increase the coverage of testing pass-by-ref arguments

 gdb/arch-utils.c                       |    2 +-
 gdb/cp-abi.c                           |    6 +-
 gdb/cp-abi.h                           |   10 +-
 gdb/dwarf2read.c                       |   20 +
 gdb/gdbtypes.c                         |    7 +
 gdb/gdbtypes.h                         |   21 +-
 gdb/gnu-v3-abi.c                       |  284 +-
 gdb/infcall.c                          |  213 +-
 gdb/language.c                         |   19 +-
 gdb/language.h                         |   70 +-
 gdb/testsuite/gdb.cp/pass-by-ref-2.cc  |  179 +
 gdb/testsuite/gdb.cp/pass-by-ref-2.exp |   85 +
 gdb/testsuite/gdb.cp/pass-by-ref.cc    | 7368 +++++++++++++++++++++++-
 gdb/testsuite/gdb.cp/pass-by-ref.exp   |  412 +-
 gdb/tic6x-tdep.c                       |    2 +-
 15 files changed, 8538 insertions(+), 160 deletions(-)
 create mode 100644 gdb/testsuite/gdb.cp/pass-by-ref-2.cc
 create mode 100644 gdb/testsuite/gdb.cp/pass-by-ref-2.exp

-- 
2.17.1

Comments

Tankut Baris Aktemur July 15, 2019, 12:16 p.m. | #1
> -----Original Message-----

> 

> Hi All,

> 

> This is a set of patches to fix GDB's conformance to C++ ABI when

> invoking functions that have call-by-value arguments of aggregate

> types that should be implicitly passed by reference.

> 

> The v1 of the series is available at

> https://sourceware.org/ml/gdb-patches/2019-04/msg00461.html

> 

> Changes since v1:

> * Patches 1-3 have been revised according to the reviews

>   (thanks to Andrew Burgess).

> * The patches have been rebased to the current master.

> 

> Regards,

> -Baris


Kindly ping'ing.

Best regards,

-Baris


> 

> Tankut Baris Aktemur (8):

>   gdb: recognize new DWARF attributes: defaulted, deleted, calling conv.

>   infcall, c++: allow more info to be computed for pass-by-reference

>     values

>   infcall, c++: collect more pass-by-reference information

>   infcall: refactor 'call_function_by_hand_dummy'

>   infcall: move assertions in 'call_function_by_hand_dummy' to an

>     earlier spot

>   infcall: remove unused parameter in 'value_arg_coerce'

>   infcall: handle pass-by-reference arguments appropriately

>   testsuite, cp: increase the coverage of testing pass-by-ref arguments

> 

>  gdb/arch-utils.c                       |    2 +-

>  gdb/cp-abi.c                           |    6 +-

>  gdb/cp-abi.h                           |   10 +-

>  gdb/dwarf2read.c                       |   20 +

>  gdb/gdbtypes.c                         |    7 +

>  gdb/gdbtypes.h                         |   21 +-

>  gdb/gnu-v3-abi.c                       |  284 +-

>  gdb/infcall.c                          |  213 +-

>  gdb/language.c                         |   19 +-

>  gdb/language.h                         |   70 +-

>  gdb/testsuite/gdb.cp/pass-by-ref-2.cc  |  179 +

>  gdb/testsuite/gdb.cp/pass-by-ref-2.exp |   85 +

>  gdb/testsuite/gdb.cp/pass-by-ref.cc    | 7368 +++++++++++++++++++++++-

>  gdb/testsuite/gdb.cp/pass-by-ref.exp   |  412 +-

>  gdb/tic6x-tdep.c                       |    2 +-

>  15 files changed, 8538 insertions(+), 160 deletions(-)

>  create mode 100644 gdb/testsuite/gdb.cp/pass-by-ref-2.cc

>  create mode 100644 gdb/testsuite/gdb.cp/pass-by-ref-2.exp

> 

> --

> 2.17.1


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
Tankut Baris Aktemur Sept. 2, 2019, 3:13 p.m. | #2
* On Monday, June 24, 2019 11:30 AM, Tankut Baris Aktemur wrote:
> Hi All,

> 

> This is a set of patches to fix GDB's conformance to C++ ABI when

> invoking functions that have call-by-value arguments of aggregate

> types that should be implicitly passed by reference.

> 

> The v1 of the series is available at

> https://sourceware.org/ml/gdb-patches/2019-04/msg00461.html

> 

> Changes since v1:

> * Patches 1-3 have been revised according to the reviews

>   (thanks to Andrew Burgess).

> * The patches have been rebased to the current master.

> 

> Regards,

> -Baris


Kindly pinging for the v2 of the series.
(https://sourceware.org/ml/gdb-patches/2019-06/msg00517.html)

Thanks,
-Baris

> 

> Tankut Baris Aktemur (8):

>   gdb: recognize new DWARF attributes: defaulted, deleted, calling conv.

>   infcall, c++: allow more info to be computed for pass-by-reference

>     values

>   infcall, c++: collect more pass-by-reference information

>   infcall: refactor 'call_function_by_hand_dummy'

>   infcall: move assertions in 'call_function_by_hand_dummy' to an

>     earlier spot

>   infcall: remove unused parameter in 'value_arg_coerce'

>   infcall: handle pass-by-reference arguments appropriately

>   testsuite, cp: increase the coverage of testing pass-by-ref arguments

> 

>  gdb/arch-utils.c                       |    2 +-

>  gdb/cp-abi.c                           |    6 +-

>  gdb/cp-abi.h                           |   10 +-

>  gdb/dwarf2read.c                       |   20 +

>  gdb/gdbtypes.c                         |    7 +

>  gdb/gdbtypes.h                         |   21 +-

>  gdb/gnu-v3-abi.c                       |  284 +-

>  gdb/infcall.c                          |  213 +-

>  gdb/language.c                         |   19 +-

>  gdb/language.h                         |   70 +-

>  gdb/testsuite/gdb.cp/pass-by-ref-2.cc  |  179 +

>  gdb/testsuite/gdb.cp/pass-by-ref-2.exp |   85 +

>  gdb/testsuite/gdb.cp/pass-by-ref.cc    | 7368 +++++++++++++++++++++++-

>  gdb/testsuite/gdb.cp/pass-by-ref.exp   |  412 +-

>  gdb/tic6x-tdep.c                       |    2 +-

>  15 files changed, 8538 insertions(+), 160 deletions(-)

>  create mode 100644 gdb/testsuite/gdb.cp/pass-by-ref-2.cc

>  create mode 100644 gdb/testsuite/gdb.cp/pass-by-ref-2.exp

> 

> --

> 2.17.1


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928