This is to make sure that we cannot have a field with an undefined
value (currently, we are not setting the gdbarch).
gdb/ChangeLog:
* ada-lang.c (replace_operator_with_call): Use xzalloc instead
of xmalloc.
+2012-03-21 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (replace_operator_with_call): Use xzalloc instead
+ of xmalloc.
+
2012-03-18 Pedro Alves <pedro@codesourcery.com>
* frame.c (frame_unwind_register): Throw an error if unwinding the
/* A new expression, with 6 more elements (3 for funcall, 4 for function
symbol, -oplen for operator being replaced). */
struct expression *newexp = (struct expression *)
- xmalloc (sizeof (struct expression)
+ xzalloc (sizeof (struct expression)
+ EXP_ELEM_TO_BYTES ((*expp)->nelts + 7 - oplen));
struct expression *exp = *expp;