Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Chris January <chris.january@allinea.com>
Cc: gdb@sourceware.org
Subject: Re: Multiple inferiors and memory consumption
Date: Tue, 10 Jul 2012 19:09:00 -0000	[thread overview]
Message-ID: <87a9z7h1r2.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1341907434.2162.5.camel@gumtree> (Chris January's message of	"Tue, 10 Jul 2012 09:03:54 +0100")

>>>>> "Chris" == Chris January <chris.january@allinea.com> writes:

Chris> We ran across the same problem some time back. There is a comment in
Chris> objfiles.h:
Chris> FIXME:  There is a problem here if the objfile is reusable, and if
Chris>         multiple users are to be supported.  The problem is that the 

I think this refers to some ancient code that wrote out data to a file
and then later mmap'd it back in.  Search the archives for "mmalloc", I
think.

That code is long gone.  I see the comment is gone now too.

Chris> We have a patch that allows multiple programs_spaces to share the same
Chris> objfiles by moving the linked list entry into a new struct
Chris> objfile_instance.

Presumably this only works if the objfile is mapped at the same address
in each inferior.

I wouldn't mind your patch -- I think it is an improvement -- but I was
trying to make it so that sharing happened regardless of the mapping.
There's no deep reason this can't be done, it is just a gdb design
error.

Tom


  reply	other threads:[~2012-07-10 19:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 20:31 Vladimir Prus
2012-07-10  2:29 ` Tom Tromey
2012-07-10  4:55   ` Vladimir Prus
2012-07-10 19:12     ` Tom Tromey
2012-07-10  8:04 ` Chris January
2012-07-10 19:09   ` Tom Tromey [this message]
2012-07-12 11:01     ` Chris January
2012-07-10 20:35 ` Marc Khouzam
2012-07-10 20:59   ` Paul_Koning
2012-07-10 21:06   ` Vladimir Prus

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=87a9z7h1r2.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=chris.january@allinea.com \
    --cc=gdb@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