* python/py-frame.c (frapy_block): Fix error message text.
[deliverable/binutils-gdb.git] / gdb / opencl-lang.c
index d7e66c465856f167c14f2591d9ad5c2887dd5160..37852544d3b37f90a67f61bb566add56aab9d7a6 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbtypes.h"
 #include "symtab.h"
 #include "expression.h"
 #include "parser-defs.h"
 #include "symtab.h"
 #include "language.h"
+#include "varobj.h"
 #include "c-lang.h"
 #include "gdb_assert.h"
 
@@ -1035,10 +1036,13 @@ Cannot perform conditional operation on vectors with different sizes"));
          }
        else
          {
-           /* Also handle EVAL_AVOID_SIDE_EFFECTS.  */
-           return value_struct_elt (&arg1, NULL,
-                                    &exp->elts[pc + 2].string, NULL,
-                                    "structure");
+           struct value *v = value_struct_elt (&arg1, NULL,
+                                               &exp->elts[pc + 2].string, NULL,
+                                               "structure");
+
+           if (noside == EVAL_AVOID_SIDE_EFFECTS)
+             v = value_zero (value_type (v), not_lval);
+           return v;
          }
       }
     default:
@@ -1099,6 +1103,7 @@ const struct exp_descriptor exp_descriptor_opencl =
 const struct language_defn opencl_language_defn =
 {
   "opencl",                    /* Language name */
+  "OpenCL C",
   language_opencl,
   range_check_off,
   case_sensitive_on,
@@ -1134,6 +1139,7 @@ const struct language_defn opencl_language_defn =
   c_get_string,
   NULL,                                /* la_get_symbol_name_cmp */
   iterate_over_symbols,
+  &default_varobj_ops,
   LANG_MAGIC
 };
 
This page took 0.024115 seconds and 4 git commands to generate.