contrib/gdb-7/gdb/utils.c
static int
can_dump_core (const char *reason)
{
#ifdef HAVE_GETRLIMIT
  struct rlimit rlim;

  /* Be quiet and assume we can dump if an error is returned.  */
  if (getrlimit (RLIMIT_CORE, &rlim) != 0)
    return 1;

  if (rlim.rlim_max == 0)
    {
      fprintf_unfiltered (gdb_stderr,
			  _("%s\nUnable to dump core, use `ulimit -c"
			    " unlimited' before executing GDB next time.\n"),
			  reason);
      return 0;
    }
#endif /* HAVE_GETRLIMIT */

  return 1;
}
/* Check whether GDB will be able to dump core using the dump_core
   function.  */
Check whether GDB will be able to dump core using the dump_core
function.
Check whether GDB will be able to dump core using the dump_core function .
static int
can_dump_core (const char *reason)
{
#ifdef HAVE_GETRLIMIT
  struct rlimit rlim;
  if (getrlimit (RLIMIT_CORE, &rlim) != 0)
    return 1;
  if (rlim.rlim_max == 0)
    {
      fprintf_unfiltered (gdb_stderr,
			  _("%s\nUnable to dump core, use `ulimit -c"
			    " unlimited' before executing GDB next time.\n"),
			  reason);
      return 0;
    }
#endif 
  return 1;
}
static int can_dump_core ( const char * reason ) { #ifdef HAVE_GETRLIMIT struct rlimit rlim ; if ( getrlimit ( RLIMIT_CORE , & rlim ) != 0 ) return 1 ; if ( rlim . rlim_max == 0 ) { fprintf_unfiltered ( gdb_stderr , _ ( " \n " " \n " ) , reason ) ; return 0 ; } #endif return 1 ; }
Check whether GDB will be able to dump core using the dump_core
function.
Check whether GDB will be able to dump core using the dump_core function .
/* Be quiet and assume we can dump if an error is returned.  */ /* HAVE_GETRLIMIT */