This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ping] couple of fixes for DWARF2 EH on Win32

> yeah both patches are ok. The changes in t-mingw* should be superflous
> for newer mingw runtimes. For compatiblility sake they are ok.


> As the dw2 unwinder code is just of use for 32-bit, I have no
> objections (there are some pointer/long casts withing that code, which
> are fitting well to x64 win32's LLP64).

FWIW we do use 64-bit DWARF-2 EH on Windows in our compilers and this works 
almost out of the box (you have to enable it of course).  For the sake of 
completeness, I'm posting the attached patchlet that is needed to make it 
work with GCC 4.5 and later, but might be of interest to those playing with 
the DWARF-2 unwinder on 64-bit Windows and so worth integrating in the tree.
It is necessary in order to avoid buffer overruns caused by the different set 
of call-used registers with the MS ABI.

2010-11-05  Eric Botcazou  <>
            Pascal Obry  <>

	* config/i386/cygming.h (DWARF_FRAME_REGISTERS): Redefine.  Use 33
	in 64-bit mode and 17 otherwise.

Eric Botcazou
Index: config/i386/cygming.h
--- config/i386/cygming.h	(revision 166350)
+++ config/i386/cygming.h	(working copy)
@@ -84,6 +84,10 @@ along with GCC; see the file COPYING3.
   (TARGET_64BIT ? dbx64_register_map[(n)]		\
 		: svr4_dbx_register_map[(n)])
+/* The MS_ABI changes the set of call-used registers.  */
 /* Use section relative relocations for debugging offsets.  Unlike
    other targets that fake this by putting the section VMA at 0, PE

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