diff options
| author | Eli Zaretskii | 2013-08-09 13:18:48 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-08-09 13:18:48 +0300 |
| commit | 55902276706ea2db832ad5748a18ab392a0873f1 (patch) | |
| tree | e58949701e4875e2282826282248ad21a101b87f /src | |
| parent | 6e164c210a090beeaaf8682343982740b65133f9 (diff) | |
| download | emacs-55902276706ea2db832ad5748a18ab392a0873f1.tar.gz emacs-55902276706ea2db832ad5748a18ab392a0873f1.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/w32.c | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d57086f7141..aa424d2ec06 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-08-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define | ||
| 4 | variables of these types so that GDB would know about them, as aid | ||
| 5 | for debugging fatal exceptions. (Bug#15024) See also | ||
| 6 | http://sourceware.org/ml/gdb/2013-08/msg00010.html for related | ||
| 7 | discussions. | ||
| 8 | |||
| 1 | 2013-08-08 Jan Djärv <jan.h.d@swipnet.se> | 9 | 2013-08-08 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 10 | ||
| 3 | * nsterm.m (ns_update_begin): Don't change clip path if it would be | 11 | * nsterm.m (ns_update_begin): Don't change clip path if it would be |
| @@ -89,6 +89,21 @@ typedef struct _MEMORY_STATUS_EX { | |||
| 89 | DWORDLONG ullAvailExtendedVirtual; | 89 | DWORDLONG ullAvailExtendedVirtual; |
| 90 | } MEMORY_STATUS_EX,*LPMEMORY_STATUS_EX; | 90 | } MEMORY_STATUS_EX,*LPMEMORY_STATUS_EX; |
| 91 | 91 | ||
| 92 | /* These are here so that GDB would know about these data types. This | ||
| 93 | allows to attach GDB to Emacs when a fatal exception is triggered | ||
| 94 | and Windows pops up the "application needs to be closed" dialog. | ||
| 95 | At that point, _gnu_exception_handler, the top-level exception | ||
| 96 | handler installed by the MinGW startup code, is somewhere on the | ||
| 97 | call-stack of the main thread, so going to that call frame and | ||
| 98 | looking at the argument to _gnu_exception_handler, which is a | ||
| 99 | PEXCEPTION_POINTERS pointer, can reveal the exception code | ||
| 100 | (excptr->ExceptionRecord->ExceptionCode) and the address where the | ||
| 101 | exception happened (excptr->ExceptionRecord->ExceptionAddress), as | ||
| 102 | well as some additional information specific to the exception. */ | ||
| 103 | PEXCEPTION_POINTERS excptr; | ||
| 104 | PEXCEPTION_RECORD excprec; | ||
| 105 | PCONTEXT ctxrec; | ||
| 106 | |||
| 92 | #include <lmcons.h> | 107 | #include <lmcons.h> |
| 93 | #include <shlobj.h> | 108 | #include <shlobj.h> |
| 94 | 109 | ||