From f3fb8c8501c80aa6996a09a438f8a1b7d132c631 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 26 Apr 2001 22:10:42 +0000 Subject: [PATCH] 2001-04-26 Michael Snyder * target.c (normal_pid_to_str): Get rid of an ancient hack. * remote.c (remote_pid_to_str): New function for remote target. --- gdb/ChangeLog | 5 +++++ gdb/remote.c | 13 +++++++++++++ gdb/target.c | 6 +----- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b3b1068b822..f50d8a67844 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-04-26 Michael Snyder + + * target.c (normal_pid_to_str): Get rid of an ancient hack. + * remote.c (remote_pid_to_str): New function for remote target. + 2001-04-24 Jim Blandy * c-typeprint.c (c_type_print_cv_qualifier): Don't print `const' diff --git a/gdb/remote.c b/gdb/remote.c index fdc1564996b..18712c521a7 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -5103,6 +5103,18 @@ init_remote_threadtests (void) #endif /* 0 */ +/* Convert a thread ID to a string. Returns the string in a static + buffer. */ + +static char * +remote_pid_to_str (int pid) +{ + static char buf[30]; + + sprintf (buf, "Thread %d", pid); + return buf; +} + static void init_remote_ops (void) { @@ -5130,6 +5142,7 @@ Specify the serial device it is connected to\n\ remote_ops.to_thread_alive = remote_thread_alive; remote_ops.to_find_new_threads = remote_threads_info; remote_ops.to_extra_thread_info = remote_threads_extra_info; + remote_ops.to_pid_to_str = remote_pid_to_str; remote_ops.to_stop = remote_stop; remote_ops.to_query = remote_query; remote_ops.to_rcmd = remote_rcmd; diff --git a/gdb/target.c b/gdb/target.c index a60405f658a..7151542abb6 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -2166,11 +2166,7 @@ normal_pid_to_str (int pid) { static char buf[30]; - if (STREQ (current_target.to_shortname, "remote")) - sprintf (buf, "thread %d", pid); - else - sprintf (buf, "process %d", pid); - + sprintf (buf, "process %d", pid); return buf; } -- 2.30.2