emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C backtraces for Emacs


From: Eli Zaretskii
Subject: Re: C backtraces for Emacs
Date: Thu, 23 Aug 2012 19:55:10 +0300

> Date: Wed, 22 Aug 2012 17:40:08 -0700
> From: Daniel Colascione <address@hidden>
> CC: Paul Eggert <address@hidden>, address@hidden, 
>  address@hidden, address@hidden
> 
> You can use the StackWalk64 function from dbghelp.dll.

Will that work with GCC-compiled programs and DLLs?  Isn't dbghelp.dll
VC-specific?  If it doesn't produce addresses that can be plugged into
GDB, then it's not good, because any meaningful debugging after the
assertion violation will have to be with GDB.

Also, dbghelp.dll seems to need to be installed separately, and MinGW
doesn't provide its import library, so we cannot link against it by
default.  Did I miss something?

Anyway, if this is workable, patches to use it are welcome.

> By the way: when we assert, we should kill Emacs using RaiseFailFastException.
> This function produces a nice WER (Windows Error Reporting) dialog and 
> bypasses
> a lot of layers of exception handling machinery that would ordinarily run in
> userspace --- that is, with RaiseFailFastException, fewer things can go wrong.
> abort() under Windows actually tried to run global destructors, send messages 
> to
> loaded DLLs about pending process termination, and a bunch of other things. 
> RFFE
> is much more reliable. On systems without RFFE, plain old RaiseException is 
> fine
> too, and RaiseException is present on all supported Windows versions.

Emacs overrides 'abort' with a custom function that calls our own
abort dialog.  So I don't think the problems with the standard 'abort'
function are relevant to Emacs.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]