aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/configure.srv
AgeCommit message (Collapse)AuthorFilesLines
2022-09-13gdbserver/csky add csky gdbserver supportJiangshuai Li1-0/+5
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/+6
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-03-22nat: Split out platform-independent aarch64 debug register support.John Baldwin1-0/+1
Move non-Linux-specific support for hardware break/watchpoints from nat/aarch64-linux-hw-point.c to nat/aarch64-hw-point.c. Changes beyond a simple split of the code are: - aarch64_linux_region_ok_for_watchpoint and aarch64_linux_any_set_debug_regs_state renamed to drop linux_ as they are not platform specific. - Platforms must implement the aarch64_notify_debug_reg_change function which is invoked from the platform-independent code when a debug register changes for a given debug register state. This does not use the indirection of a 'low' structure as is done for x86. - The handling for kernel_supports_any_contiguous_range is not pristine. For non-Linux it is simply defined to true. Some uses of this could perhaps be implemented as new 'low' routines for the various places that check it instead? - Pass down ptid into aarch64_handle_breakpoint and aarch64_handle_watchpoint rather than using current_lwp_ptid which is only defined on Linux. In addition, pass the ptid on to aarch64_notify_debug_reg_change instead of the unused state argument.
2021-10-29gdb: or1k: implement gdb serverStafford Horne1-0/+8
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-04-13Remove process_stratum_target::hostio_last_error abstractionPedro Alves1-5/+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/+2
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.
2020-10-07gdbserver: Add GNU/Linux support for ARCAnton Kolesov1-0/+11
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-07Add NetBSD/aarch64 gdbserver supportKamil Rytarowski1-0/+6
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-02Add NetBSD/i386 gdbserver supportKamil Rytarowski1-0/+6
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/+6
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-12gdbserver: remove support for ARM/WinCESimon Marchi1-20/+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-6/+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-5/+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-10/+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-5/+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-06-12gdbserver: remove support for NeutrinoSimon Marchi1-4/+0
This port has been unmaintained for years, remove it. gdbserver/ChangeLog: * configure: Re-generate. * configure.ac: Remove srv_qnx test. * configure.srv: Remove nto case. * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove. * remote-utils.c: Remove __QNX__-guarded code. Change-Id: I8a1ad9c740a69352da1f6993778dbf951eebb22f
2020-06-12gdbserver: remove support for LynxOSSimon Marchi1-13/+0
This port has been unmaintained for years, remove it. gdbserver/ChangeLog: * configure: Re-generate. * configure.ac: Remove srv_lynxos test. * configure.srv: Remove lynxos cases. * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c: Remove. Change-Id: I239d1cf1fc7b4c7a174251bc7981707eaba7d972
2020-04-30Implement debugging of WOW64 processes in gdbserverHannes Domani1-2/+2
gdbserver/ChangeLog: 2020-04-30 Hannes Domani <ssbssa@yahoo.de> * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj): Add arch/i386.o. * win32-arm-low.cc (arm_num_regs): New function. (struct win32_target_ops): Use arm_num_regs. * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64 processes. (i386_get_thread_context): Likewise. (i386_prepare_to_resume): Likewise. (i386_thread_added): Likewise. (i386_single_step): Likewise. (i386_fetch_inferior_register): Likewise. (i386_store_inferior_register): Likewise. (i386_arch_setup): Likewise. (i386_win32_num_regs): New function. (struct win32_target_ops): Use i386_win32_num_regs. * win32-low.cc (win32_get_thread_context): Adapt for WOW64 processes. (win32_require_context): Likewise. (child_add_thread): Likewise. (do_initial_child_stuff): Likewise. (continue_one_thread): Likewise. (win32_process_target::resume): Likewise. (load_psapi): Likewise. (win32_add_all_dlls): Likewise. (maybe_adjust_pc): Likewise. (win32_process_target::qxfer_siginfo): Likewise. (initialize_low): Likewise. * win32-low.h (struct win32_target_ops): Change num_regs to callback function.
2020-04-08Share Windows thread-suspend and -resume codeTom Tromey1-1/+6
This adds "suspend" and "resume" methods to windows_thread_info, and changes gdb and gdbserver to share this code. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (thread_rec): Use windows_thread_info::suspend. (windows_continue): Use windows_continue::resume. * nat/windows-nat.h (struct windows_thread_info) <suspend, resume>: Declare new methods. * nat/windows-nat.c: New file. * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (win32_require_context, suspend_one_thread): Use windows_thread_info::suspend. (continue_one_thread): Use windows_thread_info::resume. * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
2020-02-19gdbserver: Add RISC-V/Linux supportMaciej W. Rozycki1-0/+7
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-12Disable gdbserver on host != target configurationsMaciej W. Rozycki1-2/+9
Correct fallout from commit 919adfe84092 ("Move gdbserver to top level") and revert to not building `gdbserver' in a cross-configuration, that is where host != target, matching the documented behaviour. We have no way to support non-native `gdbserver', and native `gdbserver' is usually of no use with cross-GDB of the chosen host. gdbserver/ChangeLog: 2020-02-12 Maciej W. Rozycki <macro@wdc.com> Pedro Alves <palves@redhat.com> Skip building gdbserver in a cross-configuration. * configure.srv: Set $gdbserver_host depending on whether $target is $host. Use $gdbserver_host instead of $host.
2020-02-07Move gdbserver to top levelTom Tromey1-0/+406
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