aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-05-08 15:04:56 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-06-14 09:08:45 +0100
commita402c3ac22ec70620d19a0758f10a8d15835fb5e (patch)
tree314729667ce76f678abd004d49ff042c880a7532 /gdb
parent18d4886c009aaa4fa26bf440ae57fbdd14acce11 (diff)
downloadgdb-a402c3ac22ec70620d19a0758f10a8d15835fb5e.zip
gdb-a402c3ac22ec70620d19a0758f10a8d15835fb5e.tar.gz
gdb-a402c3ac22ec70620d19a0758f10a8d15835fb5e.tar.bz2
gdb: move have_ptrace_getregset declaration into gdb/nat directory
In a later commit I want to access have_ptrace_getregset from a .c file in the nat/ directory. To achieve this I need access to the declaration of have_ptrace_getregset. Currently have_ptrace_getregset is declared (and defined) twice, once in GDB and once in gdbserver. This commit moves the declaration into nat/linux-nat.h, but leaves the two definitions where they are. Now, in my later commit, I can pull in the declaration from nat/linux-nat.h. There should be no user visible changes after this commit. Approved-By: Felix Willgerodt <felix.willgerodt@intel.com>
Diffstat (limited to 'gdb')
-rw-r--r--gdb/linux-nat.c2
-rw-r--r--gdb/linux-nat.h3
-rw-r--r--gdb/nat/linux-nat.h3
3 files changed, 4 insertions, 4 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index c95d420..c0fe08a 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -243,7 +243,7 @@ PTRACE_PEEKTEXT/PTRACE_POKETEXT or process_vm_readv/process_vm_writev:
struct linux_nat_target *linux_target;
-/* Does the current host support PTRACE_GETREGSET? */
+/* See nat/linux-nat.h. */
enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN;
/* When true, print debug messages relating to the linux native target. */
diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h
index 92b16f7..f30a5f9 100644
--- a/gdb/linux-nat.h
+++ b/gdb/linux-nat.h
@@ -299,9 +299,6 @@ lwp_info_range all_lwps ();
lwp_info_safe_range all_lwps_safe ();
-/* Does the current host support PTRACE_GETREGSET? */
-extern enum tribool have_ptrace_getregset;
-
/* Called from the LWP layer to inform the thread_db layer that PARENT
spawned CHILD. Both LWPs are currently stopped. This function
does whatever is required to have the child LWP under the
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
index d4a36cb..b9fba79 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -36,6 +36,9 @@ struct arch_lwp_info;
instead SIGTRAP with bit 7 set. */
#define SYSCALL_SIGTRAP (SIGTRAP | 0x80)
+/* Does the current host support PTRACE_GETREGSET? */
+extern tribool have_ptrace_getregset;
+
/* Return the ptid of the current lightweight process. With NPTL
threads and LWPs map 1:1, so this is equivalent to returning the
ptid of the current thread. This function must be provided by