diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-01-25 14:10:42 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-03-25 17:14:18 +0000 |
commit | 5920765d7513aaae9241a1850d62d73e0477f81c (patch) | |
tree | 5856d3974a1037984255ee2455f6f1c62bb8bd58 /gdbserver/linux-arm-low.cc | |
parent | 874f4887f0361e953f7098459ae60a5f894d362a (diff) | |
download | binutils-5920765d7513aaae9241a1850d62d73e0477f81c.zip binutils-5920765d7513aaae9241a1850d62d73e0477f81c.tar.gz binutils-5920765d7513aaae9241a1850d62d73e0477f81c.tar.bz2 |
gdbserver: convert have_ptrace_getregset to a tribool
Convert the have_ptrace_getregset global within gdbserver to a
tribool. This brings the flag into alignment with the corresponding
flag in GDB.
The gdbserver have_ptrace_getregset variable is already used as a
tribool, it just doesn't have the tribool type.
In a future commit I plan to share more code between GDB and
gdbserver, and having this variable be the same type in both code
bases will make the sharing much easier.
There should be no user visible changes after this commit.
Approved-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdbserver/linux-arm-low.cc')
-rw-r--r-- | gdbserver/linux-arm-low.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbserver/linux-arm-low.cc b/gdbserver/linux-arm-low.cc index 396ec88..b4f0e07 100644 --- a/gdbserver/linux-arm-low.cc +++ b/gdbserver/linux-arm-low.cc @@ -1007,9 +1007,9 @@ arm_target::low_arch_setup () /* Check if PTRACE_GETREGSET works. */ if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, &iov) == 0) - have_ptrace_getregset = 1; + have_ptrace_getregset = TRIBOOL_TRUE; else - have_ptrace_getregset = 0; + have_ptrace_getregset = TRIBOOL_FALSE; } bool @@ -1122,7 +1122,7 @@ arm_target::get_regs_info () { const struct target_desc *tdesc = current_process ()->tdesc; - if (have_ptrace_getregset == 1 + if (have_ptrace_getregset == TRIBOOL_TRUE && (is_aarch32_linux_description (tdesc) || arm_linux_get_tdesc_fp_type (tdesc) == ARM_FP_TYPE_VFPV3)) return ®s_info_aarch32; |