aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/Makefile.in
AgeCommit message (Collapse)AuthorFilesLines
2024-01-12Update copyright year range in header of all files managed by GDBAndrew Burgess1-1/+1
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
2023-10-04refactor: Rename SVE-specific filesLuis Machado1-1/+1
In preparation to the SME support patches, rename the SVE-specific files to something a bit more meaningful that can be shared with the SME code. In this case, I've renamed the "sve" in the names to "scalable". No functional changes. Regression-tested on aarch64-linux Ubuntu 22.04/20.04. Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2023-01-18Fix 'make TAGS' in gdbserverTom Tromey1-3/+4
PR build/29003 points out that "make TAGS" is broken in gdbserver. This patch fixes the problem that is pointed out there, plus another one I noticed while working on that -- namely that the "sed" computes the wrong names for some source files. Finally, a couple of obsolete variable references are removed. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29003
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-09-13gdbserver/csky add csky gdbserver supportJiangshuai Li1-0/+2
Add new files: gdb/arch/csky.c gdb/arch/csky.h gdb/features/cskyv2-linux.c gdbserver/linux-csky-low.cc 1. In gdb/arch/csky.c file, add function "csky_create_target_description()" for csky_target::low_arch_setup(). later, it can be used for csky native gdb. 2. In gdb/features/cskyv2-linux.c file, create target_tdesc for csky, include gprs, pc, hi, lo, float, vector and float control registers. 3. In gdbserver/linux-csky-low.cc file, using PTRACE_GET/SET_RGESET to get/set registers. The main data structures in asm/ptrace.h are: struct pt_regs { unsigned long tls; unsigned long lr; unsigned long pc; unsigned long sr; unsigned long usp; /* * a0, a1, a2, a3: * r0, r1, r2, r3 */ unsigned long orig_a0; unsigned long a0; unsigned long a1; unsigned long a2; unsigned long a3; /* * r4 ~ r13 */ unsigned long regs[10]; /* r16 ~ r30 */ unsigned long exregs[15]; unsigned long rhi; unsigned long rlo; unsigned long dcsr; }; struct user_fp { unsigned long vr[96]; unsigned long fcr; unsigned long fesr; unsigned long fid; unsigned long reserved; };
2022-06-14gdbserver: Add LoongArch/Linux supportYouling Tang1-0/+2
Implement LoongArch/Linux support, including XML target description handling based on features determined, GPR regset support, and software breakpoint handling. In the Linux kernel code of LoongArch, ptrace implements PTRACE_POKEUSR and PTRACE_PEEKUSR in the arch_ptrace function, so srv_linux_usrregs is set to yes. With this patch on LoongArch: $ make check-gdb TESTS="gdb.server/server-connect.exp" [...] # of expected passes 18 [...] Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
2022-04-28Fix libinproctrace.so build on PPCTom Tromey1-1/+2
The recent gnulib import caused a build failure of libinproctrace.so on PPC: alloc.c:(.text+0x20): undefined reference to `rpl_malloc' alloc.c:(.text+0x70): undefined reference to `rpl_realloc' This patch fixes the problem using the same workaround that was previously used for free.
2022-04-14Move target_read_string to target/target.cTom Tromey1-0/+2
This moves the two overloads of target_read_string to a new file, target/target.c, and updates both gdb and gdbserver to build this.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-11-16Remove config.cache in gdbserver's "distclean"Tom Tromey1-2/+1
PR gdb/28586 points out that "make distclean" fails to delete config.cache from gdbserver/. This patch fixes the bug, and removes a duplicate "Makefile" deletion that was also pointed out in the PR.
2021-10-29gdb: or1k: implement gdb serverStafford Horne1-0/+1
This patch adds gdbserver support for OpenRISC. This has been used for debugging the glibc port that in being worked on here: https://github.com/openrisc/or1k-glibc/tree/or1k-port-2 Hence the comment about registers definitions being inline with glibc.
2021-10-22Fix 'uninstall' targetTom Tromey1-1/+4
This adds some missing code to the 'uninstall' targets in gdb and gdbserver. It also changes gdb's uninstall target so that it no longer tries to remove any man page -- this is already done (and more correctly) by doc/Makefile.in. I tested this with 'make install' followed by 'make uninstall', then examining the install tree for regular files. Only the 'dir' file remains, but this appears to just be how 'install-info' is intended to work.
2021-10-22Remove unused variables from gdbserver's MakefileTom Tromey1-26/+1
This removes a number of unused variables from gdbserver's Makefile. I found these while working on the subsequent patches, and figured it would be cleaner to have a separate patch for the deletions.
2021-06-14gnulib: define the path to gnulib's parent dirMike Frysinger1-2/+2
The current setting assumes that gnulib is only used by dirs immediately under the source root. Trying to build it two or more levels deep fails. Switch GNULIB_BUILDDIR to a relative GNULIB_PARENT_DIR so that it can be used to construct both the build & source paths.
2021-04-13Remove process_stratum_target::hostio_last_error abstractionPedro Alves1-1/+0
Now that the WinCE port is gone, all ports map host I/O errors from errno, so this abstraction is no longer necessary. Basically undoes: https://sourceware.org/pipermail/gdb-patches/2008-January/055511.html https://sourceware.org/pipermail/gdb-patches/attachments/20080131/f44e7012/attachment.bin gdbserver/ChangeLog: * Makefile.in (SFILES): Remove hostio-errno.cc. * configure: Regenerate. * configure.ac (GDBSERVER_DEPFILES): No longer add $srv_hostio_err_objs. * configure.srv (srv_hostio_err_objs): Delete. * hostio-errno.cc: Delete. * hostio.cc (hostio_error): Inline hostio_last_error_from_errno here. * hostio.h (hostio_last_error_from_errno): Delete. * target.cc (process_stratum_target::hostio_last_error): Delete. * target.h (class process_stratum_target) <hostio_last_error>: Delete.
2021-03-24AArch64: Add gdbserver MTE supportLuis Machado1-0/+1
Adds the AArch64-specific memory tagging support (MTE) by implementing the required hooks and checks for GDBserver. gdbserver/ChangeLog: 2021-03-24 Luis Machado <luis.machado@linaro.org> * Makefile.in (SFILES): Add /../gdb/nat/aarch64-mte-linux-ptrace.c. * configure.srv (aarch64*-*-linux*): Add arch/aarch64-mte-linux.o and nat/aarch64-mte-linux-ptrace.o. * linux-aarch64-low.cc: Include nat/aarch64-mte-linux-ptrace.h. (class aarch64_target) <supports_memory_tagging> <fetch_memtags, store_memtags>: New method overrides. (aarch64_target::supports_memory_tagging) (aarch64_target::fetch_memtags) (aarch64_target::store_memtags): New methods.
2021-02-05gnulib: update to 776af40e0Paul E. Murphy1-1/+1
This fixes PR27184, a failure to compile gdb due to cdefs.h being out of sync with glibc on ppc64le targets which are compiled with -mabi=ieeelongdouble and glibc 2.32. Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD. Likewise, disable newly added rpl_free gnulib api in gdbserver support libraries. Likewise, undefine read/write macros before redefining them on mingw targets. Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace as needed. Change-Id: I86517613c0d8ac8f5ea45bbc4ebe2b54a3aef29f
2021-01-07[gdb/build] Fix gdbserver build with -fsanitize=addressTom de Vries1-2/+11
When doing a gdbserver build with CFLAGS/CXXFLAGS/LDFLAGS=-fsanitize=address we run into: ... ld: ../libiberty/libiberty.a(safe-ctype.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC collect2: error: ld returned 1 exit status make[1]: *** [libinproctrace.so] Error 1 ... This started with commit 96648494173 "gdbsupport: make use of safe-ctype functions from libiberty", which introduced a dependency of libinproctrace.so on libiberty. Fix this in gdbserver/Makefile.in by using a setup similar to what is done in gcc-repo/src/libcc1/Makefile.am, such that ../libiberty/noasan/libiberty.a is used instead. Build on x86_64-linux, both with and without -fsanitize=address. gdbserver/ChangeLog: 2021-01-07 Tom de Vries <tdevries@suse.de> * Makefile.in (LIBIBERTY_NORMAL, LIBIBERTY_NOASAN, LIBIBERTY_PIC): (LIBIBERTY_FOR_SHLIB): New var. (LIBIBERTY): Set using $(LIBIBERTY_NORMAL). (IPA_LIB): Use LIBIBERTY_FOR_SHLIB instead of LIBIBERTY in target rule.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-12-11gdbsupport: make use of safe-ctype functions from libibertyAndrew Burgess1-1/+1
Make use of the safe-ctype replacements for the standard ctype character checking functions in gdbsupport/common-utils.cc. The gdbsupport library is included into both gdb and gdbserver, and on the gdbserver side there are two targets, gdbserver itself, and also libinproctrace.so. libiberty was already being included in the gdbserver link command, but was missing from the libinproctrace.so link. As a result, after changing gdbsupport/common-utils.cc to depend on libiberty, libinproctrace.so would no longer link until I modified its link line. gdbserver/ChangeLog: * Makefile.in (IPA_LIB): Include libiberty library. gdbsupport/ChangeLog: * gdbsupport/common-utils.cc: Change 'ctype.h' include to 'safe-ctype.h'. (extract_string_maybe_quoted): Use safe-ctype function versions. (is_digit_in_base): Likewise. (digit_to_int): Likewise. (strtoulst): Likewise. (skip_spaces): Likewise. (skip_to_space): Likewise.
2020-10-09gnulib: Ensure all libraries are used when building gdb/gdbserverAndrew Burgess1-6/+5
An issue was reported here related to building GDB on MinGW: https://sourceware.org/pipermail/gdb/2020-September/048927.html It was suggested here: https://sourceware.org/pipermail/gdb/2020-September/048931.html that the solution might be to make use of $(LIB_GETRANDOM), a variable defined in the gnulib makefile, when linking GDB. In fact I think the issue is bigger than just LIB_GETRANDOM. When using the script binutils-gdb/gnulib/update-gnulib.sh to reimport gnulib there is a lot of output from gnulib's gnulib-tool. Part of that output is this: You may need to use the following makefile variables when linking. Use them in <program>_LDADD when linking a program, or in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library. $(FREXPL_LIBM) $(FREXP_LIBM) $(INET_NTOP_LIB) $(LIBTHREAD) $(LIB_GETLOGIN) $(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(LIB_MBRTOWC) $(LIB_SETLOCALE_NULL) $(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise What I think this is telling us is that we should be including the value of all these variables on the link line for gdb and gdbserver. The problem though is that these variables are define in gnulib's makefile, but are not (necessarily) defined in GDB's makefile. One solution would be to recreate the checks that gnulib performs in order to recreate these variables in both gdb's and gdbserver's makefile. Though this shouldn't be too hard, most (if not all) of these checks are in the form macros defined in m4 files in the gnulib tree, so we could just reference these as needed. However, in this commit I propose a different solution. Currently, in the top level makefile, we give gdb and gdbserver a dependency on gnulib. Once gnulib has finished building gdb and gdbserver can start, these projects then have a hard coded (relative) path to the compiled gnulib library in their makefiles. In this commit I extend the gnulib configure script to install a new makefile fragment in the gnulib build directory. This new file will have the usual variable substitutions applied to it, and so can include the complete list (see above) of all the extra libraries that are needed when linking against gnulib. In fact the new makefile fragment defines three variables, these are: LIBGNU: The path to the archive containing gnulib. Can be used as a dependency as when this file changes gdb/gdbserver should be relinked. LIBGNU_EXTRA_LIBS: A list of linker -l.... flags that should be included in the link line of gdb/gdbserver. These are libraries that $(LIBGNU) depends on. This list is taken from the output of gnulib-tool, which is run by our gnulib/update-gnulib.sh script. INCGNU: A list of -I.... include paths that should be passed to the compiler, these are where the gnulib headers can be found. Now both gdb and gdbserver can include the makefile fragment and make use of these variables. The makefile fragment relies on the variable GNULIB_BUILDDIR being defined. This is checked for in the fragment, and was already defined in the makefiles of gdb and gdbserver. gdb/ChangeLog: * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking. gdbserver/ChangeLog: * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking. gnulib/ChangeLog: * Makefile.gnulib.inc.in: New file. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Install the new file.
2020-10-07gdb: put user-supplied CFLAGS at the endSimon Marchi1-3/+11
GDB currently doesn't build cleanly with clang (a -Wdeprecated-copy-dtor error). I configured my clang-based GDB build with CXXFLAGS="-Wno-error=deprecated-copy-dtor", so I can use it despite that problem. However, I found that it had no effect. This is because my -Wno-error=Wdeprecated-copy-dtor switch is followed by -Werror in the command line, which switches back all warnings to be errors. If we want the user-supplied C(XX)FLAGS to be able to override flags added by our configure script, the user-supplied C(XX)FLAGS should appear after the configure-supplied flags. This patch moves the user-supplied CXXFLAGS at the very end of the compilation command line, which fixes the problem described above. This means moving it out of INTERNAL_CFLAGS and inlining it in the users of INTERNAL_CFLAGS. I observed the problem when building GDB, but the same problem could happen with GDBserver, so the change is done there too. In GDBserver, INTERNAL_CFLAGS is passed when linking gdb/ChangeLog: * Makefile.in (COMPILE): Add CXXFLAGS. (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS. (check-headers): Add CXXFLAGS. gdbserver/ChangeLog: * Makefile.in (COMPILE): Add CXXFLAGS. (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS. (gdbserver$(EXEEXT)): Add CXXFLAGS. (gdbreplay$(EXEEXT)): Add CXXFLAGS. ($(IPA_LIB)): Add CXXFLAGS. (IPAGENT_COMPILE): Add CXXFLAGS. Change-Id: I00e054506695e0e9536095c6d14827e48abd8f69
2020-10-07Add Makefile.in entry for "Add NetBSD/aarch64 gdbserver support"Kamil Rytarowski1-0/+1
The support is on par with NetBSD/amd64, thus GPR works, single step and software breakpoint are operational, and the SVR4 r_debug integration is functional. gdbserver/ChangeLog: * netbsd-aarch64-low.cc: Add. * Makefile.in (SFILES): Register "netbsd-aarch64-low.c". * configure.srv: Add aarch64*-*-netbsd*.
2020-10-07gdbserver: Add GNU/Linux support for ARCAnton Kolesov1-0/+2
This gdbserver implementation supports ARC ABI v3 and v4 (older ARC ABI versions are not supported by other modern GNU tools or Linux itself). Gdbserver supports inspection of ARC HS registers R30, R58 and R59 - feature that has been added to Linux 4.12. Whether gdbserver build will actually support this feature depends on the version of Linux headers used to build the server. v2 [1]: - Use "this->read_memory ()" instead of "the_target->read_memory ()". - Remove the unnecessary "arch-arc.o:" target from the "Makefile.in". - Got rid of "ntohs()" function and added lots of comments about endianness. - Clarify why "pc" value is read from and saved to different fields in user regs struct. - In function "is_reg_name_available_p()", use a range-based iterator to loop over the registers. - Removed mentioning of issue number that was not related to sourceware. - A few typo's fixed. [1] Remarks https://sourceware.org/pipermail/gdb-patches/2020-September/171911.html https://sourceware.org/pipermail/gdb-patches/2020-September/171919.html gdbserver/ChangeLog: * configure.srv: Support ARC architecture. * Makefile.in: Add linux-arc-low.cc and arch/arc.o. * linux-arc-low.cc: New file.
2020-10-02Add NetBSD/i386 gdbserver supportKamil Rytarowski1-0/+1
The support is on part with NetBSD/amd64, thus GPR works, single step and software breakpoint are operational, and the SVR4 r_debug integration is functional. gdbserver/ChangeLog: * netbsd-i386-low.cc: Add. * Makefile.in (SFILES): Register "netbsd-i386-low.c". * configure.srv: Add i[34567]86-*-netbsd*.
2020-09-10Add minimal and functional NetBSD/amd64 gdbserverKamil Rytarowski1-0/+3
Implement the following functionality: create_inferior, post_create_inferior, attach, kill, detach, mourn, join, thread_alive, resume, wait, fetch_registers, store_registers, read_memory, write_memory, request_interrupt, supports_read_auxv, read_auxv, supports_hardware_single_step, sw_breakpoint_from_kind, supports_z_point_type, insert_point, remove_point, stopped_by_sw_breakpoint, supports_qxfer_siginfo, qxfer_siginfo, supports_stopped_by_sw_breakpoint, supports_non_stop, supports_multi_process, supports_fork_events, supports_vfork_events, supports_exec_events, supports_disable_randomization, supports_qxfer_libraries_svr4, qxfer_libraries_svr4, supports_pid_to_exec_file, pid_to_exec_file, thread_name, supports_catch_syscall. The only CPU architecture supported: x86_64. Implement only support for hardware assisted single step and software breakpoint. Implement support only for regular X86 registers, thus no FPU. gdbserver/ChangeLog: * netbsd-low.cc: Add. * netbsd-low.h: Likewise. * netbsd-amd64-low.cc: Likewise. * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h", "netbsd-amd64-low.cc". * configure.srv: Add x86_64-*-netbsd*.
2020-06-17gdb, gdbserver: remove ARM regdat filesSimon Marchi1-3/+0
This patch removes the leftover regformats .dat files for the arm architecture. There are no longer relevant, since the arm architecture has been converted to use feature-based target-descriptions. These .dat files are used by GDBserver ports that still use static target descriptions. These .dat files are generated from corresponding .xml files in the features directory. And since the corresponding .xml files for these arm .dat files don't exist anymore, it is impossible to re-generated them. If you delete these .dat files and type "make" in the features directory, you'll get: make: *** No rule to make target '../regformats/arm/arm-with-iwmmxt.dat', needed by 'all'. Stop. So it removes the entries in the `WHICH` variable of gdb/features/Makefile. Finally, it removes the rule in gdbserver/Makefile to generate .cc files from `../gdb/regformats/arm/%.dat`. gdb/ChangeLog: * features/Makefile (WHICH): Remove arm files. * regformats/arm/arm-with-iwmmxt.dat: Remove. * regformats/arm/arm-with-neon.dat: Remove. * regformats/arm/arm-with-vfpv2.dat: Remove. * regformats/arm/arm-with-vfpv3.dat: Remove. gdbserver/ChangeLog: * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat): Remove. Change-Id: I3b7d989c50e2cb92235c1f7c7071a26839d84c78
2020-06-12gdbserver: remove support for ARM/WinCESimon Marchi1-2/+0
This port has been unmaintained for years, remove it. gdbserver/ChangeLog: * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc. * configure.srv: Remove mingw32ce cases. * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code. * win32-low.h (to_back_slashes): Remove. * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove. Change-Id: Ib75c0b55b0ab7caca38bbeff5f2fa9397a8e7e8d
2020-06-12gdbserver: remove support for TileSimon Marchi1-1/+0
This port has been unmaintained for years and the upstream Linux kernel does not support this architecture anymore, remove it. gdbserver/ChangeLog: * Makefile.in (SFILES): linux-tile-low.cc. * configure.srv: Remove tilegx case. * linux-tile-low.cc: Remove. Change-Id: I1c2910d04ddbd6013e5d228047106b41d80f9477
2020-06-12gdbserver: remove support for M32RSimon Marchi1-1/+0
This port has been unmaintained for years and the upstream Linux kernel does not support this architecture anymore, remove it. gdbserver/ChangeLog: * Makefile.in (SFILES): Remove linux-m32r-low.cc. * configure.srv: Remove m32r case. * linux-m32r-low.cc: Remove. Change-Id: I5617b2b1fd92aeec19b38e0e3c0b78adaafdb35b
2020-06-12gdbserver: remove support for CRISSimon Marchi1-2/+0
This port has been unmaintained for years and the upstream Linux kernel does not support this architecture anymore, remove it. gdbserver/ChangeLog: * Makefile.in (SFILES): Remove linux-cris-low.c. * configure.srv: Remove cris cases. * linux-cris-low.cc, linux-crisv32-low.cc: Remove. Change-Id: Ib3ff436b03373548215f15540a47f39cbec5f512
2020-06-12gdbserver: remove support for BlackfinSimon Marchi1-1/+0
This port has been unmaintained for years and the upstream Linux kernel does not support this architecture anymore, remove it. gdbserver/ChangeLog: * Makefile.in (SFILES): Remove linux-bfin-low.c. * configure.srv: Remove bfin case. * linux-bfin-low.cc: Remove. * linux-low.cc: Remove BFIN-conditional code. Change-Id: I846310d15e6386118ec7eabb1b87e647174560fb
2020-04-13Switch gdbserver to gdbsupport event loopTom Tromey1-1/+0
This changes gdbserver to use the gdbserver event loop, removing the ancient fork. gdbserver/ChangeLog 2020-04-13 Tom Tromey <tom@tromey.com> * server.h (handle_serial_event, handle_target_event): Update. * server.c: Don't call initialize_event_loop. (keep_processing_events): New global. (handle_serial_event): Return void. Set keep_processing_events. (handle_target_event): Return void. (start_event_loop): Move from event-loop.c. Rewrite. * remote-utils.c (handle_accept_event): Return void. (reset_readchar): Use delete_timer. (process_remaining): Return void. (reschedule): Use create_timer. * event-loop.h: Remove. * event-loop.cc: Remove. * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
2020-03-12Change gdbserver to use existing gdbsupportTom Tromey1-75/+13
This changes the gdbserver build to use the gdbsupport that was built for gdb. gdbserver and gdbreplay now must use WIN32APILIBS (aka -lws2_32). Before this change, gdbserver did not define USE_WIN32API when building gdbsupport, but now this is always done. ChangeLog 2020-03-12 Tom Tromey <tom@tromey.com> * Makefile.in: Rebuild. * Makefile.def (gdbserver): Depend on gdbsupport. gdbserver/ChangeLog 2020-03-12 Tom Tromey <tom@tromey.com> * configure: Rebuild. * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs. (WIN32APILIBS): New subst. * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove gdbsupport files. (gdbsupport/%.o): Remove target. (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables. (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT. (WIN32APILIBS): New variable. (gdbserver$(EXEEXT)): Add WIN32APILIBS. (gdbreplay$(EXEEXT)): Likewise.
2020-03-12Fix gdbserver build when intl already builtTom Tromey1-5/+15
gdbserver uses gdb's alloc.c, and this in turn can include headers from intl via gdbsupport/gdb_locale.h. This can cause build failures in some situations, for example if you build gdb and gdbserver on mingw. This patch restores the gdbsupport dependency on intl, and changes gdbserver to use ZW_GNU_GETTEXT_SISTER_DIR. This fixes this build problem. ChangeLog 2020-03-12 Tom Tromey <tom@tromey.com> * Makefile.in: Rebuild. * Makefile.def (gdbsupport): Depend on intl. gdbserver/ChangeLog 2020-03-12 Tom Tromey <tom@tromey.com> * config.in, configure: Rebuild. * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR. * acinclude.m4: Include gettext-sister.m4. * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New variables. (INCLUDE_CFLAGS): Add INTL_CFLAGS. (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2020-02-21Add a mostlyclean target to gdbserverTom Tromey1-1/+1
I noticed gdbserver's Makefile doesn't have a mostlyclean target. I use this sometimes, so this patch adds it. Adding it as a synonym of "clean" seemed to make sense, given the contents of that rule. gdbserver/ChangeLog 2020-02-21 Tom Tromey <tom@tromey.com> * Makefile.in (mostlyclean): New target.
2020-02-19gdbserver: Add RISC-V/Linux supportMaciej W. Rozycki1-0/+3
Implement RISC-V/Linux support for both RV64 and RV32 systems, including XML target description handling based on features determined, GPR and FPR regset support including dynamic sizing of the latter, and software breakpoint handling. Define two NT_FPREGSET regsets of a different size matching the FPR sizes supported for generic `gdbserver' code to pick from according to what the OS supplies. Also handle a glibc bug where ELF_NFPREG is defined in terms of NFPREG, however NFPREG is nowhere defined. 2020-02-19 Maciej W. Rozycki <macro@wdc.com> Andrew Burgess <andrew.burgess@embecosm.com> gdb/ * NEWS: Mention RISC-V GNU/Linux GDBserver support. gdbserver/ * linux-riscv-low.cc: New file. * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c, and nat/riscv-linux-tdesc.c. * configure.srv <riscv*-*-linux*> (srv_tgtobj) (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db): Define.
2020-02-14Change gdbserver to use existing gnulib and libibertyTom Tromey1-55/+4
This changes gdbserver so that it no longer builds its own gnulib and libiberty. Instead, it now relies on the ones that were already built at the top level. gdbsupport is still built specially for gdbserver. This is more complicated and will be tackled in a subsequent patch. ChangeLog 2020-02-14 Tom Tromey <tom@tromey.com> * Makefile.in: Rebuild. * Makefile.def: Make gdbserver require gnulib and libiberty. gdbserver/ChangeLog 2020-02-14 Tom Tromey <tom@tromey.com> * acinclude.m4: Don't include acx_configure_dir.m4. * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update. (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove. (all, install-only, uninstall, clean-info, clean) (maintainer-clean): Don't recurse. (subdir_do, all-lib): Remove. ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule. (GNULIB_H): Remove. (generated_files): Update. ($(GNULIB_BUILDDIR)/Makefile): Remove rule. * configure: Rebuild. * configure.ac: Don't configure gnulib or libiberty. (GNULIB): Update. gdbsupport/ChangeLog 2020-02-14 Tom Tromey <tom@tromey.com> * common-defs.h: Change path to gnulib/config.h. Change-Id: I469cbbf5db2ab37109c058e9e3a1e4f4dabdfc98
2020-02-13gdbserver: rename source files to .ccSimon Marchi1-66/+66
For the same reasons outlined in the previous patch, this patch renames gdbserver source files to .cc. I have moved the "-x c++" switch to only those rules that require it. gdbserver/ChangeLog: * Makefile.in: Rename source files from .c to .cc. * %.c: Rename to %.cc. * configure.ac: Rename server.c to server.cc. * configure: Re-generate.
2020-02-13gdbsupport: rename source files to .ccSimon Marchi1-28/+28
This patch renames the .c source files in gdbsupport to .cc. In the gdb directory, there is an argument against renaming the source files, which is that it makes using some git commands more difficult to do archeology. Some commands have some kind of "follow" option that makes git try to follow renames, but it doesn't work in all situations. Given that we have just moved the gdbsupport directory, that argument doesn't hold for source files in that directory. I therefore suggest renaming them to .cc, so that they are automatically recognized as C++ by various tools and editors. The original motivation behind this is that when building gdbsupport with clang, I get: CC agent.o clang: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Werror,-Wdeprecated] In the gdb/ directory, we make clang happy by passing "-x c++". We could do this in gdbsupport too, but I think that renaming the files is a better long-term solution. gdbserver still does its own build of gdbsupport, so a few changes in its Makefile are necessary. gdbsupport/ChangeLog: * Makefile.am: Rename source files from .c to .cc. (CC, CFLAGS): Don't override. (AM_CFLAGS): Rename to ... (AM_CXXFLAGS): ... this. * Makefile.in: Re-generate. * %.c: Rename to %.cc. gdbserver/ChangeLog: * Makefile.in: Rename gdbsupport source files from .c to .cc.
2020-02-07Move gdbserver to top levelTom Tromey1-0/+719
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