From: Tristan Gingold <gingold@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/4] aix: add support for dwarf2.
Date: Wed, 01 Jun 2011 15:37:00 -0000 [thread overview]
Message-ID: <4080FD67-AFB2-4E92-BA72-94C5AD5C209A@adacore.com> (raw)
In-Reply-To: <m37h9g2paz.fsf@fleche.redhat.com>
On May 24, 2011, at 3:36 PM, Tom Tromey wrote:
>>>>>> "Tristan" == Tristan Gingold <gingold@adacore.com> writes:
>
> Tristan> + if (this_symtab_psymtab == NULL)
> Tristan> + return;
>
> Tom> I don't understand this change.
>
> Tristan> This is just a guard. process_linenos (called by
> Tristan> aix_process_linenos) will dereference this_symtab_psymtab,
> Tristan> which is set by read_xcoff_symtab. However, if the psymtab is
> Tristan> built by dwarf2, the variable will never be initialized.
>
> Tristan> Do you think the issue is somewhere else ?
>
> It is very unclear to me whether this can be non-NULL even with DWARF.
> In the DWARF case wouldn't the line information come from the DWARF line
> table? In which case it seems like xcoffread.c should have a second
> struct sym_fns, with a NULL entry for this method.
Tom,
here is my understanding of the issue.
aix_process_linenos is called by end_symtab.
In the case of a standard xcoff binary, a symtab is created only if debugging symbols are present and everything is consistent.
In the case of an xcoff binary compiled without debug info, no symtab is created.
In the case of a dwarf xcoff binary, a symtab is created (by dwarf2read), and the call to aix_process_linenos crashes because of
a non-consistent state within xcoffread. I am not sure that we could have a second sym_fns, as an objfile can have both dwarf2 and
stabs debug info.
In fact this_symtab_psymtab is NULL with dwarf, as it is set only by read_xcoff_symtab, which is called only numsyms != 0. This happens only when linenos are present.
I fear that adding a second sym_fns will be harder to manage than the proposed guard.
What do you think ?
Tristan.
next prev parent reply other threads:[~2011-06-01 15:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 10:29 [RFA] Add dwarf2 support to xcoff (aix) Tristan Gingold
2011-05-23 10:29 ` [PATCH 2/4] dwarf2read.c: handle alternate dwarf2 debug sections name Tristan Gingold
2011-05-23 15:22 ` Tom Tromey
2011-05-23 15:32 ` Tristan Gingold
2011-05-23 15:40 ` Tom Tromey
2011-05-26 7:48 ` Tristan Gingold
2011-05-23 10:29 ` [PATCH 4/4] bfd.c: hancle aixcoff in bfd_get_sign_extend_vma Tristan Gingold
2011-05-23 10:29 ` [PATCH 1/4] Really make dwarf2_get_section_info public Tristan Gingold
2011-05-23 15:15 ` Tom Tromey
2011-05-24 12:41 ` Tristan Gingold
2011-05-23 10:35 ` [PATCH 3/4] aix: add support for dwarf2 Tristan Gingold
2011-05-23 15:35 ` Tom Tromey
2011-05-23 15:42 ` Tom Tromey
2011-05-23 15:47 ` Tristan Gingold
2011-05-23 15:50 ` Tom Tromey
2011-05-24 7:20 ` Tristan Gingold
2011-05-24 13:37 ` Tom Tromey
2011-05-24 13:44 ` Tristan Gingold
2011-05-24 14:56 ` Tom Tromey
2011-05-24 15:11 ` Tristan Gingold
2011-06-01 15:37 ` Tristan Gingold [this message]
2011-06-02 19:11 ` Tom Tromey
2011-06-07 12:32 ` Tristan Gingold
2011-05-23 16:00 ` [RFA] Add dwarf2 support to xcoff (aix) Yao Qi
2011-05-24 7:06 ` Tristan Gingold
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=4080FD67-AFB2-4E92-BA72-94C5AD5C209A@adacore.com \
--to=gingold@adacore.com \
--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