This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

DOS/Windows-specific code: maint.c



    * maint.c:

    #ifndef _WIN32
    /* ARGSUSED */
    static void
    maintenance_dump_me (char *args, int from_tty)
    {
      if (query ("Should GDB dump core? "))
	{
    #ifdef __DJGPP__
	  /* SIGQUIT by default is ignored, so use SIGABRT instead.  */
	  signal (SIGABRT, SIG_DFL);
	  kill (getpid (), SIGABRT);
    #else
	  signal (SIGQUIT, SIG_DFL);
	  kill (getpid (), SIGQUIT);
    #endif
	}
    }
    #endif

Should we define SIGNAL_TO_DUMP_CORE (default to SIGQUIT)?  It could
then be set to 0 on Windows, and maintenance_dump_me could print a
suitable message ("not supported on this platform" or some such) if
its value is zero.

Btw, why isn't SIGABRT used on Unix here?

    * maint.c:_initialize_maint_cmds()

    #ifndef _WIN32
      add_cmd ("dump-me", class_maintenance, maintenance_dump_me,
	       "Get fatal error; make debugger dump its core.\n\
    GDB sets it's handling of SIGQUIT back to SIG_DFL and then sends\n\
    itself a SIGQUIT signal.",
	       &maintenancelist);
    #endif

See above.  If the changes I suggest are accepted, the ifdef here
could be simply removed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]