inf-ptrace: Return an IGNORE event if waitpid() fails.
[binutils-gdb.git] / gdb / infcall.c
index 8e896296b96c01f7559d6642a66f3b09445f6169..f8c812c8f611c82a6f37f8f714cbfaec3737d2ce 100644 (file)
@@ -812,6 +812,11 @@ call_function_by_hand_dummy (struct value *function,
   type *values_type;
   CORE_ADDR funaddr = find_function_addr (function, &values_type, &ftype);
 
+  if (is_nocall_function (ftype))
+    error (_("Cannot call the function '%s' which does not follow the "
+            "target calling convention."),
+          get_function_name (funaddr, name_buf, sizeof (name_buf)));
+
   if (values_type == NULL)
     values_type = default_return_type;
   if (values_type == NULL)