mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 02:53:48 +08:00
abf516c693
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. |
||
---|---|---|
.. | ||
config.sed | ||
djcheck.sh | ||
djconfig.sh | ||
fnchange.lst | ||
langinfo.h | ||
nl_types.h | ||
README |
How to build and install the DJGPP native version of GDB ******************************************************** General ======= GDB built with DJGPP supports native DJGPP debugging, whereby you run gdb.exe and the program being debugged on the same machine. In addition, this version supports remote debugging via a serial port, provided that the target machine has a GDB-compatible debugging stub which can be linked with the target program (see the section "Remote Serial" in the GDB manual for more details). Installation of the binary distribution ======================================= Simply unzip the gdbNNNb.zip file (where NNN is the version number) from the top DJGPP installation directory. Be sure to preserve the directory structure while you unzip (use -d switch if you do this with PKUNZIP). On Windows 9X and Windows 2000, use an unzip program which supports long file names; one such program is unzip32.exe, available from the DJGPP sites. If you need the libraries which are built as part of GDB, install the companion file gdbNNNa.zip. This allows to develop applications which use the same functions as GDB. For example, you can build your own front end to the debugger. Rebuilding GDB from sources =========================== 1. Prerequisites ------------- To build the package, you will need the DJGPP development environment (GCC, header files, and the libraries), and also DJGPP ports of the following tools: - GNU Make 3.79.1 or later - Bash 2.03 or later - GNU Sed - GNU Fileutils - GNU Textutils 2.0 or later - GNU Sh-utils - GNU Grep 2.4 or later - GNU Findutils - GNU Awk 3.04 or later - GNU Bison (only if you change one of the gdb/*.y files) - Groff (only if you need to format the man pages) - GNU Diffutils (only if you run the test suite) These programs should be available from the DJGPP sites, in the v2gnu directory. In addition, the configuration script invokes the `update' and `utod' utilities which are part of the basic DJGPP development kit (djdevNNN.zip). 2. Unpacking the sources --------------------- If you download the source distribution from one of the DJGPP sites, just unzip it while preserving the directory structure (I suggest to use unzip32.exe available with the rest of DJGPP), and proceed to the section "How to build", below. Source distributions downloaded from one of the GNU FTP sites need some more work to unpack. First, you MUST use the `djunpack' batch file to unzip the package. That's because some file names in the official distributions need to be changed to avoid problems on the various platforms supported by DJGPP. `djunpack' invokes the `djtar' program (that is part of the basic DJGPP development kit) to rename these files on the fly given a file with name mappings; the distribution includes a file `gdb/config/djgpp/fnchange.lst' with the necessary mappings. So you need first to retrieve that batch file, and then invoke it to unpack the distribution. Here's how: djtar -x -p -o gdb-5.2/djunpack.bat gdb-5.2.tar.gz > djunpack.bat djunpack gdb-5.2.tar.gz (The name of the distribution archive and the leading directory of the path to `djunpack.bat' in the distribution will be different for versions of GDB other than 5.2.) If the argument to `djunpack.bat' include leading directories, it MUST be given with the DOS-style backslashes; Unix-style forward slashes will NOT work. If the distribution comes as a .tar.bz2 archive, and your version of `djtar' doesn't support bzip2 decompression, you need to unpack it as follows: bunzip2 gdb-6.4.tar.bz2 djtar -x -p -o gdb-6.4/djunpack.bat gdb-6.4.tar > djunpack.bat djunpack gdb-6.4.tar 3. How to build ------------ If the source distribution available from DJGPP archives is already configured for DJGPP v2.x (if it is, you will find files named `Makefile' in each subdirectory), then just invoke Make: make To build a package that is not yet configured, or if you downloaded GDB from a GNU FTP site, you will need to configure it first. You will also need to configure it if you want to change the configuration options (e.g., compile without support for the GDBMI interface). To configure GDB, type this command: sh ./gdb/config/djgpp/djconfig.sh This script checks the unpacked distribution, then edits the configure scripts in the various subdirectories, to make them suitable for DJGPP, and finally invokes the top-level configure script, which recursively configures all the subdirectories. You may pass optional switches to djconfig.sh. It accepts all the switches accepted by the original GDB configure script. These switches are described in the file gdb/README, and their full list can be displayed by running the following command: sh ./gdb/configure --help NOTE: if you *do* use optional command-line switches, you MUST pass to the script the name of the directory where GDB sources are unpacked--even if you are building GDB in-place! For example: sh ./gdb/config/djgpp/djconfig.sh . --disable-gdbmi It is also possible to build GDB in a directory that is different from the one where the sources were unpacked. In that case, you have to pass the source directory as the first argument to the script: sh ./gdb/config/djgpp/djconfig.sh d:/gnu/gdb-6.4 You MUST use forward slashes in the first argument. After the configure script finishes, run Make: make If you want to produce the documentation (for example, if you changed some of the Texinfo sources), type this: make info When Make finishes, you can install the package: make install prefix='${DJDIR}' INSTALL='ginstall -c' The above doesn't install the docs; for that you will need to say this: make install-info prefix='${DJDIR}' INSTALL='ginstall -c' The test suite has been made to work with DJGPP. If you make a change in some of the programs, or want to be sure you have a fully functional GDB executable, it is a good idea to run the test suite. You cannot use "make check" for that, since it will want to run the `dejagnu' utility which DJGPP doesn't support. Instead, use the special script gdb/config/djgpp/djcheck.sh, like this: cd gdb/testsuite sh ../config/djgpp/djcheck.sh This will run for a while and should not print anything, except the messages "Running tests in DIR", where DIR is one of the subdirectories of the testsuite. Any test that fails to produce the expected output will cause the diffs between the expected and the actual output be printed, and in addition will leave behind a file SOMETHING.tst (where SOMETHING is the name of the failed test). You should compare each of the *.tst files with the corresponding *.out file and convince yourself that the differences do not indicate a real problem. Examples of differences you can disregard are changes in the copyright blurb printed by GDB, values of unitialized variables, addresses of global variables like argv[] and envp[] (which depend on the size of your environment), etc. Note that djcheck.sh only recurses into those of the subdirectories of the test suite which test features supported by the DJGPP port of GDB. For example, the tests in the gdb.gdbtk, and gdb.threads directories are not run. Enjoy, Eli Zaretskii <eliz@gnu.org>