diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2011-02-08 13:30:10 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2011-02-08 13:30:10 +0000 |
commit | 54fcddd0ace6123d9dadc3040c39acd1b42ffd09 (patch) | |
tree | 52b8f2892f032070d495dd00b396659f1a88edb8 /gdb/dwarf2read.c | |
parent | d6dafb7c8efcd4625de119bffece9907e5b69a8e (diff) | |
download | fsf-binutils-gdb-54fcddd0ace6123d9dadc3040c39acd1b42ffd09.zip fsf-binutils-gdb-54fcddd0ace6123d9dadc3040c39acd1b42ffd09.tar.gz fsf-binutils-gdb-54fcddd0ace6123d9dadc3040c39acd1b42ffd09.tar.bz2 |
include/ChangeLog:
* dwarf2.h (enum dwarf_calling_convention): Add DW_CC_GDB_IBM_OpenCL.
gdb/ChangeLog:
* dwarf2read.c (read_subroutine_type): Set special calling
convention flag for functions compiled by IBM XL C for OpenCL.
* ppc-sysv-tdep.c: Include "dwarf2.h"
(ppc_sysv_abi_push_dummy_call): Implement IBM OpenCL vector types
calling convention.
(do_ppc_sysv_return_value): Add FUNC_TYPE argument. Implement
IBM OpenCL vector types calling convention.
(ppc_sysv_abi_return_value): Pass through FUNC_TYPE.
(ppc_sysv_abi_broken_return_value): Likewise.
(ppc64_sysv_abi_push_dummy_call): Implement IBM OpenCL vector
types calling convention.
(ppc64_sysv_abi_return_value): Likewise.
* spu-tdep.c: Include "dwarf2.h"
(spu_return_value): Implement IBM OpenCL vector types calling
convention.
gdb/testsuite/ChangeLog:
* gdb.opencl/callfuncs.cl: New file.
* gdb.opencl/callfuncs.exp: New test.
* gdb.opencl/Makefile.in (EXECUTABLES): Add callfuncs.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f269dee..837fa3b 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -7955,7 +7955,12 @@ read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu) the subroutine die. Otherwise set the calling convention to the default value DW_CC_normal. */ attr = dwarf2_attr (die, DW_AT_calling_convention, cu); - TYPE_CALLING_CONVENTION (ftype) = attr ? DW_UNSND (attr) : DW_CC_normal; + if (attr) + TYPE_CALLING_CONVENTION (ftype) = DW_UNSND (attr); + else if (cu->producer && strstr (cu->producer, "IBM XL C for OpenCL")) + TYPE_CALLING_CONVENTION (ftype) = DW_CC_GDB_IBM_OpenCL; + else + TYPE_CALLING_CONVENTION (ftype) = DW_CC_normal; /* We need to add the subroutine type to the die immediately so we don't infinitely recurse when dealing with parameters |