This is the mail archive of the gcc-patches@gcc.gnu.org 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: [Patch]: libbacktrace - add support of PE/COFF


> On 27 May 2015, at 15:36, Jeff Law <law@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 name ought to better indicate it's testing for function symbols.

Yes, this is now changed.

> It's a given  that you know COFF specifics better than I ever did, so I'm comfortable assuming you got the COFF specifics right.
> 
> The overall structure of elf.c & coff.c is the same with code templates that are very similar, except they work on different underlying types.  Presumably there wasn't a good way to factor any of the generic looking bits out?  And no, I'm not requesting you rewrite all this in BFD :-)

The dummy callback could indeed be easily shared.  For the remaining, thatâs not so simple given the types.  Maybe we can create a âC classâ for symbol infos.

Tristan.


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