/* Interface GDB to the GNU Hurd.
- Copyright (C) 1992, 1995-2001, 2006-2012 Free Software Foundation,
- Inc.
+ Copyright (C) 1992-2013 Free Software Foundation, Inc.
This file is part of GDB.
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/>.
- */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "defs.h"
#include <ctype.h>
#include <errno.h>
#include <portinfo.h>
-#include "defs.h"
#include "inferior.h"
#include "symtab.h"
#include "value.h"
{
inf_debug (gnu_current_inf, "%s %s[%d] %s %s",
write ? "writing" : "reading",
- paddress (target_gdbarch, memaddr), len,
+ paddress (target_gdbarch (), memaddr), len,
write ? "<--" : "-->", host_address_to_string (myaddr));
if (write)
return gnu_write_inferior (task, memaddr, myaddr, len);
static char tid_str[80];
if (proc_is_task (proc))
- sprintf (tid_str, "process %d", proc->inf->pid);
+ xsnprintf (tid_str, sizeof (tid_str), "process %d", proc->inf->pid);
else
- sprintf (tid_str, "Thread %d.%d",
- proc->inf->pid, proc->tid);
+ xsnprintf (tid_str, sizeof (tid_str), "Thread %d.%d",
+ proc->inf->pid, proc->tid);
return tid_str;
}
{
static char tid_str[80];
- sprintf (tid_str, "bogus thread id %d", tid);
+ xsnprintf (tid_str, sizeof (tid_str), "bogus thread id %d", tid);
return tid_str;
}
}
\f
/* User task commands. */
-struct cmd_list_element *set_task_cmd_list = 0;
-struct cmd_list_element *show_task_cmd_list = 0;
+static struct cmd_list_element *set_task_cmd_list = 0;
+static struct cmd_list_element *show_task_cmd_list = 0;
/* User thread commands. */
/* Commands with a prefix of `set/show thread'. */