Commit 55902276 authored by Eli Zaretskii's avatar Eli Zaretskii

Define a few variables of obscure types to aid debugging exceptions on Windows.

 src/w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
 variables of these types so that GDB would know about them, as aid
 for debugging fatal exceptions.  (Bug#15024)  See also
 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
 discussions.
parent 6e164c21
2013-08-09 Eli Zaretskii <eliz@gnu.org>
* w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
variables of these types so that GDB would know about them, as aid
for debugging fatal exceptions. (Bug#15024) See also
http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
discussions.
2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (ns_update_begin): Don't change clip path if it would be
......
......@@ -89,6 +89,21 @@ typedef struct _MEMORY_STATUS_EX {
DWORDLONG ullAvailExtendedVirtual;
} MEMORY_STATUS_EX,*LPMEMORY_STATUS_EX;
/* These are here so that GDB would know about these data types. This
allows to attach GDB to Emacs when a fatal exception is triggered
and Windows pops up the "application needs to be closed" dialog.
At that point, _gnu_exception_handler, the top-level exception
handler installed by the MinGW startup code, is somewhere on the
call-stack of the main thread, so going to that call frame and
looking at the argument to _gnu_exception_handler, which is a
PEXCEPTION_POINTERS pointer, can reveal the exception code
(excptr->ExceptionRecord->ExceptionCode) and the address where the
exception happened (excptr->ExceptionRecord->ExceptionAddress), as
well as some additional information specific to the exception. */
PEXCEPTION_POINTERS excptr;
PEXCEPTION_RECORD excprec;
PCONTEXT ctxrec;
#include <lmcons.h>
#include <shlobj.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment