aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.tgt
AgeCommit message (Collapse)AuthorFilesLines
2021-02-04gdb: riscv: enable sim integrationMike Frysinger1-0/+1
Now the simulator can be loaded via gdb using "target sim".
2020-11-02Add x86_64 ravenscar supportTom Tromey1-1/+2
Support for x86_64 ravenscar was recently added to the Ada runtime. This patch updates gdb to follow. As this is Ada-specific, and was reviewed internally by Joel, I am checking it in. 2020-11-02 Tom Tromey <tromey@adacore.com> * Makefile.in (ALL_64_TARGET_OBS): Add amd64-ravenscar-thread.o. (ALLDEPFILES): Add amd64-ravenscar-thread.c. (HFILES_NO_SRCDIR): Add amd64-ravenscar-thread.h. * amd64-ravenscar-thread.c: New file. * amd64-ravenscar-thread.h: New file. * amd64-tdep.c (amd64_init_abi): Register ravenscar ops. * configure.tgt (amd64_tobjs): Add ravenscar objects.
2020-10-13Normalize names of the NetBSD filesKamil Rytarowski1-16/+16
The files used to be named 'nbsd', which incorrectly reflects the name of the OS and confuses it with other BSD derived OSes. gdb/ChangeLog: * Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS) HFILES_NO_SRCDIR, ALLDEPFILES): Rename files. * alpha-bsd-nat.c: Adjust include. * alpha-bsd-tdep.h: Adjust comment. * alpha-nbsd-tdep.c: Rename to ... * alpha-netbsd-tdep.c: ... this, adjust include. * amd64-nbsd-nat.c: Rename to ... * amd64-netbsd-nat.c: ... this, adjust include. * amd64-nbsd-tdep.c: Rename to ... * amd64-netbsd-tdep.c: ... this, adjust include. * amd64-tdep.h: Adjust include. * arm-nbsd-nat.c: Rename to ... * arm-netbsd-nat.c: ... this, adjust include. * arm-nbsd-tdep.c: Rename to ... * arm-netbsd-tdep.c: ... this, adjust include. * arm-nbsd-tdep.h: Rename to ... * arm-netbsd-tdep.h: ... this, adjust include. * configure.nat: Adjust file lists. * configure.tgt: Likewise. * hppa-nbsd-nat.c: Rename to ... * hppa-netbsd-nat.c: ... this, adjust include. * hppa-nbsd-tdep.c: Rename to ... * hppa-netbsd-tdep.c: ... this, adjust include. * i386-nbsd-nat.c: Rename to ... * i386-netbsd-nat.c: ... this, adjust include. * i386-nbsd-tdep.c: Rename to ... * i386-netbsd-tdep.c: ... this, adjust include. * m68k-bsd-nat.c: Adjust include. * mips-nbsd-nat.c: Rename to ... * mips-netbsd-nat.c: ... this, adjust include. * mips-nbsd-tdep.c: Rename to ... * mips-netbsd-tdep.c: ... this, adjust include. * mips-nbsd-tdep.h: Rename to ... * mips-netbsd-tdep.h: ... this. * nbsd-nat.c: Rename to ... * netbsd-nat.c: ... this, adjust include. * nbsd-nat.h: Rename to ... * netbsd-nat.h: ... this, adjust include. * nbsd-tdep.c: Rename to ... * netbsd-tdep.c: ... this, adjust include. * nbsd-tdep.h: Rename to ... * netbsd-tdep.h: ... this. * ppc-nbsd-nat.c: Rename to ... * ppc-netbsd-nat.c: ... this, adjust include. * ppc-nbsd-tdep.c: Rename to ... * ppc-netbsd-tdep.c: ... this, adjust include and comment. * ppc-nbsd-tdep.h: Rename to ... * ppc-netbsd-tdep.h: ... this. * sh-nbsd-nat.c: Rename to ... * sh-netbsd-nat.c: ... this, adjust include. * sh-nbsd-tdep.c: Rename to ... * sh-netbsd-tdep.c: ... this, adjust include. * sparc-nbsd-nat.c: Rename to ... * sparc-netbsd-nat.c: ... this. * sparc-nbsd-tdep.c: Rename to ... * sparc-netbsd-tdep.c: ... this, adjust include. * sparc64-nbsd-nat.c: Rename to ... * sparc64-netbsd-nat.c: ... this. * sparc64-nbsd-tdep.c: Rename to ... * sparc64-netbsd-tdep.c: ... this, adjust include. * sparc64-tdep.h: Adjust comment. * vax-bsd-nat.c: Adjust include. * vax-nbsd-tdep.c: Rename to ... * vax-netbsd-tdep.c: ... this, adjust include.
2020-08-25arc: Add GNU/Linux support for ARCAnton Kolesov1-0/+5
ARC Linux targets differences from baremetal: - No support for hardware single instruction stepping. - Different access rules to registers. - Use of another instruction for breakpoints. v2: Changes after Tom's remarks [1] arc-linux-tdep.c - Use true/false instead of TRUE/FALSE. - arc_linux_sw_breakpoint_from_kind (): Break long lines into two. - arc_linux_sw_breakpoint_from_kind (): Remove starting blank line. - Use explicit number evaluation, e.g: if (a & b) -> if ((a & b) != 0) arc-tdep.c - Use explicit number evaluation, e.g: if (a & b) -> if ((a & b) != 0) gdb/configure.tgt - arc*-*-linux*): Remove "build_gdbserver=yes". v3: Changes after Simon's remarks [2] arc-linux-tdep.c - Use "return trap_size" instead of cryptic "return 2". - Removed unnecessary curly braces. - Removed "void" from "_initialize_arc_linux_tdep (void)". v5: Changes after Simon's remarks [3] - Remove unnecessary empty lines. - Replace "breakpoint uses" with "breakpoints use" in a comment. - "return condition;" i.s.o. "if (condition) return true; else return false;" [1] Tom's remarks https://sourceware.org/pipermail/gdb-patches/2020-April/167887.html [2] Simon's remarks on v2 https://sourceware.org/pipermail/gdb-patches/2020-May/168513.html [3] Simon's remarks on v4 https://sourceware.org/pipermail/gdb-patches/2020-August/170994.html gdb/ChangeLog: 2020-08-25 Anton Kolesov <anton.kolesov@synopsys.com> * configure.tgt: ARC support for GNU/Linux. * Makefile.in (ALL_TARGET_OBJS): Likewise. * arc-linux-tdep.c: New file. * arc-tdep.h (ARC_STATUS32_L_MASK, ARC_STATUS32_DE_MASK): Declare. * arc-tdep.c (arc_write_pc): Use it.
2020-08-04sim: eBPF simulatorJose E. Marchesi1-0/+1
This patch introduces the basics of an instruction-simulator for eBPF. The simulator is based on CGEN. gdb/ChangeLog: 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com> * configure.tgt: Set gdb_sim for bpf-*-* targets. sim/ChangeLog: 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com> David Faust <david.faust@oracle.com> * configure.tgt (sim_arch): Add entry for bpf-*-*. * configure: Regenerate. * MAINTAINERS: Add maintainer for the BPF simulator. * bpf/Makefile.in: New file. * bpf/bpf-helpers.c: Likewise. * bpf/bpf-helpers.def: Likewise. * bpf/bpf-helpers.h: Likewise. * bpf/bpf-sim.h: Likewise. * bpf/bpf.c: Likewise. * bpf/config.in: Likewise. * bpf/configure.ac: Likewise. * bpf/decode.h: Likewise. * bpf/eng.h: Likewise. * bpf/mloop.in: Likewise. * bpf/sim-if.c: Likewise. * bpf/sim-main.h: Likewise. * bpf/traps.c: Likewise. * bpf/configure: Generate. * bpf/aclocal.m4: Likewise. sim/testsuite/ChangeLog: 2020-08-04 David Faust <david.faust@oracle.com> Jose E. Marchesi <jose.marchesi@oracle.com> * configure: Regenerate. * sim/bpf/allinsn.exp: New file. * sim/bpf/alu.s: Likewise. * sim/bpf/alu32.s: Likewise. * sim/bpf/endbe.s: Likewise. * sim/bpf/endle.s: Likewise. * sim/bpf/jmp.s: Likewise. * sim/bpf/jmp32.s: Likewise. * sim/bpf/ldabs.s: Likewise. * sim/bpf/mem.s: Likewise. * sim/bpf/mov.s: Likewise. * sim/bpf/testutils.inc: Likewise. * sim/bpf/xadd.s: Likewise.
2020-08-04gdb: support for eBPFJose E. Marchesi1-0/+5
This patch adds basic support for the eBPF target: tdep and build machinery. The accompanying simulator is introduced in subsequent patches. gdb/ChangeLog: 2020-08-04 Weimin Pan <weimin.pan@oracle.com> Jose E. Marchesi <jose.marchesi@oracle.com> * configure.tgt: Add entry for bpf-*-*. * Makefile.in (ALL_TARGET_OBS): Add bpf-tdep.o (ALLDEPFILES): Add bpf-tdep.c. * bpf-tdep.c: New file. * MAINTAINERS: Add bpf target and maintainer. gdb/doc/ChangeLog: 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com> * gdb.texinfo (Contributors): Add information for the eBPF support. (BPF): New section.
2020-06-25Don't include *sol2-tdep.o on Linux/sparc*Rainer Orth1-4/+4
Linux/sparc* currently links Solaris-specific files (sparc-sol2-tdep.o, sparc64-sol2-tdep.o, sol2-tdep.o) for no apparent reason. It has no business doing so, and none of the functions/variables defined there are used explicitly. If support for the Solaris OSABI were desired, this should be done using --enable-targets instead. Since neither sparc{32,64}_sol2_init_abi currently declared in common headers (sparc*-tdep.h) are used outside their source files, they are made static and the declarations removed. Tested on sparcv9-sun-solaris2.11 and sparc64-unknown-linux-gnu. * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o. <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o, sol2-tdep.o, sparc-sol2-tdep.o. * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static. * sparc-tdep.h (sparc32_sol2_init_abi): Remove. * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static. * sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
2020-03-16arc: Migrate to new target featuresAnton Kolesov1-1/+1
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.
2020-03-16gdb: rename i386-cygwin-tdep.c to i386-windows-tdep.cSimon Marchi1-3/+3
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.
2020-03-16gdb: add Windows OS ABISimon Marchi1-2/+2
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*'.
2020-02-07Move gdbserver to top levelTom Tromey1-24/+0
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
2019-12-13MSP430: Relax target glob for configuring GDBJozef Lawrynowicz1-1/+1
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.
2019-12-12Ravenscar port for RISC-VTom Tromey1-1/+2
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
2019-11-04Obsolete Solaris 10 supportRainer Orth1-0/+1
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.
2019-09-20Remove Cell Broadband Engine debugging supportUlrich Weigand1-8/+1
This patch implements removal of Cell/B.E. support, including - Support for the spu-*-* target - Support for native stand-alone SPU debugging - Support for integrated debugging of combined PPU/SPU applications - Remote debugging (gdbserver) support for all the above. The patch also removes the TARGET_OBJECT_SPU target object type, as this is available only on Cell/B.E. targets, including - Native Linux support - Core file support (including core file generation) - Remote target support, including removal of the qXfer:spu:read and qXfer:spu:write remote protocal packets and associated support in gdbserver. gdb/ChangeLog 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com> * NEWS: Mention that Cell/B.E. debugging support was removed. * MAINTAINERS: Remove spu target. * config/djgpp/fnchange.lst: Remove entries for removed files. * Makefile.in (ALL_TARGET_OBS): Remove solib-spu.o, spu-multiarch.o, and spu-tdep.o. (HFILES_NO_SRCDIR): Remove solib-spu.h and spu-tdep.h. (ALLDEPFILES): Remove solib-spu.c, spu-linux-nat.c, spu-multiarch.c, and spu-tdep.c. * spu-linux-nat.c: Remove file. * spu-multiarch.c: Remove file. * spu-tdep.c: Remove file. * spu-tdep.h: Remove file. * solib-spu.c: Remove file. * solib-spu.h: Remove file. * configure.host (powerpc64*-*-linux*): Remove Cell/B.E. support. * configure.nat (spu-linux): Remove. * configure.tgt (powerpc*-*-linux*): Remove solib-spu.o and solib-multiarch.o from gdb_target_obs. (spu*-*-*): Remove. * arch/ppc-linux-common.h (struct ppc_linux_features): Remove "cell" feature flag. (ppc_linux_no_features): Update. * arch/ppc-linux-common.c (ppc_linux_match_description): Remove Cell/B.E. support. * arch/ppc-linux-tdesc.h (tdesc_powerpc_cell32l): Remove declaration. (tdesc_powerpc_cell64l): Likewise. * nat/ppc-linux.h (PPC_FEATURE_CELL): Remove. * ppc-linux-nat.c (ppc_linux_nat_target::read_description): Remove Cell/B.E. support. * ppc-linux-tdep.h: Do not include "solib-spu.h" or "spu-tdep.h". Do not include "features/rs6000/powerpc-cell32l.c" or "features/rs6000/powerpc-cell64l.c". (ppc_linux_spu_section): Remove. (ppc_linux_core_read_description): Remove Cell/B.E. support. (spe_context_objfile, spe_context_lm_addr, spe_context_offset, spe_context_cache_ptid, spe_context_cache_ptid): Remove. (ppc_linux_spe_context_lookup): Remove. (ppc_linux_spe_context_inferior_created): Remove. (ppc_linux_spe_context_solib_loaded): Remove. (ppc_linux_spe_context_solib_unloaded): Remove. (ppc_linux_spe_context): Remove. (struct ppu2spu_cache): Remove. (ppu2spu_prev_arch, ppu2spu_this_id, ppu2spu_prev_register): Remove. (struct ppu2spu_data): Remove. (ppu2spu_unwind_register, ppu2spu_sniffer, ppu2spu_dealloc_cache, ppu2spu_unwind): Remove. (ppc_linux_init_abi): Remove Cell/B.E. support. * rs6000-tdep.h (rs6000_gdbarch_init): Remove Cell/B.E. support. * features/Makefile (rs6000/powerpc-cell32l-expedite): Remove. (rs6000/powerpc-cell64l-expedite): Likewise (WHICH): Remove rs6000/powerpc-cell32l and rs6000/powerpc-cell64l. (XMLTOC): Remove rs6000/powerpc-cell32l.xml and rs6000/powerpc-cell64l.xml. * features/rs6000/powerpc-cell32l.xml: Remove. * features/rs6000/powerpc-cell64l.xml: Likewise. * features/rs6000/powerpc-cell32l.c: Remove generated file. * features/rs6000/powerpc-cell64l.c: Likewise. * regformats/rs6000/powerpc-cell32l.dat: Remove generated file. * regformats/rs6000/powerpc-cell64l.dat: Likewise. * regformats/reg-spu.dat: Remove. * target.h (enum target_object): Remove TARGET_OBJECT_SPU. * corelow.c (struct spuid_list): Remove. (add_to_spuid_list): Remove. (core_target::xfer_partial): Remove support for TARGET_OBJECT_SPU. * remote.c (PACKET_qXfer_spu_read, PACKET_qXfer_spu_write): Remove. (remote_protocol_features): Remove associated entries. (_initialize_remote): No longer initialize them. (remote_target::xfer_partial): Remove support for TARGET_OBJECT_SPU. * linux-nat.c (SPUFS_MAGIC): Remove. (linux_proc_xfer_spu): Remove. (spu_enumerate_spu_ids): Remove. (linux_nat_target::xfer_partial): Remove support for TARGET_OBJECT_SPU. * linux-tdep.c (-linux_spu_make_corefile_notes): Remove. (linux_make_corefile_notes): No longer call it. * regcache.c (cooked_read_test): Remove bfd_arch_spu special case. (cooked_write_test): Likewise. gdb/doc/ChangeLog 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com> * doc/gdb.texinfo (Remote Configuration): Remove documentation for qXfer:spu:read and qXfer:spu:write. (General Query Packets): Likewise. (Cell Broadband Engine SPU architecture): Remove subsection. gdb/gdbserver/ChangeLog 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com> * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o and powerpc-cell64l-ipa.o. (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o from srv_regobj. Remove rs6000/powerpc-cell32l.xml and rs6000/powerpc-cell64l.xml from srv_xmlfiles. (spu*-*-*): Remove. * spu-low.c: Remove file. * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove. (parse_spufs_run): Remove. (ppc_get_pc): Remove Cell/B.E. support. (ppc_set_pc): Likewise. (ppc_breakpoint_at): Likewise. (ppc_arch_setup): Likewise. (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or tdesc_powerpc_cell32l. (initialize_low_arch): Do not call init_registers_powerpc_cell64l or init_registers_powerpc_cell32l. * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL. (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l or init_registers_powerpc_cell32l. * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused. (init_registers_powerpc_cell32l): Remove prototype. (init_registers_powerpc_cell64l): Likewise. * target.h (struct target_ops): Remove qxfer_spu member. * server.c (handle_qxfer_spu): Remove. (qxfer_packets): Remove entry for "spu". (handle_query): No longer support qXfer:spu:read or qXfer:spu:write. * linux-low.c (SPUFS_MAGIC): Remove. (spu_enumerate_spu_ids): Remove. (linux_qxfer_spu): Remove. (linux_target_ops): Remove qxfer_spu member. * lynx-low.c (lynx_target_ops): Remove qxfer_spu member. * nto-low.c (nto_target_ops): Remove qxfer_spu member. * win32-low.c (win32_target_ops): Remove qxfer_spu member. gdb/testsuite/ChangeLog 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com> * gdb.arch/spu-info.exp: Remove file. * gdb.arch/spu-info.c: Remove file. * gdb.arch/spu-ls.exp: Remove file. * gdb.arch/spu-ls.c: Remove file. * gdb.asm/asm-source.exp: Remove support for spu*-*-*. * gdb.asm/spu.inc: Remove file. * gdb.base/dump.exp: Remove support for spu*-*-*. * gdb.base/stack-checking.exp: Likewise. * gdb.base/overlays.exp: Likewise. * gdb.base/ovlymgr.c: Likewise. * gdb.base/spu.ld: Remove file. * gdb.cp/bs15503.exp: Remove support for spu*-*-*. * gdb.cp/cpexprs.exp: Likewise. * gdb.cp/exception.exp: Likewise. * gdb.cp/gdb2495.exp: Likewise. * gdb.cp/mb-templates.exp: Likewise. * gdb.cp/pr9167.exp: Likewise. * gdb.cp/userdef.exp: Likewise. * gdb.xml/tdesc-regs.exp: Remove support for spu*-*-*. * gdb.cell: Remove directory. * lib/cell.exp: Remove file.
2019-07-19Arm: Add read_description read funcs and use in GDBAlan Hayward1-3/+5
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.
2018-12-08gdb/or1k: Add linux debugging supportStafford Horne1-0/+8
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.
2018-11-21gdb/riscv: Add target description supportAndrew Burgess1-3/+6
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.
2018-11-06gdb: xtensa: use linux ABI code for uclinuxMax Filippov1-1/+1
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.
2018-11-02(Ada) Add ravenscar tasking support on AArch64Joel Brobecker1-1/+2
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.
2018-11-01arm-pikeos: software single stepJerome Guitton1-0/+1
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.
2018-10-23GDB: New target s12zJohn Darrington1-0/+5
gdb/ * configure.tgt: Add configuration for s12z. * s12z-tdep.c: New file. * NEWS: Mention new target.
2018-10-08Add FreeBSD/riscv architecture.John Baldwin1-0/+5
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.
2018-08-28Add support for new target 'csky'.Hafiz Abid Qadeer1-0/+11
2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com> Hafiz Abid Qadeer <abidh@codesourcery.com> Don Breazeal <donb@codesourcery.com> * csky-linux-tdep.c: New file. * csky-tdep.c: Likewise. * csky-tdep.h: Likewise. * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and csky-tdep.o. (HFILES_NO_SRCDIR): Add csky-tdep.h. (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c * configure.tgt: Add csky support.
2018-08-09RISC-V: Add configure support for riscv*-linux*.Jim Wilson1-0/+6
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*.
2018-05-22[PowerPC] Consolidate linux target description selectionPedro Franco de Carvalho1-1/+2
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.
2018-05-11gdb: xtensa: drop gdb_target definitionMax Filippov1-1/+1
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.
2018-04-16gdb: Remove support for SH-5/SH64Pedro Alves1-8/+3
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.
2018-04-16gdb: Remove OpenBSD/m88k supportPedro Alves1-5/+0
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.
2018-04-15Add x86-tdep.o to i386/amd64 target buildSimon Marchi1-2/+3
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 1d509aa625f8 ("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.
2018-03-06gdb: Initial baremetal riscv supportAndrew Burgess1-0/+5
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.
2018-01-23s390: Split up s390-linux-tdep.c into two filesPhilipp Rudo1-2/+2
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.
2018-01-22Remove mt portYao Qi1-5/+1
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.
2017-12-12gdb: Add OpenRISC or1k and or1knd target supportFranck Jullien1-0/+6
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.
2017-12-08S390: Add symfile-memAndreas Arnez1-1/+1
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.
2017-11-24Fix aarch64-none-elf build errorAlan Hayward1-1/+1
gdb/ * configure.tgt: Add arch/aarch64.o
2017-11-24Add aarch64_create_target_descriptionAlan Hayward1-1/+1
gdb/ * Makefile.in: Add new files. * aarch64-linux-nat.c (aarch64_linux_read_description): Call aarch64_read_description. * aarch64-linux-tdep.c (aarch64_linux_core_read_description): Call aarch64_read_description. * aarch64-tdep.c (aarch64_read_description): New function. (aarch64_gdbarch_init): Call aarch64_read_description. * aarch64-tdep.h (aarch64_read_description): New function. * arch/aarch64.c: New file. * configure.tgt: Add new files.
2017-10-11Add FreeBSD/arm architecture.John Baldwin1-0/+4
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.
2017-10-06Move aarch64-insn.o to arch/aarch64-insn.o and Remove a rule for arch/*.cYao Qi1-1/+1
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.
2017-10-06Move arm.o arm-get-next-pcs.o arm-linux.o to arch/Yao Qi1-4/+4
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.
2017-10-06Move i386.o to arch/i386.oYao Qi1-1/+1
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.
2017-10-06Share code updating gdb_target_obsYao Qi1-109/+129
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.
2017-10-06[RFC] Replicate src dir in build dirYao Qi1-12/+12
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.
2017-09-26Remove support for Solaris < 10 (PR gdb/22185)Rainer Orth1-12/+1
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.html https://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.
2017-09-21Fix aarch64-freebsd build failureYao Qi1-1/+2
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.
2017-09-15Fix x86 build failuresYao Qi1-3/+3
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.
2017-09-06Add FreeBSD/aarch64 architecture.John Baldwin1-0/+5
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.
2017-09-05Add i386.o to gdb_target_obs for x86_64-* targetsYao Qi1-7/+8
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.
2017-09-05Convert the rest x86 target descriptionsYao Qi1-27/+29
This patch changes the rest of x86 target descriptions in GDB and GDBserver. gdb: 2017-09-05 Yao Qi <yao.qi@linaro.org> * amd64-tdep.c (amd64_target_description): Create target descriptions. (_initialize_amd64_tdep): Don't call functions initialize_tdesc_amd64_*. Add self tests. * arch/amd64.c (amd64_create_target_description): Add parameter is_linux. Call set_tdesc_osabi if is_linux is true. * arch/amd64.h (amd64_create_target_description): Update the declaration. * arch/i386.c (i386_create_target_description): Add parameter is_linux. Call set_tdesc_osabi if is_linux is true. * arch/i386.h (i386_create_target_description): Update declaration. * configure.tgt: Add i386.o to gdb_target_obs. * features/Makefile (XMLTOC): Remove i386/*.xml. * features/i386/amd64-avx-avx512.c: Remove. * features/i386/amd64-avx-mpx-avx512-pku.c: Remove. * features/i386/amd64-avx-mpx.c: Remove. * features/i386/amd64-avx.c: Remove. * features/i386/amd64-mpx.c: Remove. * features/i386/amd64.c: Remove. * features/i386/i386-avx-avx512.c: Remove. * features/i386/i386-avx-mpx-avx512-pku.c: Remove. * features/i386/i386-avx-mpx.c: Remove. * features/i386/i386-avx.c: Remove. * features/i386/i386-mmx.c: Remove. * features/i386/i386-mpx.c: Remove. * features/i386/i386.c: Remove. * i386-tdep.c: Don't include features/i386/i386*.c., include target-descriptions.h and arch/i386.h. (i386_target_description): Create target descriptions. (i386_gdbarch_init): Don't call initialize_tdesc_i386_* functions. Do self tests. gdb/gdbserver: 2017-09-05 Yao Qi <yao.qi@linaro.org> * configure.srv (srv_i386_regobj): Remove. (srv_amd64_regobj): Remove. (srv_regobj): Set it to "" for x86 non-linux targets. * linux-x86-tdesc.c (i386_linux_read_description): * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h. (init_registers_i386): Remove the declaration. (tdesc_i386): Remove the declaration. (lynx_i386_arch_setup): Call i386_create_target_description. * nto-x86-low.c: Likewise. * win32-i386-low.c [__x86_64__]: include arch/amd64.h. [!__x86_64__]: include arch/i386.h. (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2017-09-05Convert amd64-linux target descriptionsYao Qi1-1/+1
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.