From: Dehao Chen <dehao@google.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Andrew Pinski <pinskia@gmail.com>, Mark Wielaard <mark@klomp.org>,
Bryce McKinlay <bmckinlay@gmail.com>,
Andrew Haley <aph@redhat.com>, Richard Henderson <rth@redhat.com>,
Jason Merrill <jason@redhat.com>,
Richard Guenther <richard.guenther@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
David Li <davidxl@google.com>,
java@gcc.gnu.org
Subject: Re: [PATCH] Set correct source location for deallocator calls
Date: Sat, 15 Sep 2012 16:09:00 -0000 [thread overview]
Message-ID: <CAO2gOZUaAjLSmOj-TfSxgVEwxgN349SgePyJaxWhnJqF7iUxuw@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOpNE0j2eGJDe9PwQg_6JevLVfKCoviVGAwUVCieUMVhFQ@mail.gmail.com>
I tried the up-to-date addr2line on any "gcc -g" generated code, it
does not work either. This is because in the new dwarf, the
DW_AT_high_pc now actually means the size. e.g.
<1><9b>: Abbrev Number: 2 (DW_TAG_subprogram)
<9c> DW_AT_external : 1
<9c> DW_AT_name : bar
<a0> DW_AT_decl_file : 1
<a1> DW_AT_decl_line : 8
<a2> DW_AT_linkage_name: (indirect string, offset: 0x7b): _Z3barv
<a6> DW_AT_type : <0x8d>
<aa> DW_AT_low_pc : 0x400583
<b2> DW_AT_high_pc : 0x37 0x0
<ba> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa)
<bc> DW_AT_GNU_all_call_sites: 1
<bc> DW_AT_sibling : <0xff>
However, addr2line still thinks DW_AT_high_pc means "high_pc". I think
we should wait for binutil to catch up with gcc.
Thanks,
Dehao
On Sat, Sep 15, 2012 at 8:55 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Sep 14, 2012 at 9:27 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>> On Fri, Sep 14, 2012 at 9:25 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Sat, Sep 8, 2012 at 2:42 PM, Dehao Chen <dehao@google.com> wrote:
>>>> Hi,
>>>>
>>>> I've added a libjava unittest which verifies that this patch will not
>>>> break Java debug info. I've also incorporated Richard's review in the
>>>> previous mail. Attached is the new patch, which passed bootstrap and
>>>> all gcc/libjava testsuites on x86.
>>>>
>>>> Is it ok for trunk?
>>>>
>>>> Thanks,
>>>> Dehao
>>>>
>>>> gcc/ChangeLog:
>>>> 2012-09-08 Dehao Chen <dehao@google.com>
>>>>
>>>> * tree-eh.c (goto_queue_node): New field.
>>>> (record_in_goto_queue): New parameter.
>>>> (record_in_goto_queue_label): New parameter.
>>>> (lower_try_finally_dup_block): New parameter.
>>>> (maybe_record_in_goto_queue): Update source location.
>>>> (lower_try_finally_copy): Likewise.
>>>> (honor_protect_cleanup_actions): Likewise.
>>>> * gimplify.c (gimplify_expr): Reset the location to unknown.
>>>>
>>>> gcc/testsuite/ChangeLog:
>>>> 2012-09-08 Dehao Chen <dehao@google.com>
>>>>
>>>> * g++.dg/debug/dwarf2/deallocator.C: New test.
>>>>
>>>> libjava/ChangeLog:
>>>> 2012-09-08 Dehao Chen <dehao@google.com>
>>>>
>>>> * testsuite/libjava.lang/sourcelocation.java: New cases.
>>>> * testsuite/libjava.lang/sourcelocation.out: New cases.
>>>
>>> On Linux/x86, I got
>>>
>>> FAIL: sourcelocation -O3 -findirect-dispatch output - source compiled test
>>> FAIL: sourcelocation -O3 output - source compiled test
>>> FAIL: sourcelocation -findirect-dispatch output - source compiled test
>>> FAIL: sourcelocation output - source compiled test
>>>
>>> spawn [open ...]^M
>>> -1
>>> -1
>>> -1
>>> PASS: sourcelocation -findirect-dispatch execution - source compiled test
>>> FAIL: sourcelocation -findirect-dispatch output - source compiled test
>>
>> I bet you have an older addr2line installed.
>>
>
> I am using addr2line from binutils 20120914.
>
>
> --
> H.J.
next prev parent reply other threads:[~2012-09-15 16:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAO2gOZXfnETUe4wqjT7p6fd61hXreu9PDfqKxNz+HxpE0E7K0g@mail.gmail.com>
[not found] ` <CAO2gOZX_hZ1m0xKvxUg+6gWTOX4V5ok-vvCEg3Vhfpt=qXj8-g@mail.gmail.com>
[not found] ` <CAFiYyc00wud5Oa3k51ntm8KeZHZnfm4rpnBsOJjURZMcoqFdTA@mail.gmail.com>
[not found] ` <50228C38.5080703@redhat.com>
[not found] ` <CAO2gOZUbkTsnJ2fwgeNhcRmxkzzJEifECeiF=_YRUjeKDeRMdA@mail.gmail.com>
[not found] ` <502294A1.3060800@redhat.com>
[not found] ` <50243480.7090803@redhat.com>
[not found] ` <CAO2gOZURCuWUk2MVwCwmwrijNzWxJt3q=HUpU7=Qv6zB9e-uqA@mail.gmail.com>
[not found] ` <50254A50.8070208@redhat.com>
[not found] ` <CAO2gOZXhHuFGJ0z=jvkYKZ84EoDaPSYVjxS7QzGore56SyhWyQ@mail.gmail.com>
[not found] ` <50255B35.9020705@redhat.com>
[not found] ` <CAO2gOZWe+qMrVyvOoo7Ek-di0NKZxxU4Z=pqrDCqqCCAfctZOw@mail.gmail.com>
[not found] ` <50258712.4070002@redhat.com>
[not found] ` <CAO2gOZUQQjmKtooyXXAfgFoNVbeNwtT+P=E7pQ6jC=e07Nsr2g@mail.gmail.com>
[not found] ` <CAO2gOZX-Gn+b6LEzps5zxhgmwQWcJ-zFqG=a7hesW6fbVyxZYQ@mail.gmail.com>
[not found] ` <502E6774.8050609@redhat.com>
[not found] ` <CAO2gOZWhueDAShNLbNcJpkHA6QqXk1LNZhEMFvfT77aTZTCH9w@mail.gmail.com>
2012-08-30 14:28 ` Richard Henderson
2012-08-30 14:45 ` Bryce McKinlay
2012-08-30 15:20 ` Andrew Haley
2012-08-30 16:33 ` Richard Henderson
2012-09-04 16:07 ` Dehao Chen
2012-09-04 16:22 ` Andrew Haley
2012-09-04 20:40 ` Dehao Chen
2012-09-04 16:32 ` Bryce McKinlay
2012-09-04 16:40 ` Andrew Haley
2012-09-04 17:08 ` Bryce McKinlay
2012-09-04 17:12 ` Andrew Haley
2012-09-04 17:17 ` Bryce McKinlay
2012-09-04 17:21 ` Andrew Haley
2012-09-04 20:32 ` Dehao Chen
2012-09-05 7:29 ` Andrew Haley
2012-09-05 7:31 ` Andrew Pinski
2012-09-05 9:58 ` Mark Wielaard
2012-09-08 21:42 ` Dehao Chen
2012-09-14 15:14 ` Dehao Chen
2012-09-14 15:20 ` Andrew Haley
2012-09-15 4:25 ` H.J. Lu
2012-09-15 4:27 ` H.J. Lu
2012-09-15 4:27 ` Andrew Pinski
2012-09-15 12:55 ` H.J. Lu
2012-09-15 16:09 ` Dehao Chen [this message]
2012-09-15 18:06 ` H.J. Lu
2012-09-15 22:03 ` Dehao Chen
2012-09-15 22:31 ` Mark Wielaard
2012-09-15 22:39 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAO2gOZUaAjLSmOj-TfSxgVEwxgN349SgePyJaxWhnJqF7iUxuw@mail.gmail.com \
--to=dehao@google.com \
--cc=aph@redhat.com \
--cc=bmckinlay@gmail.com \
--cc=davidxl@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=jason@redhat.com \
--cc=java@gcc.gnu.org \
--cc=mark@klomp.org \
--cc=pinskia@gmail.com \
--cc=richard.guenther@gmail.com \
--cc=rth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).