Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: checked in: sol-thread.c: Remove commented-out code
Date: Thu, 27 Sep 2012 13:04:00 -0000	[thread overview]
Message-ID: <20120927130408.GF24972@adacore.com> (raw)
In-Reply-To: <506087DE.5090900@redhat.com>

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

> There's more '#if 0'-related code in the file.  I think that if we're
> removing these, we should get rid of all of it.

Attached is the patch I checked in, removing all thise #if 0's.
The code inside them has been there since start of CVS...

gdb/ChangeLog:

        * sol-thread.c (sol_thread_fetch_registers)
        (sol_thread_store_registers): Delete commented out code.

Checked in.
-- 
Joel

[-- Attachment #2: 0004-sol-thread.c-Remove-commented-out-code.patch --]
[-- Type: text/x-diff, Size: 3855 bytes --]

From 6c52bb3ac607244001e00fed5fc489fbabdaf53b Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Thu, 27 Sep 2012 12:40:38 +0200
Subject: [PATCH 2/2] sol-thread.c: Remove commented-out code.

gdb/ChangeLog:

        * sol-thread.c (sol_thread_fetch_registers)
        (sol_thread_store_registers): Delete commented out code.
---
 gdb/ChangeLog    |    5 +++++
 gdb/sol-thread.c |   54 ------------------------------------------------------
 2 files changed, 5 insertions(+), 54 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index aba3e0f..8faa029 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2012-09-27  Joel Brobecker  <brobecker@adacore.com>
 
+	* sol-thread.c (sol_thread_fetch_registers)
+	(sol_thread_store_registers): Delete commented out code.
+
+2012-09-27  Joel Brobecker  <brobecker@adacore.com>
+
 	* sol-thread.c (ps_lgetxregsize, ps_lgetxregs, ps_lsetxregs):
 	Move these functions to sparc-sol-thread.c.
 	* sparc-sol-thread.c: New file.
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 585a77f..bd31f4f 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -443,11 +443,6 @@ sol_thread_fetch_registers (struct target_ops *ops,
   gdb_fpregset_t *fpregset_p = &fpregset;
   struct target_ops *beneath = find_target_beneath (ops);
 
-#if 0
-  int xregsize;
-  caddr_t xregset;
-#endif
-
   if (!is_thread (inferior_ptid))
     {
       /* It's an LWP; pass the request on to the layer beneath.  */
@@ -488,23 +483,6 @@ sol_thread_fetch_registers (struct target_ops *ops,
 
   supply_gregset (regcache, (const gdb_gregset_t *) gregset_p);
   supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset_p);
-
-#if 0
-  /* FIXME: libthread_db doesn't seem to handle this right.  */
-  val = td_thr_getxregsize (&thandle, &xregsize);
-  if (val != TD_OK && val != TD_NOXREGS)
-    error (_("sol_thread_fetch_registers: td_thr_getxregsize %s"),
-	   td_err_string (val));
-
-  if (val == TD_OK)
-    {
-      xregset = alloca (xregsize);
-      val = td_thr_getxregs (&thandle, xregset);
-      if (val != TD_OK)
-	error (_("sol_thread_fetch_registers: td_thr_getxregs %s"),
-	       td_err_string (val));
-    }
-#endif
 }
 
 static void
@@ -516,10 +494,6 @@ sol_thread_store_registers (struct target_ops *ops,
   td_err_e val;
   prgregset_t gregset;
   prfpregset_t fpregset;
-#if 0
-  int xregsize;
-  caddr_t xregset;
-#endif
 
   if (!is_thread (inferior_ptid))
     {
@@ -557,23 +531,6 @@ sol_thread_store_registers (struct target_ops *ops,
 
       /* Restore new register value.  */
       regcache_raw_supply (regcache, regnum, old_value);
-
-#if 0
-      /* FIXME: libthread_db doesn't seem to handle this right.  */
-      val = td_thr_getxregsize (&thandle, &xregsize);
-      if (val != TD_OK && val != TD_NOXREGS)
-	error (_("sol_thread_store_registers: td_thr_getxregsize %s"),
-	       td_err_string (val));
-
-      if (val == TD_OK)
-	{
-	  xregset = alloca (xregsize);
-	  val = td_thr_getxregs (&thandle, xregset);
-	  if (val != TD_OK)
-	    error (_("sol_thread_store_registers: td_thr_getxregs %s"),
-		   td_err_string (val));
-	}
-#endif
     }
 
   fill_gregset (regcache, (gdb_gregset_t *) &gregset, regnum);
@@ -587,17 +544,6 @@ sol_thread_store_registers (struct target_ops *ops,
   if (val != TD_OK)
     error (_("sol_thread_store_registers: td_thr_setfpregs %s"),
 	   td_err_string (val));
-
-#if 0
-  /* FIXME: libthread_db doesn't seem to handle this right.  */
-  val = td_thr_getxregsize (&thandle, &xregsize);
-  if (val != TD_OK && val != TD_NOXREGS)
-    error (_("sol_thread_store_registers: td_thr_getxregsize %s"),
-	   td_err_string (val));
-
-  /* ??? Should probably do something about writing the xregs here,
-     but what are they?  */
-#endif
 }
 
 /* Perform partial transfers on OBJECT.  See target_read_partial and
-- 
1.7.9.5


  parent reply	other threads:[~2012-09-27 13:04 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 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: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 1/4] Fix declaration of proc_find_memory_regions 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
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         ` Joel Brobecker [this message]
2012-09-27 12:59       ` checked in: " 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=20120927130408.GF24972@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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