[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113775: Define a few variables of obscure types to
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r113775: Define a few variables of obscure types to aid debugging exceptions on Windows. |
Date: |
Fri, 09 Aug 2013 10:19:15 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113775
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15024
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2013-08-09 13:18:48 +0300
message:
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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32.c w32.c-20091113204419-o5vbwnq5f7feedwu-808
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-08-08 17:52:00 +0000
+++ b/src/ChangeLog 2013-08-09 10:18:48 +0000
@@ -1,3 +1,11 @@
+2013-08-09 Eli Zaretskii <address@hidden>
+
+ * 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 <address@hidden>
* nsterm.m (ns_update_begin): Don't change clip path if it would be
=== modified file 'src/w32.c'
--- a/src/w32.c 2013-08-04 15:43:10 +0000
+++ b/src/w32.c 2013-08-09 10:18:48 +0000
@@ -89,6 +89,21 @@
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>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113775: Define a few variables of obscure types to aid debugging exceptions on Windows.,
Eli Zaretskii <=