This patch replaces usage of target descriptions in ARC, where the whole
description is fixed in XML, with new target descriptions where XML describes
individual features, and GDB assembles those features into actual target
description.
v2:
Removed arc.c from ALLDEPFILES in gdb/Makefile.in.
Removed vim modeline from arc-tdep.c to have it in a separate patch.
Removed braces from one line "if/else".
Undid the type change for "jb_pc" (kept it as "int").
Joined the unnecessary line breaks into one line.
No more moving around arm targets in gdb/features/Makefile.
Changed pattern checking for ARC features from "arc/{aux,core}" to "arc/".
v3:
Added include gaurds to arc.h.
Added arc_read_description to _create_ target descriptions less.
v4:
Got rid of ARC_SYS_TYPE_NONE.
Renamed ARC_SYS_TYPE_INVALID to ARC_SYS_TYPE_NUM.
Fixed a few indentations/curly braces.
Converted arc_sys_type_to_str from a macro to an inline function.
gdb/ChangeLog:
2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
Shahab Vahedi <shahab@synopsys.com>
* Makefile.in: Add arch/arc.o
* configure.tgt: Likewise.
* arc-tdep.c (arc_tdesc_init): Use arc_read_description.
(_initialize_arc_tdep): Don't initialize old target descriptions.
(arc_read_description): New function to cache target descriptions.
* arc-tdep.h (arc_read_description): Add proto type.
* arch/arc.c: New file.
* arch/arc.h: Likewise.
* features/Makefile: Replace old target descriptions with new.
* features/arc-arcompact.c: Remove.
* features/arc-arcompact.xml: Likewise.
* features/arc-v2.c: Likewise
* features/arc-v2.xml: Likewise
* features/arc/aux-arcompact.xml: New file.
* features/arc/aux-v2.xml: Likewise.
* features/arc/core-arcompact.xml: Likewise.
* features/arc/core-v2.xml: Likewise.
* features/arc/aux-arcompact.c: Generate.
* features/arc/aux-v2.c: Likewise.
* features/arc/core-arcompact.c: Likewise.
* features/arc/core-v2.c: Likewise.
* target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
Since this file contains things that apply not only to Cygwin binaries,
but also to non-Cygwin Windows binaries, I think it would make more
sense for it to be called i386-windows-tdep.c. It is analogous to
amd64-windows-tdep.c, which we already have.
gdb/ChangeLog:
* i386-cygwin-tdep.c: Rename to...
* i386-windows-tdep.c: ... this.
* Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
i386-windows-tdep.c.
* configure.tgt: Likewise.
GDB currently uses the "Cygwin" OS ABI (GDB_OSABI_CYGWIN) for everything
related to Windows. If you build a GDB for a MinGW or Cygwin target, it
will have "Cygwin" as the default OS ABI in both cases (see
configure.tgt). If you load either a MinGW or Cygwin binary, the
"Cygwin" OS ABI will be selected in both cases.
This is misleading, because Cygwin binaries are a subset of the binaries
running on Windows. When building something with MinGW, the resulting
binary has nothing to do with Cygwin. Cygwin binaries are only special
in that they are Windows binaries that link to the cygwin1.dll library
(if my understanding is correct).
Looking at i386-cygwin-tdep.c, we can see that GDB does nothing
different when dealing with Cygwin binaries versus non-Cygwin Windows
binaries. However, there is at least one known bug which would require
us to make a distinction between the two OS ABIs, and that is the size
of the built-in "long" type on x86-64. On native Windows, this is 4,
whereas on Cygwin it's 8.
So, this patch adds a new OS ABI, "Windows", and makes GDB use it for
i386 and x86-64 PE executables, instead of the "Cygwin" OS ABI. A
subsequent patch will improve the OS ABI detection so that GDB
differentiates the non-Cygwin Windows binaries from the Cygwin Windows
binaries, and applies the "Cygwin" OS ABI for the latter.
The default OS ABI remains "Cygwin" for the GDBs built with a Cygwin
target.
I've decided to split the i386_cygwin_osabi_sniffer function in two,
I think it's cleaner to have a separate sniffer for Windows binaries and
Cygwin cores, each checking one specific thing.
gdb/ChangeLog:
* osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
* osabi.c (gdb_osabi_names): Add "Windows".
* i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
(i386_cygwin_core_osabi_sniffer): New function, extracted from
i386_cygwin_osabi_sniffer.
(_initialize_i386_cygwin_tdep): Register OS ABI
GDB_OSABI_WINDOWS for i386.
* amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
(_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
for x86-64.
* configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
when the target matches '*-*-mingw*'.
This patch moves gdbserver to the top level.
This patch is as close to a pure move as possible -- gdbserver still
builds its own variant of gnulib and gdbsupport. Changing this will
be done in a separate patch.
[v2] Note that, per Simon's review comment, this patch changes the
tree so that gdbserver is not built for or1k or score. This makes
sense, because there is apparently not actually a gdbserver port here.
[v3] This version of the patch also splits out some configury into a
new file, gdbserver/configure.host, so that the top-level configure
script can simply rely on it in order to decide whether gdbserver
should be built.
[v4] This version adds documentation and removes some unnecessary
top-level dependencies.
[v5] Update docs to mention "make all-gdbserver" and change how
top-level configure decides whether to build gdbserver, switching to a
single, shared script.
Tested by the buildbot.
ChangeLog
2020-02-07 Tom Tromey <tom@tromey.com>
Pedro Alves <palves@redhat.com>
* src-release.sh (GDB_SUPPORT_DIRS): Add gdbserver.
* gdbserver: New directory, moved from gdb/gdbserver.
* configure.ac (host_tools): Add gdbserver.
Only build gdbserver on certain systems.
* Makefile.in, configure: Rebuild.
* Makefile.def (host_modules, dependencies): Add gdbserver.
* MAINTAINERS: Add gdbserver.
gdb/ChangeLog
2020-02-07 Tom Tromey <tom@tromey.com>
* README: Update gdbserver documentation.
* gdbserver: Move to top level.
* configure.tgt (build_gdbserver): Remove.
* configure.ac: Remove --enable-gdbserver.
* configure: Rebuild.
* Makefile.in (distclean): Don't mention gdbserver.
Change-Id: I826b7565b54604711dc7a11edea0499cd51ff39e
This enables support for the msp430-elfbare target being added to GCC.
gdb/ChangeLog:
2019-12-13 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* configure.tgt: Match msp430-*-elf* targets when configuring GDB.
This adds Ravenscar support to gdb for RISC-V targets.
This was tested internally using AdaCore's test suite and qemu.
gdb/ChangeLog
2019-12-12 Tom Tromey <tromey@adacore.com>
* Makefile.in (ALL_TARGET_OBS): Add riscv-ravenscar-thread.o.
(HFILES_NO_SRCDIR): Add riscv-ravenscar-thread.h.
(ALLDEPFILES): Add riscv-ravenscar-thread.c.
* configure.tgt (riscv-*-*): Add riscv-ravenscar-thread.o.
* riscv-ravenscar-thread.c: New file.
* riscv-ravenscar-thread.h: New file.
* riscv-tdep.c (riscv_gdbarch_init): Call
register_riscv_ravenscar_ops.
Change-Id: Ic47a3b3cfbbe80c2c82a5f48d2e0481845cac8b0
Here's the patch corresponding to the Solaris 10 obsoletion announcement
https://sourceware.org/ml/gdb/2019-10/msg00008.html
Right now it doesn't remove any code, but obviates the need to test on
that ancient platform. Besides, some of the patches I have in my queue
would require different solutions for Solaris 10 and 11.
There are a few comment-only references that I've kept since they are
still correct as is, even when GDB doesn't support Solaris 10 any
longer. The only code fragment I've left in is support for
/proc/<pid/path/a.out in procfs.c (procfs_target::pid_to_exec_file):
while current Solaris 11 updates provide /proc/<pid>/execname, that
wasn't present in Solaris 11.0 and still isn't in current Illumos and I
didn't want to make live harder for them.
Tested on i386-pc-solaris2.10 (obsolete configuration rejected) and
x86_64-pc-linux-gnu x sparc64-solaris2.10 (likewise)
resp. x86_64-pc-linux-gnu x sparcv9-solaris2.11 (still builds; I'm using
the sparcv9 form for 64-bit SPARC customary on Solaris in the
MAINTAINERS file now).
* NEWS (Changes since GDB 8.3): Document Solaris 10 removal.
* configure.host: Mark *-*-solaris2.10* obsolete.
* configure.tgt: Mark Solaris < 11 obsolete.
* MAINTAINERS (Target Instruction Set Architectures) <sparc>:
Update target triplet.
Switch the Arm target to get target descriptions via arm_read_description
and aarch32_read_description, in the same style as other feature targets.
Add an enum to specify the different types - this will also be of use to
gdbserver in a later patch.
Under the hood return the same existing pre-feature target descriptions.
gdb/ChangeLog:
* Makefile.in: Add new files.
* aarch32-tdep.c: New file.
* aarch32-tdep.h: New file.
* aarch64-linux-nat.c (aarch64_linux_nat_target::read_description):
Call aarch32_read_description.
* arch/aarch32.c: New file.
* arch/aarch32.h: New file.
* arch/arm.c (arm_create_target_description)
(arm_create_mprofile_target_description): New function.
* arch/arm.h (arm_fp_type, arm_m_profile_type): New enum.
(arm_create_target_description)
(arm_create_mprofile_target_description): New declaration.
* arm-fbsd-tdep.c (arm_fbsd_read_description_auxv): Call
read_description functions.
* arm-linux-nat.c (arm_linux_nat_target::read_description):
Likewise.
* arm-linux-tdep.c (arm_linux_core_read_description): Likewise.
* arm-tdep.c (tdesc_arm_list): New variable.
(arm_register_g_packet_guesses): Call create description functions.
(arm_read_description) (arm_read_mprofile_description): New
function.
* arm-tdep.h (arm_read_description)
(arm_read_mprofile_description): Add declaration.
* configure.tgt: Add new files.
Up until now OpenRISC GDB only has supported bare metal debugging. This
patch adds linux userspace debugging and core dump analysis support.
The changes are loosely based on nios2 and riscv implementations.
This was tested with linux 4.20 core dumps for executables linked
against musl libc.
bfd/ChangeLog:
* elf32-or1k.c (or1k_grok_prstatus): New function.
(or1k_grok_psinfo): Likewise.
gdb/ChangeLog:
* Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
* configure.tgt: Add or1k*-*-linux*.
* or1k-linux-tdep.c: New file.
* or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
This commit adds target description support for riscv.
I've used the split feature approach for specifying the architectural
features, and the CSR feature is auto-generated from the riscv-opc.h
header file.
If the target doesn't provide a suitable target description then GDB
will build one by looking at the bfd headers.
This commit does not implement target description creation for the
Linux or FreeBSD native targets, both of these will need to add
read_description methods into their respective target classes, which
probe the target features, and then call
riscv_create_target_description to build a suitable target
description. Until this is done Linux and FreeBSD will get the same
default target description based on the bfd that bare-metal targets
get.
I've only added feature descriptions for 32 and 64 bit registers, 128
bit registers (for RISC-V) are not supported in the reset of GDB yet.
This commit removes the special reading of the MISA register in order
to establish the target features, this was only used for figuring out
the f-register size, and even that wasn't done consistently. We now
rely on the target to tell us what size of registers it has (or look
in the BFD as a last resort). The result of this is that we should
now support RV64 targets with 32-bit float, though I have not
extensively tested this combination yet.
* Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
(HFILES_NO_SRCDIR): Add arch/riscv.h.
* arch/riscv.c: New file.
* arch/riscv.h: New file.
* configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
this list, and add arch/riscv.o.
* features/Makefile: Add riscv features.
* features/riscv/32bit-cpu.c: New file.
* features/riscv/32bit-cpu.xml: New file.
* features/riscv/32bit-csr.c: New file.
* features/riscv/32bit-csr.xml: New file.
* features/riscv/32bit-fpu.c: New file.
* features/riscv/32bit-fpu.xml: New file.
* features/riscv/64bit-cpu.c: New file.
* features/riscv/64bit-cpu.xml: New file.
* features/riscv/64bit-csr.c: New file.
* features/riscv/64bit-csr.xml: New file.
* features/riscv/64bit-fpu.c: New file.
* features/riscv/64bit-fpu.xml: New file.
* features/riscv/rebuild-csr-xml.sh: New file.
* riscv-tdep.c: Add 'arch/riscv.h' include.
(riscv_gdb_reg_names): Delete.
(csr_reggroup): New global.
(struct riscv_register_alias): Delete.
(struct riscv_register_feature): New structure.
(riscv_register_aliases): Delete.
(riscv_xreg_feature): New global.
(riscv_freg_feature): New global.
(riscv_virtual_feature): New global.
(riscv_csr_feature): New global.
(riscv_create_csr_aliases): New function.
(riscv_read_misa_reg): Delete.
(riscv_has_feature): Delete.
(riscv_isa_xlen): Simplify, just return cached xlen.
(riscv_isa_flen): Simplify, just return cached flen.
(riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
(riscv_register_name): Update to make use of tdesc_register_name.
Look up xreg and freg names in the new globals riscv_xreg_feature
and riscv_freg_feature. Don't supply csr aliases here.
(riscv_fpreg_q_type): Delete.
(riscv_register_type): Use tdesc_register_type in almost all
cases, override the returned type in a few specific cases only.
(riscv_print_one_register_info): Handle errors reading registers.
(riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
registers that are otherwise unknown to GDB. Also check the
csr_reggroup.
(riscv_print_registers_info): Remove assert about upper register
number, and use gdbarch_register_reggroup_p instead of
short-cutting.
(riscv_find_default_target_description): New function.
(riscv_check_tdesc_feature): New function.
(riscv_add_reggroups): New function.
(riscv_setup_register_aliases): New function.
(riscv_init_reggroups): New function.
(_initialize_riscv_tdep): Add calls to setup CSR aliases, and
setup register groups. Register new riscv debug variable.
* riscv-tdep.h: Add 'arch/riscv.h' include.
(struct gdbarch_tdep): Remove abi union, and add
riscv_gdbarch_features field. Remove cached quad floating point
type, and provide initialisation for double type field.
* target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
the list of targets using the feature based target descriptions.
* NEWS: Mention target description support.
gdb/doc/ChangeLog:
* gdb.texinfo (Standard Target Features): Add RISC-V Features
sub-section.
gdb/
2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
* configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
so that it applies to uclinux as well.
This patch adds support for debugging Ravenscar tasks, similar to what
is done for ppc and sparc.
gdb/ChangeLog:
* aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c:
New files.
* aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
(aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
* Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
(HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
(ALLDEPFILES): Add aarch64-ravenscar-thread.c.
* configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
and aarch64-ravenscar-thread.o.
* NEWS: Add entry documenting Ravenscar tasking support
on AArch64 ELF.
On ARM, PikeOS does not support hardware single step, causing various
semi-random errors when trying to next/step over some user code. So
this patch changes this target to use software-single-step instead.
The challenge is that, up to now, the PikeOS target was in all respects
identical to a baremetal target as far as GDB was concerned, meaning
we were using the baremetal osabi for this target too. This is no longer
possible, and we need to introduce a new OSABI variant. Unfortunately,
there isn't anything in the object file that would allow us to
differentiate between the two platforms. So we have to rely on a
heuristic instead, where we look for some known symbols that are
required in a PikeOS application (these symbols are expected to be
defined by the default linker script, and correspond to routines used
to allocate the application stack).
For the long run, the hope is that the stub implementation provided
by PikeOS is enhanced so that it includes vContSupported+ to the
$qSupported query, and then that the reply to the "vCont?" query
only return support for "continue" operations (thus exclusing "step"
operations). We could then use that information to reliably determine
at connection time that the target does not support single-stepping
and therefore automatically turn software single-stepping automatically
based on it.
gdb/ChangeLog:
* defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
* osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
* arm-pikeos-tdep.c: New file.
* configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
embedded system.
* Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
Tested on arm-pikeos and arm-elf using AdaCore's testsuite.
We also evaluated it on armhf-linux as a cross platform.
Support for collecting and supplying general purpose and floating
point register sets is provided along with signal frame unwinding.
FreeBSD only supports RV64 currently, so while some provision is made
for RV32 in the general-purpose register set, the changes have only
been tested on RV64.
gdb/ChangeLog:
* Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
(HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
(ALLDEPFILES): Add riscv-fbsd-tdep.c.
* NEWS: Mention new FreeBSD/riscv target.
* configure.tgt: Add riscv*-*-freebsd*.
* riscv-fbsd-tdep.c: New file.
* riscv-fbsd-tdep.h: New file.
This adds the target and native configure support, and the NEWS entries for
the new target and native configurations.
gdb/
* Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
(ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
* NEWS: Mention new GNU/Linux RISC-V target.
* configure.host: Add riscv*-*-linux*.
* configure.nat: Add riscv*.
* configure.tgt: Add riscv*-*-linux*.
Share target description declarations and selection among ppc linux
native targets, core files, gdbserver and IPA.
To avoid complicated define guards, gdbserver and IPA now have
declarations for all descriptions, including 64-bit generated
descriptions when compiled in 32-bit mode. These have always been
linked into the gdbserver and IPA binaries. Because they might be
uninitialized, the selection function checks that the selected
description is initialized.
gdb/ChangeLog:
2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
* arch/ppc-linux-common.c: New file.
* arch/ppc-linux-common.h: New file.
* arch/ppc-linux-tdesc.h: New file.
* configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
* Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
(HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
arch/ppc-linux-tdesc.h.
* ppc-linux-nat.c: Include arch/ppc-linux-common.h and
arch/ppc-linux-tdesc.h.
(ppc_linux_nat_target::read_description): Remove target
description matching code. Fill a ppc_linux_features struct and
call ppc_linux_match_description with it. Move comment about ISA
2.05 to ppc-linux-common.c.
* ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
arch/ppc-linux-tdesc.h.
(ppc_linux_core_read_description): Remove target description
matching code. Fill a ppc_linux_features struct and call
ppc_linux_match_description with it.
* ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
(tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
(tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
(tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
(tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
(tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
(tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
(tdesc_powerpc_e500l): Remove.
gdb/gdbserver/ChangeLog:
2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
* configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
* Makefile.in (SFILES): Add arch/ppc-linux-common.c.
* linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
* linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
(tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
(tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
(tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
(tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
(tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
(tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
(tdesc_powerpc_e500l): Remove.
* linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
* linux-ppc-low.c: Include arch/ppc-linux-common.h,
arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
linux-ppc-tdesc.h.
(ppc_arch_setup): Remove target description matching code. Fill a
ppc_linux_features struct and call ppc_linux_match_description
with it.
gdb_target definitions were removed from configure.tgt in 2007, before
xtensa port was merged. Remove it from the xtensa target as well.
gdb/
2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
* configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
Since bfd dropped support for SH-5, there's no point in keeping it in
GDB either.
This restores --enable-targets=all builds.
gdb/ChangeLog:
2018-04-16 Pedro Alves <palves@redhat.com>
* MAINTAINERS (sh): Remove.
* Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
(HFILES_NO_SRCDIR): Remove sh64-tdep.h.
(ALLDEPFILES): Remove sh64-tdep.c.
* NEWS: Mentions that support for SH-5/SH64 is removed.
* configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
(sh*-*-openbsd*): Ditto.
(sh64-*-elf*): Remove.
(sh*): Remove.
* regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
* sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
* sh-tdep.c: No longer include "sh64-tdep.h".
(sh_gdbarch_init): Remove reference to bfd_mach_sh5.
* sh64-tdep.c, sh64-tdep.h: Remove files.
Support for m88k was fully removed from bfd, which broke gdb
--enable-targets=all builds:
> gdb/m88k-tdep.c: In function void _initialize_m88k_tdep():
> gdb/m88k-tdep.c:867:21: error: bfd_arch_m88k was not declared in this scope
> gdbarch_register (bfd_arch_m88k, m88k_gdbarch_init, NULL);
There's no point in keeping GDB support for OpenBSD/m88k with no bfd
support, so this commit simply removes the port.
gdb/ChangeLog:
2018-04-16 Pedro Alves <palves@redhat.com>
* MAINTAINERS: Remove m88k.
* Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
(HFILES_NO_SRCDIR): Remove m88k-tdep.h.
(ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
* NEWS: Mention that support for OpenBSD/m88k was removed.
* configure.host (m88*-*-*): Remove support.
* configure.nat (m88k-*-*): Remove support.
* configure.tgt (m88*-*-openbsd*): Remove.
* m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
We get this error when doing a build with a single amd64 target (the
default when doing just ./configure on x86-64 GNU/Linux):
/home/simark/src/binutils-gdb/gdb/i386-tdep.c:4431: error: undefined reference to 'x86_in_indirect_branch_thunk(unsigned long, char const**, int, int)'
/home/simark/src/binutils-gdb/gdb/amd64-tdep.c:3045: error: undefined reference to 'x86_in_indirect_branch_thunk(unsigned long, char const**, int, int)'
The problem is that commit
1d509aa625 ("infrun: step through indirect branch thunks")
missed adding x86-tdep.o to the list of object file included in an amd64
or i386 build. The problem is not seen with --enable-targets=all
because that file is included in ALL_TARGET_OBS.
Built-tested using:
* --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
* --host=armv7-rpi2-linux-gnueabihf --target=x86_64-pc-linux-gnu
gdb/ChangeLog:
* configure.tgt (x86_tobjs): New variable.
(amd64_tobjs, i386_tobjs): Use it.
This commit introduces basic support for baremetal RiscV as a GDB
target. This target is currently only tested against the RiscV software
simulator, which is not included as part of this commit. The target has
been tested against the following RiscV variants: rv32im, rv32imc,
rv32imf, rv32imfc, rv64im, rv64imc, rv64imfd, rv64imfdc.
Across these variants we pass on average 34858 tests, and fail 272
tests, which is ~0.8%.
The RiscV has a feature of its ABI where structures with a single
floating point field, a single complex float field, or one float and
one integer field are treated differently for argument passing. The
new test gdb.base/infcall-nested-structs.exp is added to cover this
feature. As passing these structures should work on all targets then
I've made the test as a generic one, even though, for most targets,
there's probably nothing special about any of these cases.
gdb/ChangeLog:
* Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
(HFILES_NO_SRCDIR): Add riscv-tdep.h.
(ALLDEPFILES): Add riscv-tdep.c
* configure.tgt: Add riscv support.
* riscv-tdep.c: New file.
* riscv-tdep.h: New file.
* NEWS: Mention new target.
* MAINTAINERS: Add entry for riscv.
gdb/testsuite/ChangeLog:
* gdb.base/infcall-nested-structs.exp: New file.
* gdb.base/infcall-nested-structs.c: New file.
* gdb.base/float.exp: Add riscv support.
Currently all target dependent code for s390 is in one file,
s390-linux-tdep.c. This includes code general for the architecture as
well as code specific for uses in GNU/Linux (user space). Up until now
this was OK as GNU/Linux was the only supported OS. In preparation to
support the new Linux kernel 'OS' split up the existing s390 code into a
general s390-tdep and a GNU/Linux-specific s390-linux-tdep.
Note: The record-replay feature will be moved in a separate patch. This
is simply due to the fact that the combined patch would be too large for
the mailing list. This requires setting the process_record hook during
OSABI init to keep the code bisectable. The patch moving record-replay
cleans up this hack.
gdb/ChangeLog:
* s390-linux-nat.c (s390-tdep.h): New include.
* Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
(HFILES_NO_SRCDIR): Add s390-tdep.h.
(ALLDEPFILES): Add s390-tdep.c.
* configure.tgt (s390*-*-linux*): Add s390-tdep.o.
* s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
* s390-tdep.h: ...this. New file.
* s390-linux-tdep.c (s390-tdep.h): New include.
(_initialize_s390_tdep): Rename to...
(_initialize_s390_linux_tdep): ...this and adjust.
(s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
(enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
s390-tdep.h.
(s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
(is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
(s390_is_partial_instruction, s390_software_single_step)
(is_non_branch_ril, s390_displaced_step_copy_insn)
(s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
(s390_prologue_data, s390_addr, s390_store, s390_load)
(s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
(s390_register_call_saved, s390_guess_tracepoint_registers)
(s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
(regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
(s390_pseudo_register_name, s390_pseudo_register_type)
(s390_pseudo_register_read, s390_pseudo_register_write)
(s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
(s390_ax_pseudo_register_push_stack, s390_gen_return_address)
(s390_addr_bits_remove, s390_address_class_type_flags)
(s390_address_class_type_flags_to_name)
(s390_address_class_name_to_type_flags, s390_effective_inner_type)
(s390_function_arg_float, s390_function_arg_vector)
(is_power_of_two, s390_function_arg_integer, s390_arg_state)
(s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
(s390_frame_align, s390_register_return_value, s390_return_value)
(s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
(s390_unwind_pseudo_register, s390_adjust_frame_regnum)
(s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
(s390_trad_frame_prev_register, s390_unwind_cache)
(s390_prologue_frame_unwind_cache)
(s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
(s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
(s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
(s390_stub_frame_this_id, s390_stub_frame_prev_register)
(s390_stub_frame_sniffer, s390_stub_frame_unwind)
(s390_frame_base_address, s390_local_base_address)
(s390_frame_base, s390_gcc_target_options)
(s390_gnu_triplet_regexp, s390_stap_is_single_operand)
(s390_validate_reg_range, s390_tdesc_valid)
(s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
* s390-tdep.c: ...this. New file.
This patch removes the MT port. The removal was annoucned
https://sourceware.org/ml/gdb-announce/2017/msg00006.html
I'll remove MT from the top-level configure later.
gdb:
2018-01-22 Yao Qi <yao.qi@linaro.org>
* Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
* configure.tgt: Remove target mt.
* mt-tdep.c: Remove.
* regcache.c (cooked_read_test): Remove the check for mt.
This patch prepares the current GDB port of the OpenRISC processor from
https://github.com/openrisc/binutils-gdb for upstream merging.
Testing has been done with a cgen sim provided in a separate patch. This
has been tested with 2 toolchains. GCC [1] 5.4.0 from the OpenRISC
project with Newlib [2] and GCC 5.4.0 with Musl [3] 1.1.4.
It supports or1knd (no delay slot target).
The default target is or1k (with delay slot).
You can change the target arch with:
(gdb) set architecture or1knd
The target architecture is assumed to be or1knd
[1] https://github.com/openrisc/or1k-gcc
[2] https://github.com/openrisc/newlib
[3] https://github.com/openrisc/musl-cross
gdb/doc/ChangeLog:
2017-12-12 Stafford Horne <shorne@gmail.com>
Stefan Wallentowitz <stefan@wallentowitz.de>
Franck Jullien <franck.jullien@gmail.com>
Jeremy Bennett <jeremy.bennett@embecosm.com>
* gdb.texinfo: Add OpenRISC documentation.
gdb/ChangeLog:
2017-12-12 Stafford Horne <shorne@gmail.com>
Stefan Wallentowitz <stefan@wallentowitz.de>
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Franck Jullien <franck.jullien@gmail.com>
Jeremy Bennett <jeremy.bennett@embecosm.com>
* configure.tgt: Add targets for or1k and or1knd.
* or1k-tdep.c: New file.
* or1k-tdep.h: New file.
* features/Makefile: Add or1k.xml to build.
* features/or1k.xml: New file.
* features/or1k-core.xml: New file.
* features/or1k.c: Generated.
For some reason symfile-mem.o is not included in the configuration for
"s390*-*-linux*". It was added to the configuration of most GNU/Linux
targets with a patch from Andrew Cagney:
"Add symfile-mem to all linux targets" --
https://sourceware.org/ml/gdb-patches/2005-02/msg00053.html
But the s390 target was overlooked at that time. Thus the command
"add-symbol-file-from-memory" is missing and VDSO symbols are not loaded.
This is fixed.
gdb/ChangeLog:
* configure.tgt (s390*-*-linux*): Add symfile-mem.o.
Support for collecting and supplying general purpose and floating
point registers is provided along with signal frame unwinding. While
FreeBSD/arm kernels do populate NT_FPREGSET notes, they are always
zero-filled, so this implementation ignores them. Recent FreeBSD/arm
kernels generate NT_ARM_VFP notes which are used to supply
floating-point registers. As with Linux, the AT_HWCAP feature flags
are used to determine the correct target description.
gdb/ChangeLog:
* Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
(ALLDEPFILES): Add arm-fbsd-tdep.c.
* NEWS: Mention new FreeBSD/arm target.
* configure.tgt: Add arm*-*-freebsd*.
* arm-fbsd-tdep.c: New file.
* arm-fbsd-tdep.h: New file.
This patch moves aarch64-insn.o to arch/aarch64-insn.o. Then, all
arch/*.c are built to arch/*.o, so we don't need a Makefile rule to build
*.o from arch/*.c. This patch removes it too.
gdb:
2017-10-06 Yao Qi <yao.qi@linaro.org>
* Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
arch/aarch64-insn.o.
Remove one rule.
* configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
It is tested by building GDB for some targets, arm-elf, arm-netbsd,
arm-linux, and aarch64-linux.
gdb:
2017-10-06 Yao Qi <yao.qi@linaro.org>
* Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
arch/arm-linux.o respectively.
* configure.tgt: Likewise.
This patch changes the build that arch/i386.c is built to arch/i386.o,
instead of i386.o.
gdb:
2017-10-06 Yao Qi <yao.qi@linaro.org>
* Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
* configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
Nowadays, there are much duplications in configure.tgt to update
gdb_target_obs, some cpu specific object files are added to gdb_target_obs
to some different target triplets of the same cpu. The same problem
exists for os specific object files too. It is fragile to update them,
and build with all targets enabled doesn't find the problem.
This patch splits the gdb_target_obs update to three steps, cpu steps, os
steps, and the rest.
I tested this patch by build gdb for each different target triplets
respectively,
aarch64-elf aarch64-rtems aarch64-freebsd aarch64-linux alpha-elf
alpha-linux alpha-netbsd alpha-openbsd arm-elf arm-wince-pe arm-linux
arm-netbsd arm-symbianelf avr cris-elf frv-elf h8300-elf i386-elf
i386-darwin i386-dicos i386-freebsd i386-netbsdelf i386-openbsd
i386-nto i386-solaris i386-linux i386-gnu i386-cygwin i386-mingw32
i386-go32 ia64-linux-gnu ia64-vms lm32-elf m32c-elf m32r-elf m32r-linux
m68hc11-elf m68k-elf m68k-linux m68k-netbsd m68k-openbsd m88k-openbsd
mep-elf microblaze-xilinx-elf microblaze-linux-gnu mips-elf moxie-elf
ms1-elf nios2-elf nios2-linux-gnu hppa-elf hppa-linux hppa-netbsd
hppa-openbsd powerpc-eabi powerpc-freebsd powerpc-netbsd powerpc-openbsd
powerpc-linux powerpc-lynx178 rl78-elf rx-elf s390-linux-gnu score-elf
sh-elf sh-linux sh-openbsd sh64-elf sh64-linux sh64-openbsd sparc64-linux
sparc-linux sparc-freebsd sparc64-freebsd sparc-netbsd sparc64-netbsd
sparc-openbsd sparc64-openbsd spu-elf tic6x-elf tic6x-uclinux v850-elf
vax-netbsd vax-openbsd x86_64-linux-gnu x86_64-darwin x86_64-dicos
x86_64-elf x86_64-freebsd x86_64-mingw32 x86_64-netbsd x86_64-openbsd
x86_64-rtems xstormy16-elf xtensa-elf xtensa-linux
gdb:
2017-10-06 Yao Qi <yao.qi@linaro.org>
* configure.tgt (i386_tobjs): New variable.
(amd64_tobjs): New variable.
Set $cpu_obs and $os_obs.
Nowadays, GDB build tree is almost flat, but source tree isn't. We
have arch/ nat/ target/ common/ cli/ mi/ tui/ python/ guile/ directories.
We need to some rules in Makefile for source files in different source
directories, like,
# Rules for compiling .c files in the various source subdirectories.
%.o: ${srcdir}/arch/%.c
$(COMPILE) $<
$(POSTCOMPILE)
%.o: ${srcdir}/nat/%.c
$(COMPILE) $<
$(POSTCOMPILE)
so we should take care of some special case that files' base name is the
same, like,
# Specify an explicit rule for gdb/common/agent.c, to avoid a clash with the
# object file generate by gdb/agent.c.
common-agent.o: $(srcdir)/common/agent.c
$(COMPILE) $(srcdir)/common/agent.c
$(POSTCOMPILE)
As we add more and more files in different directories, it becomes tricky
to name files, because we need take this into account.
This patch takes the first step toward "Replicate src dir in build dir",
that is, we create arch/ directory in buildtree, and put amd64.o there
as an example. Dependency tracking is updated for files with directory
name. Currently, when we build amd64.o,
"-c -o amd64.o -MT amd64.o -MMD -MP -MF .deps/amd64.Tpo"
with this patch applied, it becomes,
"-c -o arch/amd64.o -MT arch/amd64.o -MMD -MP -MF arch/.deps/amd64.o.Tpo"
"make clean" removes the object files, and "make distclean" removes .deps
additionally. configure file create .deps directory in each of
CONFIG_SRC_SUBDIR, and pass it to Makefile.in, so that "make clean" and
"make distclean" can remove stuffs there.
If people agree with this change, I'll add more directories to
CONFIG_SRC_SUBDIR.
gdb:
2017-10-06 Yao Qi <yao.qi@linaro.org>
* Makefile.in (CONFIG_SRC_SUBDIR): New.
(ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
(clean): Remove object files and dependency files.
(distclean): Remove the directory.
* configure.ac: Invoke AC_CONFIG_COMMANDS.
* configure: Re-generated.
* configure.tgt: Replace amd64.o with arch/amd64.o.
Given that GCC has obsoleted/removed support for Solaris 9 in GCC 4.9/5 in 2013:
https://gcc.gnu.org/gcc-4.9/changes.htmlhttps://gcc.gnu.org/ml/gcc-patches/2013-05/msg00728.html
and the last gdb version that can be compiled with gcc 4.9 is 7.12.1 only when
configured with --disable-build-with-cxx, it's time to obsolete/remove support
for Solaris < 10.
This patch does this, simplifying configure.nat along the way (only a single
sol2 configuration with variants for i386 and sparc).
Some configure checks for older Solaris versions can go, too, and the check
for libthread_db.so.1 removed:
* Since Solaris 10, dlopen has moved to libc and libdl.so is just a
filter on ld.so.1, so no need to check.
* $RDYNAMIC is already handled above (and is a no-op with Solaris ld
anyway).
Both proc-service.c and sol-thread.c lose support for (Solaris-only)
PROC_SERVICE_IS_OLD.
The attached revised patch has been tested on sparcv9-sun-solaris2.10,
sparcv9-sun-solaris2.11.4, amd64-pc-solaris2.10, amd64-pc-solaris2.11.4,
and x86_64-pc-linux-gnu.
I've also started an i386-pc-solaris2.9 build to check that it really
stops as expected.
PR gdb/22185
* configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
obsolete.
Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
Remove i386sol2 support.
* configure.nat <i386sol2>: Remove.
<sol2-64>: Fold into ...
<sol2>: ... this.
Move common settings to default section.
Add sol-thread.o.
* configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
x86_64-*-solaris2.1[0-9]*>: Rename to ...
<i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
<i[34567]86-*-solaris*>: Remove.
<sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
* configure.ac: Remove wctype in libw check.
(_MSE_INT_H): Don't define on Solaris 7-9.
<solaris*>: Remove libthread_db.so.1 check.
* configure: Regenerate.
* config.in: Regenerate.
* proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
(gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
(gdb_ps_size_t): Remove.
Use base types in users.
* sol-thread.c: Likewise, also for gdb_ps_addr_t.
* NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
I happen to see that fbsd-tdep.o is missing for target aarch64-freebsd,
and it causes the build failure,
aarch64-fbsd-tdep.o: In function `aarch64_fbsd_init_abi(gdbarch_info, gdbarch*)':
binutils-gdb/gdb/aarch64-fbsd-tdep.c:186: undefined reference to `fbsd_init_abi(gdbarch_info, gdbarch*)'
binutils-gdb/gdb/aarch64-fbsd-tdep.c:189: undefined reference to `svr4_lp64_fetch_link_map_offsets()'
binutils-gdb/gdb/aarch64-fbsd-tdep.c:189: undefined reference to `set_solib_svr4_fetch_link_map_offsets(gdbarch*, link_map_offsets* (*)())'
This patch fixed it.
gdb:
2017-09-21 Yao Qi <yao.qi@linaro.org>
* configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
to gdb_target_obs.
Christophe Lyon told me that GDB build failed on i386-linux with
--enable-64-bit-bfd=yes, so I audit the gdb/configure.tgt again. I
find that i386-darwin has the same issue too. Additionally, GDB
for solaris target fails to build too. This patch fixes all of them.
gdb:
2017-09-15 Yao Qi <yao.qi@linaro.org>
* configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
gdb_target_obs.
(i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
Likewise.
(i[34567]86-*-linux*): Likewise.
Support for collecting and supplying general purpose and floating point
register sets is provided along with signal frame unwinding.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
(ALLDEPFILES): Add aarch64-fbsd-tdep.c.
* NEWS: Mention new FreeBSD/aarch64 target.
* configure.tgt: Add aarch64*-*-freebsd*.
* aarch64-fbsd-tdep.c: New file.
* aarch64-fbsd-tdep.h: New file.
This patch fixes the build failure caused by 22916b0
(Convert the rest x86 target descriptions).
gdb:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
targets.
This patch changes amd64-linux target descriptions so that they can be
dynamically generated in both GDB and GDBserver.
gdb/gdbserver:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* Makefile.in (arch-amd64.o): New rule.
* configure.srv: Append arch-amd64.o.
* linux-amd64-ipa.c: Include common/x86-xstate.h.
(get_ipa_tdesc): Call amd64_linux_read_description.
(initialize_low_tracepoint): Don't call init_registers_x32_XXX
and init_registers_amd64_XXX.
* linux-x86-low.c (x86_linux_read_description): Call
amd64_linux_read_description.
(x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
(initialize_low_arch): Don't call init_registers_x32_XXX and
init_registers_amd64_XXX.
* linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
and tdesc_amd64_XXX.
[__x86_64__] (amd64_tdesc_test): New function.
(initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
and init_registers_amd64_XXX.
* linux-x86-tdesc.c: Include arch/amd64.h.
(xcr0_to_tdesc_idx): New function.
(i386_linux_read_description): New function.
(amd64_get_ipa_tdesc_idx): New function.
* linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
(amd64_get_ipa_tdesc): Declare.
gdb:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* amd64-linux-tdep.c: Include arch/amd64.h. Don't include
features/i386/*.c.
(amd64_linux_read_description): Call
amd64_create_target_description.
* arch/amd64.c: New file.
* arch/amd64.h: New file.
* configure.tgt (x86_64-*-linux*): Append amd64.o.
* Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
The code on creating i386-linux target descriptions are quite similar
between GDB and GDBserver, so this patch moves them into a shared file
arch/i386.c. I didn't name it as i386-linux.c, because I want to reuse it
to create other i386 non-linux target descriptions later.
gdb:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* Makefile.in (ALL_TARGET_OBS): Add i386.o.
(SFILES): Add arch/i386.c.
(HFILES_NO_SRCDIR): Add arch/i386.h.
* arch/i386.c: New file.
* arch/i386.h: New file.
* arch/tdesc.h (allocate_target_description): Declare.
(set_tdesc_architecture): Declare.
(set_tdesc_osabi): Declare.
* configure.tgt (i[34567]86-*-linux*): Add i386.o.
* i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
include arch/i386.h.
(i386_linux_read_description): Remove code and call
i386_create_target_description.
(set_tdesc_architecture): New function.
(set_tdesc_osabi): New function.
* target-descriptions.h (allocate_target_description): Remove.
gdb/gdbserver:
2017-09-05 Yao Qi <yao.qi@linaro.org>
* Makefile.in (arch-i386.o): New rule.
* configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
(x86_64-*-linux*): Likewise.
* linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
include arch/i386.h.
(i386_linux_read_description): Remove code and call
i386_create_target_description.
* tdesc.c (allocate_target_description): New function.
* tdesc.h (set_tdesc_architecture): Remove declaration.
(set_tdesc_osabi): Likewise.
I posit that this makes them easier to find.
The other day while working on the wchar_t patch, I had a bit of
trouble finding the DJGPP/go32 tdep bits. My initial reaction was
looking for a go32-specific tdep file, but there's none.
Confirmed that a --host=i586-pc-msdosdjgpp GDB still builds
successfully and includes the i386-go32-tdep.o object.
Confirmed that an --enable-targets=all build of GDB on x86-64
GNU/Linux includes the DJGPP/go32 bits too.
gdb/ChangeLog:
2017-04-12 Pedro Alves <palves@redhat.com>
* Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
* configure.tgt: Handle i[34567]86-*-go32* and
i[34567]86-*-msdosdjgpp*.
* i386-tdep.c (i386_svr4_reg_to_regnum):
Make extern.
(i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
i386-go32-tdep.c.
(_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
* i386-go32-tdep.c: New file.
* i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
declarations.
The bsd-uthread target supports an old thread library ("libc_r") that
was last included in FreeBSD release 6.4 released in 2008. However,
this library has not been used as the default library since FreeBSD
5.0 (2003) and 4.11 (2005). Thread support for modern FreeBSD binaries
is provided via "normal" LWP support in core files and the native
FreeBSD target.
gdb/ChangeLog:
* amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
(amd64fbsd_jmp_buf_reg_offset): Remove.
(amd64fbsd_supply_uthread): Remove function.
(amd64fbsd_collect_uthread): Remove function.
(amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
* configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
(x86_64-*-freebsd*): Remove bsd-uthread.o.
(fbsd-nat.c): Update comment.
* i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
(i386fbsd_jmp_buf_reg_offset): Remove.
(i386fbsd_supply_uthread): Remove function.
(i386fbsd_collect_uthread): Remove function.
(i386fbsd_init_abi): Don't set bsd-uthread callbacks.
FreeBSD last shipped a release for Alpha (6.3) in 2008.
This also removes support for GNU/kFreeBSD on Alpha.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
(ALLDEPFILES): Remove alpha-fbsd-tdep.c
* NEWS: Mention that support for FreeBSD/alpha was removed.
* alpha-fbsd-tdep.c: Delete file.
* config/alpha/fbsd.mh: Delete file.
* configure.host: Delete alpha*-*-freebsd* and
alpha*-*-kfreebsd*-gnu.
* configure.tgt: Delete alpha*-*-freebsd* and
alpha*-*-kfreebsd*-gnu.
This has been tested for the n64 and o32 ABIs. Signal frame unwinders for
both ABIs are provided. FreeBSD/mips requires custom linkmap offsets since
it contains an additional l_off member in 'struct link_map' that other
FreeBSD platforms do not have. Support for collecting and supplying
general purpose and floating point register sets are provided. Common
routines for working with native format register sets are exported for
use by the native target.
gdb/ChangeLog:
* Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
(ALLDEPFILES): Add mips-fbsd-tdep.c.
* NEWS: Mention new FreeBSD/mips target.
* configure.tgt: Add mips*-*-freebsd*.
* mips-fbsd-tdep.c: New file.
* mips-fbsd-tdep.h: New file.
gdb/doc/ChangeLog:
* gdb.texinfo (Contributors): Add SRI International and University
of Cambridge for FreeBSD/mips.