Use GCC5/DWARF5 DW_AT_noreturn to mark functions that don't return normally.
[external/binutils.git] / gdb / stack.c
index 0201d0a..5f2a3dc 100644 (file)
@@ -2462,8 +2462,12 @@ return_command (char *retval_exp, int from_tty)
        confirmed = query (_("%sMake selected stack frame return now? "),
                           query_prefix);
       else
-       confirmed = query (_("%sMake %s return now? "), query_prefix,
-                          SYMBOL_PRINT_NAME (thisfun));
+       {
+         if (TYPE_NO_RETURN (thisfun->type))
+           warning ("Function does not return normally to caller.");
+         confirmed = query (_("%sMake %s return now? "), query_prefix,
+                            SYMBOL_PRINT_NAME (thisfun));
+       }
       if (!confirmed)
        error (_("Not confirmed"));
     }