Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: "Rodney M. Bates" <rodney.bates@wichita.edu>
Cc: gdb@sources.redhat.com
Subject: Re: Design advice, type pointers between object files
Date: Fri, 11 Feb 2005 16:50:00 -0000	[thread overview]
Message-ID: <20050211164936.GA25768@nevyn.them.org> (raw)
In-Reply-To: <420CDC37.6070705@wichita.edu>

On Fri, Feb 11, 2005 at 10:24:23AM -0600, Rodney M. Bates wrote:
> Do any other languages do this, or do they all create copies of
> type and main_type nodes in every  objfile-obstack that has symbols
> referring to them?  Apparently, somebody believed the STAB type info
> produced by the Modula-3 compiler was not good enough, although
> it does exist, and I haven't seen any obvious problems with it.

There should always be a definition of the type, if there is a variable
which references it.  This problem has come up with stabs
cross-references before; caching between objfiles is a bad idea.
There's some code to copy types in gdbtypes.c IIRC.

> Other possibilities that occur to me:
> 1. Don't discard dynamic library object files when doing a rerun.
> 2. Do discard and reload the main object file when doing a rerun.

No.  These are really bad ideas and they don't scale to the general
case - any of these files could change between runs.

> 3. When looking up a type in this way, make copies of the type and
>   main_type nodes in the objfile_obstack of the referring symbol. 

Would work, I guess.

The best thing would be to try disabling this and using the type info
from your compiler.  If it works, it'll be more efficient.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


      reply	other threads:[~2005-02-11 16:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 16:49 Rodney M. Bates
2005-02-11 16:50 ` Daniel Jacobowitz [this message]

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=20050211164936.GA25768@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=rodney.bates@wichita.edu \
    /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