Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eirik Fuller <eirik@hackrat.com>
To: David Anderson <davea@quasar.engr.sgi.com>
Cc: gdb-patches@sourceware.org, Jim Blandy <jimb@red-bean.com>
Subject: Re: [PATCH] Use mmap for symbol tables
Date: Tue, 31 Jan 2006 05:00:00 -0000	[thread overview]
Message-ID: <43DEEEF2.7030202@hackrat.com> (raw)
In-Reply-To: <200601310437.k0V4bcJ7208753@quasar.engr.sgi.com>

> Been there, done that, with IRIX/dbx and  'just virtual address
> space' was a disaster for a few big apps

I don't know how dbx handles symbol tables, but in my experience the
size of a symbol table needs to be within a particular power of two to
exhaust virtual address space in a situation where gdb won't exhaust it
anyway with malloc.  A debugger which only keeps a small subset of a
symbol table resident in memory (whether it uses malloc or mmap) can
obviously handle much larger symbol tables, but in my experience that
doesn't describe gdb.

If the mmap patch is runtime optional and disabled by default, it won't
make corner cases with large symbol tables any worse.  I believe the
right long term answer is a better symbol table format (with indexing
stored on disk), even on 64 bit hosts.

> The size of the text and the data can be very large indeed.
> And those, as mmap,  are not going to be used normally.
> So are wasted virtual address space in the debugger.

This suggests a simple way to complicate my mmap patch.  If it can be
determined beforehand what interval of the symbol table gdb is going to
read in its entirety, that interval can be recorded in the BFD struct,
and the first mmap call can map just that interval.  That will
complicate the offset calculations somewhat, but the basic approach will
be the same.  This will only waste virtual address space if the sections
gdb would otherwise read don't form a contiguous region of the file.


  reply	other threads:[~2006-01-31  5:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-31  4:40 David Anderson
2006-01-31  5:00 ` Eirik Fuller [this message]
2006-01-31  5:34   ` Jim Blandy
2006-01-31 14:00     ` Daniel Jacobowitz
2006-01-31 18:39       ` Jim Blandy
2006-02-01 18:11         ` Eirik Fuller
2006-01-31 17:45 ` David Anderson
2006-01-31 18:24 ` Jim Blandy
  -- strict thread matches above, loose matches on Subject: below --
2006-01-31  4:53 David Anderson
2006-01-29 23:36 Eirik Fuller
2006-01-30  5:04 ` Jim Blandy
2006-01-30 11:44   ` Eirik Fuller
2006-01-30 18:07     ` Jim Blandy
2006-01-30 18:59       ` Eirik Fuller
2006-01-30 22:11         ` Jim Blandy
2006-01-31  0:38           ` Eirik Fuller
2006-01-31  1:49             ` Jim Blandy
2006-01-31  3:12               ` Eirik Fuller
2006-01-31 21:48             ` Mark Kettenis
2006-02-01 17:52               ` Eirik Fuller
2006-02-01  6:04       ` Michael Snyder
2006-01-30 11:34 ` Andrew STUBBS
2006-01-30 11:42   ` Corinna Vinschen
2006-01-30 11:48     ` Andrew STUBBS
2006-01-31  2:23 ` Daniel Jacobowitz
2006-01-31  3:31   ` Eirik Fuller
2006-01-31  3:38     ` Daniel Jacobowitz
2006-02-07 22:05     ` Eirik Fuller
2006-02-20 15:52       ` Daniel Jacobowitz
2006-01-31  5:28   ` Jim Blandy
2006-01-31 13:59     ` Daniel Jacobowitz

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=43DEEEF2.7030202@hackrat.com \
    --to=eirik@hackrat.com \
    --cc=davea@quasar.engr.sgi.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jimb@red-bean.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