This is the mail archive of the gdb-patches@sourceware.cygnus.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]

Re: fatal() -> internal_error() jumbo patch


>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>> IMO the question about dumping core and continuing should be separate.
>> I can envision answering yes to dump core and no to quit.  That way I
>> can dump the frotzed state of GDB (for later debugging), yet still try
>> to recover useful info from my debug session.

Andrew> Again, good point. Would you have a patch?

It's hard to make a patch against a patch.  Perhaps when your changes
end up in a snapshot.  But the logic would be something like this:

        .
        .
        .
        if (query ("dump core? ")) {
                if (fork() == 0) {
                        abort();
                }
        }
        if (query ("exit? ")) {
                _exit(1);
        }

        dejavu = 0;
        return_to_top_level (RETURN_ERROR);
    }

I'm unsure about what to do on non-UNIX systems that can't force a
core dump in this way.  Perhaps your original code should be used.

        --jtc
  

-- 
J.T. Conklin
RedBack Networks

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