Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: Andrew Cagney <cagney@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] New program_changed event, cleanup some HPUXHPPA mess
Date: Mon, 24 May 2004 15:45:00 -0000	[thread overview]
Message-ID: <20040524154529.GT7207@tausq.org> (raw)
In-Reply-To: <40AE4F0C.6050407@gnu.org>

> >tm-hppah.h overrode target_tid_to_str to do it's own thing. The default
> >target.h definition checks to see if there's a target_tid_to_str define,
> >and if not automatically reverts to target_pid_to_str, so the #ifdef
> >here is useless.
> 
> Can you separate this part out (it sounds very straight forward).
> 
> >Tested on hppa-linux and hppa2.0w-hp-hpux11.11 with no regressions.

Here's a patch with just the thread.c cleanup. ok?

2004-05-24  Randolph Chung  <tausq@debian.org>

	* thread.c (info_threads_command, thread_apply_all_command)
	(thread_apply_command, thread_command, do_captured_thread_select):
	Remove HPUXHPPA-specific code.

Index: thread.c
===================================================================
RCS file: /cvs/src/src/gdb/thread.c,v
retrieving revision 1.36
diff -u -p -r1.36 thread.c
--- thread.c	12 May 2004 22:19:02 -0000	1.36
+++ thread.c	24 May 2004 15:41:25 -0000
@@ -424,11 +424,7 @@ info_threads_command (char *arg, int fro
       else
 	printf_filtered ("  ");
 
-#ifdef HPUXHPPA
       printf_filtered ("%d %s", tp->num, target_tid_to_str (tp->ptid));
-#else
-      printf_filtered ("%d %s", tp->num, target_pid_to_str (tp->ptid));
-#endif
 
       extra_info = target_extra_thread_info (tp);
       if (extra_info)
@@ -541,13 +537,8 @@ thread_apply_all_command (char *cmd, int
     if (thread_alive (tp))
       {
 	switch_to_thread (tp->ptid);
-#ifdef HPUXHPPA
 	printf_filtered ("\nThread %d (%s):\n",
 			 tp->num, target_tid_to_str (inferior_ptid));
-#else
-	printf_filtered ("\nThread %d (%s):\n", tp->num,
-			 target_pid_to_str (inferior_ptid));
-#endif
 	execute_command (cmd, from_tty);
 	strcpy (cmd, saved_cmd);	/* Restore exact command used previously */
       }
@@ -617,13 +608,8 @@ thread_apply_command (char *tidlist, int
 	  else
 	    {
 	      switch_to_thread (tp->ptid);
-#ifdef HPUXHPPA
 	      printf_filtered ("\nThread %d (%s):\n", tp->num,
 			       target_tid_to_str (inferior_ptid));
-#else
-	      printf_filtered ("\nThread %d (%s):\n", tp->num,
-			       target_pid_to_str (inferior_ptid));
-#endif
 	      execute_command (cmd, from_tty);
 	      strcpy (cmd, saved_cmd);	/* Restore exact command used previously */
 	    }
@@ -646,12 +632,7 @@ thread_command (char *tidstr, int from_t
       if (target_has_stack)
 	printf_filtered ("[Current thread is %d (%s)]\n",
 			 pid_to_thread_id (inferior_ptid),
-#if defined(HPUXHPPA)
-			 target_tid_to_str (inferior_ptid)
-#else
-			 target_pid_to_str (inferior_ptid)
-#endif
-	  );
+			 target_tid_to_str (inferior_ptid));
       else
 	error ("No stack.");
       return;
@@ -681,11 +662,7 @@ do_captured_thread_select (struct ui_out
   ui_out_text (uiout, "[Switching to thread ");
   ui_out_field_int (uiout, "new-thread-id", pid_to_thread_id (inferior_ptid));
   ui_out_text (uiout, " (");
-#if defined(HPUXHPPA)
   ui_out_text (uiout, target_tid_to_str (inferior_ptid));
-#else
-  ui_out_text (uiout, target_pid_to_str (inferior_ptid));
-#endif
   ui_out_text (uiout, ")]");
 
   print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);


-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


  parent reply	other threads:[~2004-05-24 15:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-19 20:40 Randolph Chung
2004-05-19 21:37 ` Joel Brobecker
2004-05-19 21:44   ` Randolph Chung
2004-05-19 22:06     ` Joel Brobecker
2004-05-21 18:48 ` [patch/rfc] New program_changed event, cleanup some HPUXHPPAmess Andrew Cagney
2004-05-21 19:02   ` [patch/rfc] New program_changed event, cleanup some HPUXHPPA mess Randolph Chung
     [not found]     ` <40AE6260.2090205@gnu.org>
2004-05-26  5:27       ` Randolph Chung
2004-05-26 13:25         ` Daniel Jacobowitz
2004-05-26 15:35           ` Randolph Chung
2004-05-26 16:48             ` Daniel Jacobowitz
2004-05-26 17:54             ` [patch/rfc] New program_changed event, cleanup some HPUXHPPAmess Andrew Cagney
2004-05-28 23:43               ` [patch/rfc] New program_changed event, cleanup some HPUXHPPA mess Daniel Jacobowitz
2004-05-31 19:43                 ` [patch/rfc] New program_changed event, cleanup some HPUXHPPAmess Andrew Cagney
2004-05-31 20:43                   ` [patch/rfc] New program_changed event, cleanup some HPUXHPPA mess Daniel Jacobowitz
2004-06-01  1:31                     ` Andrew Cagney
2004-06-01  1:40                       ` Daniel Jacobowitz
2004-06-03 17:41                       ` Randolph Chung
2004-06-04 18:26                         ` Andrew Cagney
2004-05-24 15:45   ` Randolph Chung [this message]
2004-05-24 18:55     ` [patch/rfc] New program_changed event, cleanup some HPUXHPPAmess Andrew Cagney

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=20040524154529.GT7207@tausq.org \
    --to=randolph@tausq.org \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.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