*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / spu-tdep.c
index 570809f3fc2f7a2ce2e610ea3a3aacc76101d105..78ba00721398e09e472c1d0f5562f8ca9ecb3d64 100644 (file)
@@ -1,6 +1,5 @@
 /* SPU target-dependent code for GDB, the GNU debugger.
-   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2006-2012 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
    Based on a port by Sid Manning <sid@us.ibm.com>.
@@ -1458,11 +1457,19 @@ spu_return_value (struct gdbarch *gdbarch, struct type *func_type,
   enum return_value_convention rvc;
   int opencl_vector = 0;
 
-  if (func_type
-      && TYPE_CALLING_CONVENTION (func_type) == DW_CC_GDB_IBM_OpenCL
-      && TYPE_CODE (type) == TYPE_CODE_ARRAY
-      && TYPE_VECTOR (type))
-    opencl_vector = 1;
+  if (func_type)
+    {
+      func_type = check_typedef (func_type);
+
+      if (TYPE_CODE (func_type) == TYPE_CODE_PTR)
+       func_type = check_typedef (TYPE_TARGET_TYPE (func_type));
+
+      if (TYPE_CODE (func_type) == TYPE_CODE_FUNC
+         && TYPE_CALLING_CONVENTION (func_type) == DW_CC_GDB_IBM_OpenCL
+         && TYPE_CODE (type) == TYPE_CODE_ARRAY
+         && TYPE_VECTOR (type))
+       opencl_vector = 1;
+    }
 
   if (TYPE_LENGTH (type) <= (SPU_ARGN_REGNUM - SPU_ARG1_REGNUM + 1) * 16)
     rvc = RETURN_VALUE_REGISTER_CONVENTION;
@@ -1939,8 +1946,8 @@ spu_catch_start (struct objfile *objfile)
                     bp_breakpoint /* type_wanted */,
                     0 /* ignore_count */,
                     AUTO_BOOLEAN_FALSE /* pending_break_support */,
-                    NULL /* ops */, 0 /* from_tty */, 1 /* enabled */,
-                    0 /* internal  */);
+                    &bkpt_breakpoint_ops /* ops */, 0 /* from_tty */,
+                    1 /* enabled */, 0 /* internal  */, 0);
 }
 
 
This page took 0.023618 seconds and 4 git commands to generate.