Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: GDB Development <gdb@sourceware.org>
Subject: solib-sunos.c is broken
Date: Tue, 20 Aug 2013 19:39:00 -0000	[thread overview]
Message-ID: <87haekgniv.fsf@fleche.redhat.com> (raw)

While working on a global change to minimal symbols, I stumbled across
solib-sunos.c.  It is broken.  I think it won't even compile right now.

Anyway, I thought I'd send a note detailing its various problems.  If
someone wants to fix them up, that would be great.  I don't have access
to any of the affected systems.

It's been broken since at least August of last year.  So, it is
apparently not heavily used, at least not by folks involved with this
community (it is referenced by the various a.out *BSD ports, so perhaps
it is patched up in some BSD tree, I don't know).


Here's the bugs I can see from looking:

* This code is set up to only be compiled for a.out hosts.  That is, it
  is treated as though it is part of the "native" target.

  I think conceptually though this code is really not host-dependent,
  but instead should be part of the tdep layer.

  Fixing this would at least enable folks like me to avoid breaking the
  build...  similar to the machoread and somread changes earlier this
  year.

* allocate_rt_common_objfile allocates an objfile "by hand" and
  populates it.  This violate module boundaries; and in this case the
  code has long since bit-rotted.  It doesn't initialize all the fields
  properly -- e.g., the per-bfd object is missing, "name" is allocated
  with xstrdup.  Some fields it does initialize have been moved to the
  per-bfd object (which is why it won't compile...).

  The fix is to change this code to use the exported objfile API.

* solib_add_common_symbols leaves the minimal-symbol-discarding cleanup
  dangling.  Probably not a severe issue, but best avoided.

* rt_common_objfile is a global, but in the new style it should be
  per-progspace.


I'm happy to file a bug with this info, but my sense is that nobody
looks at a.out bug reports.

Tom


             reply	other threads:[~2013-08-20 19:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 19:39 Tom Tromey [this message]
2013-08-21  6:57 ` Matt Rice
2013-08-21  8:27   ` Mark Kettenis
2013-08-23 14:05     ` 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=87haekgniv.fsf@fleche.redhat.com \
    --to=tromey@redhat.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