public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 0/3] main_name cleanups
Date: Mon, 06 Jan 2014 19:02:00 -0000	[thread overview]
Message-ID: <52CAFDCD.7070000@redhat.com> (raw)
In-Reply-To: <1389028297-16977-1-git-send-email-tromey@redhat.com>

On 01/06/2014 05:11 PM, Tom Tromey wrote:
> This series cleans up the "main_name" code both for multi-inferior and
> for the long-running objfile splitting project.
> 
> Currently, the name and language of main are globals.  Also, they can
> set in a couple of spots in the debuginfo readers.
> 
> Their global-ness can, I think, affect multi-inferior operation.  

Definitely.

> If
> you have two inferiors that have different main names, then I think
> perhaps some unwinding scenario could fail, because main_name will
> necessarily be incorrect for one of them, and because inside_main_func
> checks this value.  The fix here is to make the determination
> per-progspace.

Sounds right to me.

I was just wondering why duplicate the main name/language both in the
progspace and in the objfiles?  Wouldn't just storing a pointer to the
objfile that has the main name and its language in the progspace
be enough?  If not, then it'd be good to mention that in a comment,
I think.

> Setting them in the debuginfo readers is bad because, once debuginfo
> sharing happens, the second progspace to use the debuginfo will not
> pick up the main name automatically.  The fix here is to record the
> debuginfo readers' findings in the per-BFD object.
> 
> Let me know what you think.

-- 
Pedro Alves

  parent reply	other threads:[~2014-01-06 19:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 17:11 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
2014-01-06 18:23       ` Doug Evans
2014-01-06 21:11         ` Tom Tromey
2014-01-13 20:21           ` Tom Tromey
2014-01-06 17:11 ` [PATCH 1/3] make language_of_main static Tom Tromey
2014-01-06 19:02 ` Pedro Alves [this message]
2014-01-13 20:31   ` [PATCH 0/3] main_name cleanups 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=52CAFDCD.7070000@redhat.com \
    --to=palves@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).