diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdb/x86-linux-nat.c | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | binutils-users/simark/clang-format.zip binutils-users/simark/clang-format.tar.gz binutils-users/simark/clang-format.tar.bz2 |
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/x86-linux-nat.c')
-rw-r--r-- | gdb/x86-linux-nat.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c index fd21452..9702eeb 100644 --- a/gdb/x86-linux-nat.c +++ b/gdb/x86-linux-nat.c @@ -75,11 +75,8 @@ x86_linux_nat_target::low_new_fork (struct lwp_info *parent, pid_t child_pid) child_state = x86_debug_reg_state (child_pid); *child_state = *parent_state; } - -x86_linux_nat_target::~x86_linux_nat_target () -{ -} +x86_linux_nat_target::~x86_linux_nat_target () {} /* Implement the virtual inf_ptrace_target::post_startup_inferior method. */ @@ -124,24 +121,24 @@ x86_linux_nat_target::read_description () /* Get CS register. */ errno = 0; - cs = ptrace (PTRACE_PEEKUSER, tid, - offsetof (struct user_regs_struct, cs), 0); + cs = ptrace (PTRACE_PEEKUSER, tid, offsetof (struct user_regs_struct, cs), + 0); if (errno != 0) - perror_with_name (_("Couldn't get CS register")); + perror_with_name (_ ("Couldn't get CS register")); is_64bit = cs == AMD64_LINUX_USER64_CS; /* Get DS register. */ errno = 0; - ds = ptrace (PTRACE_PEEKUSER, tid, - offsetof (struct user_regs_struct, ds), 0); + ds = ptrace (PTRACE_PEEKUSER, tid, offsetof (struct user_regs_struct, ds), + 0); if (errno != 0) - perror_with_name (_("Couldn't get DS register")); + perror_with_name (_ ("Couldn't get DS register")); is_x32 = ds == AMD64_LINUX_X32_DS; if (sizeof (void *) == 4 && is_64bit && !is_x32) - error (_("Can't debug 64-bit process with 32-bit GDB")); + error (_ ("Can't debug 64-bit process with 32-bit GDB")); } #elif HAVE_PTRACE_GETFPXREGS if (have_ptrace_getfpxregs == -1) @@ -166,16 +163,16 @@ x86_linux_nat_target::read_description () iov.iov_len = sizeof (xstateregs); /* Check if PTRACE_GETREGSET works. */ - if (ptrace (PTRACE_GETREGSET, tid, - (unsigned int) NT_X86_XSTATE, &iov) < 0) + if (ptrace (PTRACE_GETREGSET, tid, (unsigned int) NT_X86_XSTATE, &iov) + < 0) have_ptrace_getregset = TRIBOOL_FALSE; else { have_ptrace_getregset = TRIBOOL_TRUE; /* Get XCR0 from XSAVE extended state. */ - xcr0 = xstateregs[(I386_LINUX_XSAVE_XCR0_OFFSET - / sizeof (uint64_t))]; + xcr0 + = xstateregs[(I386_LINUX_XSAVE_XCR0_OFFSET / sizeof (uint64_t))]; } } @@ -196,7 +193,7 @@ x86_linux_nat_target::read_description () } else { - const struct target_desc * tdesc + const struct target_desc *tdesc = i386_linux_read_description (xcr0_features_bits); if (tdesc == NULL) @@ -207,7 +204,6 @@ x86_linux_nat_target::read_description () gdb_assert_not_reached ("failed to return tdesc"); } - /* Enable branch tracing. */ @@ -223,7 +219,7 @@ x86_linux_nat_target::enable_btrace (thread_info *tp, } catch (const gdb_exception_error &exception) { - error (_("Could not enable branch tracing for %s: %s"), + error (_ ("Could not enable branch tracing for %s: %s"), target_pid_to_str (ptid).c_str (), exception.what ()); } @@ -238,7 +234,7 @@ x86_linux_nat_target::disable_btrace (struct btrace_target_info *tinfo) enum btrace_error errcode = linux_disable_btrace (tinfo); if (errcode != BTRACE_ERR_NONE) - error (_("Could not disable branch tracing.")); + error (_ ("Could not disable branch tracing.")); } /* Teardown branch tracing. */ @@ -266,8 +262,6 @@ x86_linux_nat_target::btrace_conf (const struct btrace_target_info *btinfo) return linux_btrace_conf (btinfo); } - - /* Helper for ps_get_thread_area. Sets BASE_ADDR to a pointer to the thread local storage (or its descriptor) and returns PS_OK on success. Returns PS_ERR on failure. */ @@ -308,9 +302,9 @@ x86_linux_get_thread_area (pid_t pid, void *addr, unsigned int *base_addr) *base_addr = desc[1]; return PS_OK; } - void _initialize_x86_linux_nat (); + void _initialize_x86_linux_nat () { |