This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC-v4] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior)
- From: Pedro Alves <palves at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: "'Joel Brobecker'" <brobecker at adacore dot com>, "'Eli Zaretskii'" <eliz at gnu dot org>, gdb-patches at sourceware dot org
- Date: Fri, 07 Dec 2012 16:37:44 +0000
- Subject: Re: [RFC-v4] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior)
- References: <834nm07z0s.fsf@gnu.org> <5077FEB9.4030304@redhat.com> <83y5jb7rfe.fsf@gnu.org> <006001cdaada$00c81f00$02585d00$@muller@ics-cnrs.unistra.fr> <20121024194517.GK3555@adacore.com> <011901cdb2ab$48076b90$d81642b0$@muller@ics-cnrs.unistra.fr> <20121105171121.GA2972@adacore.com> <50991f5f.8382440a.1100.ffff82abSMTPIN_ADDED@mx.google.com> <509ABA17.30507@redhat.com> <000301cdbd96$f5cd9f10$e168dd30$@muller@ics-cnrs.unistra.fr> <20121122173019.GF9964@adacore.com> <50b2a0d1.c849420a.3a3a.3538SMTPIN_ADDED_BROKEN@mx.google.com>
On 11/25/2012 10:50 PM, Pierre Muller wrote:
>>> > > +#ifndef IMAGE_SCN_CNT_CODE
>>> > > +# define IMAGE_SCN_CNT_CODE 0x20
>>> > > +#endif
>>> > > +#ifndef IMAGE_SCN_CNT_INITIALIZED_DATA
>>> > > +# define IMAGE_SCN_CNT_INITIALIZED_DATA 0x40
>>> > > +#endif
>>> > > +#ifndef IMAGE_SCN_CNT_UNINITIALIZED_DATA
>>> > > +# define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x80
>>> > > +#endif
>> > Do you have an idea of when these macros might not be defined?
>> > (and where they are normally coming from?). It'd be nice to add
>> > a comment providing the answer to those questions.
>
> These are windows specific macros,
> but can also be compiled on any other target, if one
> of the windows target is included in the target list.
But then, when _are_ they defined? You mean they're being picked
up by something including windows.h on Windows hosts?
It'd be much better if they were defined in src/include/coff/pe.h,
like other IMAGE_SCN_ constants.
--
Pedro Alves