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

* Re: solib-sunos.c is broken
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Rice @ 2013-08-21  6:57 UTC (permalink / raw)
  To: Tom Tromey; +Cc: GDB Development

On Tue, Aug 20, 2013 at 12:39 PM, Tom Tromey <tromey@redhat.com> wrote:

> It's been broken since at least August of last year.

it also wouldn't have compiled for a year between 2010-08-31 and
2011-08-27 , so it was definitely broken 2 of the last 3 years,
uncertain about the period in between.

http://sourceware.org/ml/gdb-patches/2011-08/msg00477.html


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

* Re: solib-sunos.c is broken
  2013-08-21  6:57 ` Matt Rice
@ 2013-08-21  8:27   ` Mark Kettenis
  2013-08-23 14:05     ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2013-08-21  8:27 UTC (permalink / raw)
  To: ratmice; +Cc: tromey, gdb

> Date: Tue, 20 Aug 2013 23:56:58 -0700
> From: Matt Rice <ratmice@gmail.com>
> 
> On Tue, Aug 20, 2013 at 12:39 PM, Tom Tromey <tromey@redhat.com> wrote:
> 
> > It's been broken since at least August of last year.
> 
> it also wouldn't have compiled for a year between 2010-08-31 and
> 2011-08-27 , so it was definitely broken 2 of the last 3 years,
> uncertain about the period in between.
> 
> http://sourceware.org/ml/gdb-patches/2011-08/msg00477.html

It's only used for old NetBSD and OpenBSD releases that used the a.out
executable format.  Most of them switched to ELF a long time ago.
Except perhaps for OpenBSD/m68k, which only switched this year.

So solib-sunos.c can go, and the various a.out NetBSD and OpenBSD
targets can go with it.  I'd appreciate it if the OpenBSD/m68k bits
stay though, such that I can add the necessary ELF support.


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

* Re: solib-sunos.c is broken
  2013-08-21  8:27   ` Mark Kettenis
@ 2013-08-23 14:05     ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2013-08-23 14:05 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: ratmice, gdb

Mark> It's only used for old NetBSD and OpenBSD releases that used the a.out
Mark> executable format.  Most of them switched to ELF a long time ago.
Mark> Except perhaps for OpenBSD/m68k, which only switched this year.

Mark> So solib-sunos.c can go, and the various a.out NetBSD and OpenBSD
Mark> targets can go with it.  I'd appreciate it if the OpenBSD/m68k bits
Mark> stay though, such that I can add the necessary ELF support.

I'm not in a particular rush to get rid of it.  It can all stay around
until you're ready, as far as I'm concerned.

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