Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-29 Thread Tristan Gingold
On 28 May 2015, at 17:14, Ian Lance Taylor i...@google.com wrote: On Thu, May 28, 2015 at 5:01 AM, Tristan Gingold ging...@adacore.com wrote: On 28 May 2015, at 02:26, Ian Lance Taylor i...@google.com wrote: The #include windows.h will break cross-compilers. It's not OK for trunk

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-29 Thread Ian Lance Taylor
On Fri, May 29, 2015 at 1:43 AM, Tristan Gingold ging...@adacore.com wrote: On 28 May 2015, at 17:14, Ian Lance Taylor i...@google.com wrote: The way you have written the code, I'm fairly sure that it will be compiled for an i386-coff target. And the only coff target supported is djgpp,

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-28 Thread Tristan Gingold
On 27 May 2015, at 15:36, Jeff Law l...@redhat.com wrote: +static int +coff_is_symbol (const b_coff_internal_symbol *isym) +{ + return isym-type == 0x20 isym-sec 0; +} You probably want const or enum so that you can have a symbolic name rather than 0x20 here. It also seems like the

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-28 Thread Tristan Gingold
On 28 May 2015, at 02:26, Ian Lance Taylor i...@google.com wrote: The #include windows.h will break cross-compilers. It's not OK for trunk until that is fixed. I am confused by this comment, for two reasons: - I don’t see how that would break cross-compilers. Cross compilers hosted on

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-28 Thread Ian Lance Taylor
On Thu, May 28, 2015 at 5:01 AM, Tristan Gingold ging...@adacore.com wrote: On 28 May 2015, at 02:26, Ian Lance Taylor i...@google.com wrote: The #include windows.h will break cross-compilers. It's not OK for trunk until that is fixed. I am confused by this comment, for two reasons: - I

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-27 Thread Jeff Law
On 05/21/2015 06:41 AM, Tristan Gingold wrote: Hello, this patch adds basic support to libbacktrace for PE32 and PE32+ (Windows and Windows64 object formats). Support is ‘basic’ because neither DLL nor PIE (if that exists) are handled. Furthermore, there is no windows versions of mmapio.c

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-27 Thread Ian Lance Taylor
On Wed, May 27, 2015 at 6:36 AM, Jeff Law l...@redhat.com wrote: On 05/21/2015 06:41 AM, Tristan Gingold wrote: Hello, this patch adds basic support to libbacktrace for PE32 and PE32+ (Windows and Windows64 object formats). Support is ‘basic’ because neither DLL nor PIE (if that exists) are

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-22 Thread Ian Lance Taylor
On Thu, May 21, 2015 at 5:41 AM, Tristan Gingold ging...@adacore.com wrote: 2015-05-21 Tristan Gingold ging...@adacore.com * pecoff.c: New file. * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies. * Makefile.in: Regenerate. * filetype.awk: Detect

[Patch]: libbacktrace - add support of PE/COFF

2015-05-21 Thread Tristan Gingold
Hello, this patch adds basic support to libbacktrace for PE32 and PE32+ (Windows and Windows64 object formats). Support is ‘basic’ because neither DLL nor PIE (if that exists) are handled. Furthermore, there is no windows versions of mmapio.c and mmap.c Finally, I have disabled the support of