From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32649 invoked by alias); 6 May 2013 12:10:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 32636 invoked by uid 89); 6 May 2013 12:10:08 -0000 X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_PASS,TW_TX autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 06 May 2013 12:10:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A5CCE2ECAF; Mon, 6 May 2013 08:10:04 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gK8GllErFsdI; Mon, 6 May 2013 08:10:04 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 6917C2EA6D; Mon, 6 May 2013 08:10:04 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4233) id 5E8573FF09; Mon, 6 May 2013 08:10:04 -0400 (EDT) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Rainer Orth , Joel Brobecker Subject: [PATCH] move sparc-sol-thread.c back into sol-thread.c. Date: Mon, 06 May 2013 12:10:00 -0000 Message-Id: <1367842203-31747-1-git-send-email-brobecker@adacore.com> X-SW-Source: 2013-05/txt/msg00110.txt.bz2 Contrary to what the man page says, the routines in sparc-sol-thread are needed on some non-SPARC systems, more precisly on x86_64. So this patch deletes sparc-sol-thread.c and moves the code back inside sol-thread.c, with some added comments warning the reader about this pitfall. gdb/ChangeLog: PR tdep/15420: * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs): New functions, directly copied from sparc-sol-thread.c. * sparc-sol-thread.c: Delete. * configure.ac: Remove code handling sparc-solaris-thread.c. * configure: Regenerate. Tested on sparc-solaris. Rainer, would you mind confirming that this fixes your problem as well? Thank you, -- Joel --- gdb/configure | 7 ------- gdb/configure.ac | 7 ------- gdb/sol-thread.c | 33 +++++++++++++++++++++++++++++++++ gdb/sparc-sol-thread.c | 43 ------------------------------------------- 4 files changed, 33 insertions(+), 57 deletions(-) delete mode 100644 gdb/sparc-sol-thread.c diff --git a/gdb/configure b/gdb/configure index 4e9aa39..0f87860 100755 --- a/gdb/configure +++ b/gdb/configure @@ -12023,13 +12023,6 @@ $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h CONFIG_OBS="${CONFIG_OBS} sol-thread.o" CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" - # On SPARC CPUs, we also need to build sparc-sol-thread. - case ${host_cpu} in - sparc*) - CONFIG_OBS="${CONFIG_OBS} sparc-sol-thread.o" - CONFIG_SRCS="${CONFIG_SRCS} sparc-sol-thread.c" - ;; - esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : diff --git a/gdb/configure.ac b/gdb/configure.ac index 092c994..6b5f403 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1773,13 +1773,6 @@ if test ${build} = ${host} -a ${host} = ${target} ; then [Define if using Solaris thread debugging.]) CONFIG_OBS="${CONFIG_OBS} sol-thread.o" CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" - # On SPARC CPUs, we also need to build sparc-sol-thread. - case ${host_cpu} in - sparc*) - CONFIG_OBS="${CONFIG_OBS} sparc-sol-thread.o" - CONFIG_SRCS="${CONFIG_SRCS} sparc-sol-thread.c" - ;; - esac AC_CHECK_LIB(dl, dlopen) CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" # Sun randomly tweaked the prototypes in diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index 760edb4..6202997 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -932,6 +932,39 @@ ps_plog (const char *fmt, ...) vfprintf_filtered (gdb_stderr, fmt, args); } +/* Get size of extra register set. Currently a noop. + + Needs to be provided on x86_64-solaris, and therefore not specific + to SPARC, contrary to what the Solaris man pages say. */ + +ps_err_e +ps_lgetxregsize (gdb_ps_prochandle_t ph, lwpid_t lwpid, int *xregsize) +{ + return PS_OK; +} + +/* Get extra register set. Currently a noop. + + Needs to be provided on x86_64-solaris, and therefore not specific + to SPARC, contrary to what the Solaris man pages say. */ + +ps_err_e +ps_lgetxregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, caddr_t xregset) +{ + return PS_OK; +} + +/* Set extra register set. Currently a noop. + + Needs to be provided on x86_64-solaris, and therefore not specific + to SPARC, contrary to what the Solaris man pages say. */ + +ps_err_e +ps_lsetxregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, caddr_t xregset) +{ + return PS_OK; +} + /* Get floating-point registers for LWP. */ ps_err_e diff --git a/gdb/sparc-sol-thread.c b/gdb/sparc-sol-thread.c deleted file mode 100644 index 1576d07..0000000 --- a/gdb/sparc-sol-thread.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 2012-2013 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include "defs.h" -#include - -/* Get size of extra register set. Currently a noop. */ - -ps_err_e -ps_lgetxregsize (struct ps_prochandle *ph, lwpid_t lwpid, int *xregsize) -{ - return PS_OK; -} - -/* Get extra register set. Currently a noop. */ - -ps_err_e -ps_lgetxregs (struct ps_prochandle *ph, lwpid_t lwpid, caddr_t xregset) -{ - return PS_OK; -} - -/* Set extra register set. Currently a noop. */ - -ps_err_e -ps_lsetxregs (struct ps_prochandle *ph, lwpid_t lwpid, caddr_t xregset) -{ - return PS_OK; -} -- 1.7.0.4