/* nto-tdep.c - general QNX Neutrino target functionality.
- Copyright (C) 2003-2014 Free Software Foundation, Inc.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
Contributed by QNX Software Systems Ltd.
#include "defs.h"
#include <sys/stat.h>
-#include <string.h>
#include "nto-tdep.h"
#include "top.h"
#include "inferior.h"
int
nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
{
- char *buf, *arch_path, *nto_root, *endian;
+ char *buf, *arch_path, *nto_root;
+ const char *endian;
const char *base;
const char *arch;
int arch_len, len, ret;
arch_len = (strlen (nto_root) + strlen (arch) + strlen (endian) + 2
+ strlen (solib));
- arch_path = alloca (arch_len);
+ arch_path = (char *) alloca (arch_len);
xsnprintf (arch_path, arch_len, "%s/%s%s", nto_root, arch, endian);
len = strlen (PATH_FMT) + strlen (arch_path) * 5 + 1;
- buf = alloca (len);
+ buf = (char *) alloca (len);
xsnprintf (buf, len, PATH_FMT, arch_path, arch_path, arch_path, arch_path,
arch_path);
nto_init_solib_absolute_prefix (void)
{
char buf[PATH_MAX * 2], arch_path[PATH_MAX];
- char *nto_root, *endian;
+ char *nto_root;
+ const char *endian;
const char *arch;
nto_root = nto_target ();
out = "";
err = "";
- argv = xcalloc (n + 1, sizeof argv[0]);
+ argv = XCNEWVEC (char *, n + 1);
argc = n;
for (i = 0, n = 0; n < argc; n++)
{
char *
nto_extra_thread_info (struct target_ops *self, struct thread_info *ti)
{
- if (ti && ti->private
- && ti->private->state < ARRAY_SIZE (nto_thread_state_str))
- return (char *)nto_thread_state_str [ti->private->state];
+ if (ti && ti->priv
+ && ti->priv->state < ARRAY_SIZE (nto_thread_state_str))
+ return (char *)nto_thread_state_str [ti->priv->state];
return "";
}