This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [RFC-v5] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior)


> >> I'm still curious on why you needed the #ifndefs though.
> >
> >   Oh, I forgot that one,
> > I will test without the ifdef's...
> >    These across are defined in mingw32 winnh.h header
> > and also for cygwin in
> >   /usr/include/aout.h
> >   /usr/include/w32api/winnt.h
> > as well as in
> >   /usr/include/w32api/ddk/ntimage.h
> >
> > and I was afraid that such a header could be included indirectly
> > by some of the other headers.
> 
> I don't think that's very likely.  That'd mean that coff/pe.h would
> need guards for its related definitions too.
> 
> >   Below is a patch to remove the unneeded checks...
> >
> > 2012-12-13  Pierre Muller  <muller@sourceware.org>
> >
> >         * coff-pe-read.c (IMAGE_SCN_CNT_TEXT,
> IMAGE_SCN_CNT_INITIALIZED_DATA)
> >         (IMAGE_SCN_CNT_UNINITIALIZED_DATA): Remove useless checks
> >         for already defined macros.
> >
> > Index: coff-pe-read.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/coff-pe-read.c,v
> > retrieving revision 1.19
> > diff -u -p -r1.19 coff-pe-read.c
> > --- coff-pe-read.c      13 Dec 2012 10:44:45 -0000      1.19
> > +++ coff-pe-read.c      13 Dec 2012 12:46:09 -0000
> > @@ -55,15 +55,9 @@ struct read_pe_section_data
> >    char *section_name;          /* Recorded section name.  */
> >  };
> >
> > -#ifndef IMAGE_SCN_CNT_CODE
> >  # define IMAGE_SCN_CNT_CODE 0x20
> 
> The spaces in "# define" should be removed too.  Okay with that change.

  Thanks committed with your change applied.

And my apologies for the cross-post about the
coff/internal.h header need.

 Pierre


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