public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Inconsistency between winnt.h header in /usr/include/w32api and the one supplied with the Microsoft SDK
@ 2011-09-29 13:56 Erik van der Kouwe
  2011-09-29 15:05 ` Kai Tietz
  0 siblings, 1 reply; 3+ messages in thread
From: Erik van der Kouwe @ 2011-09-29 13:56 UTC (permalink / raw)
  To: cygwin

Dear all,

I found that the definition of the IMAGE_RUNTIME_FUNCTION_ENTRY 
structure differs between the winnt.h header supplied with Cygwin and 
the one supplied from the Microsoft SDK (v7.1).

Cygwin gives me this in /usr/include/w32api/winnt.h:



typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
	DWORD BeginAddress;
	DWORD EndAddress;
	PVOID ExceptionHandler;
	PVOID HandlerData;
	DWORD PrologEndAddress;
} IMAGE_RUNTIME_FUNCTION_ENTRY,*PIMAGE_RUNTIME_FUNCTION_ENTRY;



In "C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\WinNT.h", on 
the other hand, I find:



typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
     DWORD BeginAddress;
     DWORD EndAddress;
     DWORD UnwindInfoAddress;
} _IMAGE_RUNTIME_FUNCTION_ENTRY, *_PIMAGE_RUNTIME_FUNCTION_ENTRY;

...

typedef  _IMAGE_RUNTIME_FUNCTION_ENTRY  IMAGE_RUNTIME_FUNCTION_ENTRY;
typedef _PIMAGE_RUNTIME_FUNCTION_ENTRY PIMAGE_RUNTIME_FUNCTION_ENTRY;



Clearly, these definitions are incompatible. Binary dumping of the 
.pdata section of a PE image strongly suggests that the Windows SDK is 
correct on this one.

Any idea where Cygwin's version came from? Should it be corrected/could 
you correct it? And while it hasn't been corrected, is there some easy 
way to use the SDK's version of the headers or should I just copy the 
definition?

With kind regards,
Erik

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inconsistency between winnt.h header in /usr/include/w32api and the one supplied with the Microsoft SDK
  2011-09-29 13:56 Inconsistency between winnt.h header in /usr/include/w32api and the one supplied with the Microsoft SDK Erik van der Kouwe
@ 2011-09-29 15:05 ` Kai Tietz
  2011-09-29 18:02   ` Erik van der Kouwe
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Tietz @ 2011-09-29 15:05 UTC (permalink / raw)
  To: cygwin

Hi,

the issue you are noticing here is that pdata information differs
between different archtiectures.  The first you have shown here is the
definition of the spark,mips, and (IIRC) arm architecture.  The second
one you've shown is the definition of pdata for x64 architecture.  For
x86 itself there is no pdata-information present, as x86 is using
stack-based SEH support, and not table-based one as other
architectures.

Regards,
Kai

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inconsistency between winnt.h header in /usr/include/w32api and the one supplied with the Microsoft SDK
  2011-09-29 15:05 ` Kai Tietz
@ 2011-09-29 18:02   ` Erik van der Kouwe
  0 siblings, 0 replies; 3+ messages in thread
From: Erik van der Kouwe @ 2011-09-29 18:02 UTC (permalink / raw)
  To: cygwin

Hi,

> the issue you are noticing here is that pdata information differs
> between different archtiectures.  The first you have shown here is the
> definition of the spark,mips, and (IIRC) arm architecture.  The second
> one you've shown is the definition of pdata for x64 architecture.  For
> x86 itself there is no pdata-information present, as x86 is using
> stack-based SEH support, and not table-based one as other
> architectures.

Thanks for your answer. That makes sense.

Still, Windows makes the x64 version available even on x86 architectures. I
guess this makes sense as Windows no longer runs on those other architectures
architectures these days. x86 Cygwin is likely to run on many x64 systems and
encounter x64 binaries (which is also what I'm using it for). 

With kind regards,
Erik


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-28  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-29 13:56 Inconsistency between winnt.h header in /usr/include/w32api and the one supplied with the Microsoft SDK Erik van der Kouwe
2011-09-29 15:05 ` Kai Tietz
2011-09-29 18:02   ` Erik van der Kouwe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).