Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 4/4] Delete unused functions in sol-thread.c.
Date: Thu, 20 Sep 2012 22:25:00 -0000	[thread overview]
Message-ID: <20120920222534.GA28592@adacore.com> (raw)
In-Reply-To: <20120920222447.GC5423@adacore.com>

[-- Attachment #1: Type: text/plain, Size: 74 bytes --]

> > And the next step I propose, to finish the work,

ENOPATCH.

-- 
Joel

[-- Attachment #2: 0003-New-unit-sol-sparc-thread.c-extracted-from-sol-threa.patch --]
[-- Type: text/x-diff, Size: 4865 bytes --]

From 4cb2459b250fa92cfcdcd40e421ac1c8dbea5368 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
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 <proc_service.h>
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 <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include <proc_service.h>
+
+/* 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


  reply	other threads:[~2012-09-20 22:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-20 16:34 Various build-related fixes for solaris Joel Brobecker
2012-09-20 16:34 ` [PATCH 1/4] Fix declaration of proc_find_memory_regions Joel Brobecker
2012-09-27 12:55   ` checked in: " Joel Brobecker
2012-09-20 16:34 ` [PATCH 3/4] Add procfs_find_LDT_entry declaration (procfs.h) Joel Brobecker
2012-09-22 14:22   ` Jan Kratochvil
2012-09-27 12:56   ` checked in: " Joel Brobecker
2012-09-20 16:34 ` [PATCH 2/4] Make procfs.c:proc_get_LDT_entry static Joel Brobecker
2012-09-27 12:55   ` checked in: " Joel Brobecker
2012-09-20 16:44 ` [PATCH 4/4] Delete unused functions in sol-thread.c Joel Brobecker
2012-09-20 17:31   ` Pedro Alves
2012-09-20 21:43     ` Joel Brobecker
2012-09-20 22:25       ` Joel Brobecker
2012-09-20 22:25         ` Joel Brobecker [this message]
2012-09-24 16:27           ` Pedro Alves
2012-09-24 16:37             ` Joel Brobecker
2012-09-27 13:02           ` checked in: New unit sparc-sol-thread.c extracted from sol-thread.c Joel Brobecker
2012-09-24 16:18       ` [PATCH 4/4] Delete unused functions in sol-thread.c Pedro Alves
2012-09-24 16:40         ` Joel Brobecker
2012-09-27 13:04         ` checked in: sol-thread.c: Remove commented-out code Joel Brobecker
2012-09-27 12:59       ` checked in: [PATCH 4/4] Delete unused functions in sol-thread.c Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120920222534.GA28592@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox