This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Set correct source location for deallocator calls
- From: Mark Wielaard <mark at klomp dot org>
- To: Dehao Chen <dehao at google dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Andrew Pinski <pinskia at gmail dot com>, Bryce McKinlay <bmckinlay at gmail dot com>, Andrew Haley <aph at redhat dot com>, Richard Henderson <rth at redhat dot com>, Jason Merrill <jason at redhat dot com>, Richard Guenther <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Li <davidxl at google dot com>, java at gcc dot gnu dot org
- Date: Sun, 16 Sep 2012 00:31:22 +0200
- Subject: Re: [PATCH] Set correct source location for deallocator calls
- References: <50463661.1020303@redhat.com> <CALUNu-oP9dqG63EHyN18gYj4P3gwrrJcp4Zgrz-pABNxabmsCg@mail.gmail.com> <1346839095.9368.1.camel@springer.wildebeest.org> <CAO2gOZVhW2+VfKU8+n2qrcKr9fgM1G4bRyUTUB_0DATH9eEW6w@mail.gmail.com> <CAMe9rOqpzNa-u7b-nUfeBkpSed5Fkh16tzw4_uyptpMpKfhUfA@mail.gmail.com> <CA+=Sn1=OrqyrGCA-nY1bTpHLc68=q0QGU1t0dsZpA3meLhy0tg@mail.gmail.com> <CAMe9rOpNE0j2eGJDe9PwQg_6JevLVfKCoviVGAwUVCieUMVhFQ@mail.gmail.com> <CAO2gOZUaAjLSmOj-TfSxgVEwxgN349SgePyJaxWhnJqF7iUxuw@mail.gmail.com> <CAMe9rOoKO3rohszZ8KnZKxVADLXQvddeAronnL=J655T4_Lx8Q@mail.gmail.com> <CAO2gOZUgG+UUbcyav_KF0HRzJ8tm9N2hoUeEU8bz8g6JMCrFZw@mail.gmail.com>
On Sun, Sep 16, 2012 at 06:03:24AM +0800, Dehao Chen wrote:
> The dwarf4 specification says:
>
> If the value of the DW_AT_high_pc is of class address, it is the
> relocated address of the first location past the last instruction
> associated with the entity; if it is of class constant, the value is
> an unsigned integer offset which when added to the low PC gives the
> address of the first location past the last instruction associated
> with the entity.
>
> However, I'm not sure how to tell how the DW_AT_high_pc's class is
> represented...
You look at the form in which the attribute is encoded. If it is
DW_FORM_addr then it is of class address, otherwise (DW_FORM_data1,
DW_FORM_data2, DW_FORM_data4, DW_FORM_data8, DW_FORM_sdata or
DW_FORM_udata) it is of class constant.
Cheers,
Mark