/* nto-tdep.c - general QNX Neutrino target functionality.
- Copyright (C) 2003-2017 Free Software Foundation, Inc.
+ Copyright (C) 2003-2018 Free Software Foundation, Inc.
Contributed by QNX Software Systems Ltd.
#include "solib-svr4.h"
#include "gdbcore.h"
#include "objfiles.h"
+#include "source.h"
+#include "common/pathstuff.h"
#define QNX_NOTE_NAME "QNX"
#define QNX_INFO_SECT_NAME "QNX_info"
int
nto_find_and_open_solib (const char *solib, unsigned o_flags,
- char **temp_pathname)
+ gdb::unique_xmalloc_ptr<char> *temp_pathname)
{
char *buf, *arch_path, *nto_root;
const char *endian;
if (ret >= 0)
*temp_pathname = gdb_realpath (arch_path);
else
- *temp_pathname = NULL;
+ temp_pathname->reset (NULL);
}
}
return ret;
const char *
nto_extra_thread_info (struct target_ops *self, struct thread_info *ti)
{
- if (ti && ti->priv
- && ti->priv->state < ARRAY_SIZE (nto_thread_state_str))
- return (char *)nto_thread_state_str [ti->priv->state];
+ if (ti != NULL && ti->priv != NULL)
+ {
+ nto_thread_info *priv = get_nto_thread_info (ti);
+
+ if (priv->state < ARRAY_SIZE (nto_thread_state_str))
+ return nto_thread_state_str [priv->state];
+ }
return "";
}
return inf_data;
}
-/* Provide a prototype to silence -Wmissing-prototypes. */
-extern initialize_file_ftype _initialize_nto_tdep;
-
void
_initialize_nto_tdep (void)
{