From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32288 invoked by alias); 20 Sep 2012 22:25:51 -0000 Received: (qmail 32272 invoked by uid 22791); 20 Sep 2012 22:25:51 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,TW_TX X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Sep 2012 22:25:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 49A9B1C7957; Thu, 20 Sep 2012 18:25:37 -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 MdXWSig1Gylt; Thu, 20 Sep 2012 18:25:37 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A72AB1C790C; Thu, 20 Sep 2012 18:25:36 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C3BB2CC175; Thu, 20 Sep 2012 15:25:34 -0700 (PDT) Date: Thu, 20 Sep 2012 22:25:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 4/4] Delete unused functions in sol-thread.c. Message-ID: <20120920222534.GA28592@adacore.com> References: <1348158841-2313-1-git-send-email-brobecker@adacore.com> <1348158841-2313-5-git-send-email-brobecker@adacore.com> <505B52EA.5080908@redhat.com> <20120920214340.GB5423@adacore.com> <20120920222447.GC5423@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline In-Reply-To: <20120920222447.GC5423@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 X-SW-Source: 2012-09/txt/msg00418.txt.bz2 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 74 > > And the next step I propose, to finish the work, ENOPATCH. -- Joel --Qxx1br4bt0+wmkIi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0003-New-unit-sol-sparc-thread.c-extracted-from-sol-threa.patch" Content-length: 4866 >From 4cb2459b250fa92cfcdcd40e421ac1c8dbea5368 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 20 Sep 2012 18:17:22 -0400 Subject: [PATCH 3/3] New unit sol-sparc-thread.c extracted from sol-thread.c Moving some sparc-specific routines out of sol-thread.c into their own (new) file. gdb/ChangeLog: * sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs): Move these functions to sol-sparc-thread.c. * sol-sparc-thread.c: New file. * configure.ac: Add sol-sparc-thread.o to CONFIG_OBS and sol-sparc-thread.c to CONFIG_SRCS for sparc-solaris native configurations. * configure: Regenerate. --- gdb/configure | 7 +++++++ gdb/configure.ac | 7 +++++++ gdb/sol-sparc-thread.c | 43 +++++++++++++++++++++++++++++++++++++++++++ gdb/sol-thread.c | 28 ---------------------------- 4 files changed, 57 insertions(+), 28 deletions(-) create mode 100644 gdb/sol-sparc-thread.c diff --git a/gdb/configure b/gdb/configure index d9d0aaa..7d14003 100755 --- a/gdb/configure +++ b/gdb/configure @@ -12534,6 +12534,13 @@ $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 sol-sparc-thread. + case ${host_cpu} in + sparc*) + CONFIG_OBS="${CONFIG_OBS} sol-sparc-thread.o" + CONFIG_SRCS="${CONFIG_SRCS} sol-sparc-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 6069c08..15de347 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1781,6 +1781,13 @@ 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 sol-sparc-thread. + case ${host_cpu} in + sparc*) + CONFIG_OBS="${CONFIG_OBS} sol-sparc-thread.o" + CONFIG_SRCS="${CONFIG_SRCS} sol-sparc-thread.c" + ;; + esac AC_CHECK_LIB(dl, dlopen) CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" # Sun randomly tweaked the prototypes in diff --git a/gdb/sol-sparc-thread.c b/gdb/sol-sparc-thread.c new file mode 100644 index 0000000..6b7c49d --- /dev/null +++ b/gdb/sol-sparc-thread.c @@ -0,0 +1,43 @@ +/* Copyright (C) 2012 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; +} diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index b86079f..06a2fb6 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -984,34 +984,6 @@ ps_plog (const char *fmt, ...) vfprintf_filtered (gdb_stderr, fmt, args); } -#if defined(__sparc) || defined(__sparcv9) - -/* Get size of extra register set. Currently a noop. */ - -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. */ - -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. */ - -ps_err_e -ps_lsetxregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, caddr_t xregset) -{ - return PS_OK; -} - -#endif /* defined(__sparc) || defined(__sparcv9) */ - /* Get floating-point registers for LWP. */ ps_err_e -- 1.7.0.4 --Qxx1br4bt0+wmkIi--