Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* solib-sunos.c is broken
@ 2013-08-20 19:39 Tom Tromey
  2013-08-21  6:57 ` Matt Rice
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2013-08-20 19:39 UTC (permalink / raw)
  To: GDB Development

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-23 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-20 19:39 solib-sunos.c is broken Tom Tromey
2013-08-21  6:57 ` Matt Rice
2013-08-21  8:27   ` Mark Kettenis
2013-08-23 14:05     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox