From 5bca7895b748abc3e01c88221778bda7e5ad3185 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 31 Aug 2003 15:18:58 +0000 Subject: * i386-linux-nat.c (ps_get_thread_area): Don't define as extern. Only define PTRACE_GET_THREAD_AREA is not already defined. Various style fixes in code and comments and some additional spelling fixes in comments. Move after functions dealing with debug registers. * x86-64-linux-nat.c (ps_get_thread_area): Don't define as extern. Fix coding-style. --- gdb/x86-64-linux-nat.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gdb/x86-64-linux-nat.c') diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c index 733abdc..a21ac13 100644 --- a/gdb/x86-64-linux-nat.c +++ b/gdb/x86-64-linux-nat.c @@ -348,12 +348,12 @@ x86_64_linux_dr_get_status (void) { return x86_64_linux_dr_get (DR_STATUS); } + -extern ps_err_e +ps_err_e ps_get_thread_area (const struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base) { - /* This definition comes from prctl.h, but some kernels may not have it. */ #ifndef PTRACE_ARCH_PRCTL #define PTRACE_ARCH_PRCTL 30 @@ -367,17 +367,18 @@ ps_get_thread_area (const struct ps_prochandle *ph, { case FS: if (ptrace (PTRACE_ARCH_PRCTL, lwpid, base, ARCH_GET_FS) == 0) - return PS_OK; + return PS_OK; break; case GS: if (ptrace (PTRACE_ARCH_PRCTL, lwpid, base, ARCH_GET_GS) == 0) - return PS_OK; + return PS_OK; break; default: /* Should not happen. */ return PS_BADADDR; } return PS_ERR; /* ptrace failed. */ } + void child_post_startup_inferior (ptid_t ptid) -- cgit v1.1