Andrew Burgess 8b8b05a454 gdb: have mips_nbsd_nat_target inherit from nbsd_nat_target
While working on another patch I had reason to look at
mips-netbsd-nat.c, and noticed that the class mips_nbsd_nat_target
inherits directly from inf_ptrace_target.

This is a little strange as alpha_bsd_nat_target,
arm_netbsd_nat_target, hppa_nbsd_nat_target, m68k_bsd_nat_target,
ppc_nbsd_nat_target, sh_nbsd_nat_target, and vax_bsd_nat_target all
inherit from nbsd_nat_target.

Originally, in this commit:

  commit f6ac5f3d63e03a81c4ff3749aba234961cc9090e
  Date:   Thu May 3 00:37:22 2018 +0100

      Convert struct target_ops to C++

When the target tree was converted to C++, all of the above classes
inherited from inf_ptrace_target except for hppa_nbsd_nat_target,
which was the only class that originally inherited from
nbsd_nat_target.

Later on all the remaining targets (except mips) were converted to
inherit from nbsd_nat_target, these are the commits:

  commit 4fed520be264b60893aa674071947890f8172915
  Date:   Sat Mar 14 16:05:24 2020 +0100

      Inherit alpha_netbsd_nat_target from nbsd_nat_target

  commit 6018d381a00515933016c539d2fdc18ad0d304b8
  Date:   Sat Mar 14 14:50:51 2020 +0100

      Inherit arm_netbsd_nat_target from nbsd_nat_target

  commit 01a801176ea15ddfc988cade2e3d84c3b0abfec3
  Date:   Sat Mar 14 16:54:42 2020 +0100

      Inherit m68k_bsd_nat_target from nbsd_nat_target

  commit 9faa006d11a5e08264a007463435f84b77864c9c
  Date:   Thu Mar 19 14:52:57 2020 +0100

      Inherit ppc_nbsd_nat_target from nbsd_nat_target

  commit 9809762324491b851332ce600ae9bde8dd34f601
  Date:   Tue Mar 17 15:07:39 2020 +0100

      Inherit sh_nbsd_nat_target from nbsd_nat_target

  commit d5be5fa4207da00d039a1d5a040ba316e7092cbd
  Date:   Sat Mar 14 13:21:58 2020 +0100

      Inherit vax_bsd_nat_target from nbsd_nat_target

I could only find mailing list threads for ppc and sh in the archive ,
and unfortunately, none of the commits has any real detail that might
explain why mips was missed out, the only extra context I could find
was this message:

  https://sourceware.org/pipermail/gdb-patches/2020-March/166853.html

Which says that "proper" OS support is going to be added to
nbsd_nat_target, hence the need to inherit from that class.

My guess is that leaving mips_nbsd_nat_target unchanged was an
oversight, so, in this commit, I propose changing mips_nbsd_nat_target
to inherit from nbsd_nat_target just like all the other nbsd targets.

My motivation for this patch relates to the post_startup_inferior
target method.  In a future commit I want to change how this method is
handled.  Currently the mips_nbsd_nat_target will pick up the empty
implementation of inf_child_target::post_startup_inferior rather than
the version in netbsd-nat.c.  This feels like a bug to me, as surely,
enabling of proc events is something that would need to be done for
all netbsd targets, regardless of architecture.

In my future patch I have a choice then, either (a) add a new, empty
implementation of post_startup_inferior to mips_nbsd_nat_target,
or (b) this commit, have mips_nbsd_nat_target inherit from
nbsd_nat_target.  Option (b) seems like the right way to go, hence,
this commit.

I've done absolutely no testing for this change, not even building it,
as that would require at least an environment in which I can x-build
mips-netbsd applications, which I have no idea how to set up.
2021-12-13 11:10:29 +00:00
2021-12-13 00:00:11 +00:00
2020-09-25 10:24:44 -04:00
2021-09-09 23:30:12 -04:00
2021-11-29 20:28:29 -05:00
2021-11-15 12:20:12 +10:30
2021-11-14 18:07:50 +10:30
2021-12-03 11:57:17 +00:00
2021-12-09 01:40:28 -05:00
2021-11-29 20:28:29 -05:00
2021-10-29 13:31:37 +03:00
2021-11-12 19:02:12 +10:30
2021-11-13 09:04:03 -08:00
2021-11-13 09:04:03 -08:00

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.
Description
Unofficial mirror of sourceware binutils-gdb repository. Updated daily.
Readme 780 MiB
Languages
C 51.8%
Makefile 22.4%
Assembly 12.3%
C++ 6%
Roff 1.4%
Other 5.4%