public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Vladimir Simonov <sv@sw.ru>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: gdb: Incorrect stack unwinding if compressed debug info is used
Date: Fri, 04 Feb 2011 17:47:00 -0000	[thread overview]
Message-ID: <4D4C383A.3000203@sw.ru> (raw)
In-Reply-To: <m3y65vahdf.fsf@fleche.redhat.com>

On 02/04/2011 07:34 PM, Tom Tromey wrote:
>>>>>> "Vladimir" == Vladimir Simonov<sv@sw.ru>  writes:
>
> Vladimir>  I've spend some time and, looks like, found the problem. It is in
> Vladimir>  dwarf2_symbol_mark_computed function (dwarf2read.c). Check
> Vladimir>  "DW_UNSND (attr)<  dwarf2_per_objfile->loc.size"
> Vladimir>  is incorrect if compressed section is used.
>
> Thanks for finding this.
>
> Since fill_in_loclist_baton is going to read the loc section right away
> anyhow, it seems to me that it is simpler to just have
> dwarf2_symbol_mark_computed do it.
>
> Could you try the appended?
>
All is OK with it.
I'd also suggest to remove dwarf2_read_section from
fill_in_loclist_baton. Without it all works ok also.

But resulted code looks a bit hackish:
dwarf2_symbol_mark_computed (...)
{
   if (attr_form_is_section_offset (attr))
      /* We need to read the section before we can check its size,
         because the size is only valid once the section is
         uncompressed.  */
      dwarf2_read_section (dwarf2_per_objfile->objfile,
   		 &dwarf2_per_objfile->loc);
   if (attr_form_is_section_offset (attr)
       ........
        && DW_UNSND (attr)<  dwarf2_per_objfile->loc.size)
   )
   {
      ....
      fill_in_loclist_baton /* which uses results of dwarf2_read_section */
      ....
   }
...

Regards
Vladimir

  reply	other threads:[~2011-02-04 17:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1296238472.3009.ezmlm@sourceware.org>
2011-01-31 16:57 ` Vladimir Simonov
2011-02-02 19:55   ` Paul Pluzhnikov
2011-02-03 16:51     ` Vladimir Simonov
2011-02-04 16:35     ` Tom Tromey
2011-02-04 16:34   ` Tom Tromey
2011-02-04 17:47     ` Vladimir Simonov [this message]
2011-02-04 17:56       ` Tom Tromey
2011-02-04 18:43         ` Vladimir Simonov
2011-02-04 20:31           ` Tom Tromey
2011-02-05 13:53             ` Vladimir Simonov
2011-02-07 15:00               ` Tom Tromey
2011-02-01  7:34 ` gdb: Incorrect stack unwinding if debug info is compressed Vladimir Simonov

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=4D4C383A.3000203@sw.ru \
    --to=sv@sw.ru \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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).