Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/3] move the "main" data into the per-BFD object
Date: Mon, 06 Jan 2014 18:00:00 -0000	[thread overview]
Message-ID: <87vbxxm1nh.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CADPb22T4fBYr_BEELyju=p8ORPbvBMQTvnrQim6KYcDT9n+SRg@mail.gmail.com>	(Doug Evans's message of "Mon, 6 Jan 2014 09:39:19 -0800")

>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> Seems like there ought to be an invariant that there is only one
Doug> main name.  I ask because it's not clear this invariant is
Doug> enforced (or if it is it's too subtle) and thus what if this loop
Doug> finds the wrong one?

I agree there's some room for improvement, but I don't think this series
makes the code worse in any notable way.  There is no such invariant
today and I don't know how it would be enforced.  I think the new code,
if anything, is slightly more likely to get the correct answer, due to
walking the objfiles in load order, rather than reverse order.  For the
DWARF reader at least this only even triggers for Fortran anyway (gdb
doesn't handle DW_AT_main_subprogram yet), which I think implies a lower
exposure to possible difficulties.

Tom


  reply	other threads:[~2014-01-06 18:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 17:11 [PATCH 0/3] main_name cleanups Tom Tromey
2014-01-06 17:11 ` [PATCH 1/3] make language_of_main static Tom Tromey
2014-01-06 17:11 ` [PATCH 2/3] move main name into the progspace Tom Tromey
2014-01-06 17:11 ` [PATCH 3/3] move the "main" data into the per-BFD object Tom Tromey
2014-01-06 17:39   ` Doug Evans
2014-01-06 18:00     ` Tom Tromey [this message]
2014-01-06 18:23       ` Doug Evans
2014-01-06 21:11         ` Tom Tromey
2014-01-13 20:21           ` Tom Tromey
2014-01-06 19:02 ` [PATCH 0/3] main_name cleanups Pedro Alves
2014-01-13 20:31   ` Tom Tromey
2014-01-15 18:01 ` Tom Tromey

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=87vbxxm1nh.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /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