daily update
[deliverable/binutils-gdb.git] / gdb / nto-tdep.c
index 8f6dba1b84cf11f78e988e77f64c06b0bac41cb8..1db123d72fd17c4f0c880d590e41f442f0b1ff09 100644 (file)
@@ -1,6 +1,7 @@
 /* nto-tdep.c - general QNX Neutrino target functionality.
 
-   Copyright (C) 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
 
    Contributed by QNX Software Systems Ltd.
 
@@ -88,10 +89,12 @@ nto_map_arch_to_cputype (const char *arch)
 int
 nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
 {
-  char *buf, *arch_path, *nto_root, *endian, *base;
+  char *buf, *arch_path, *nto_root, *endian;
+  const char *base;
   const char *arch;
   int ret;
-#define PATH_FMT "%s/lib:%s/usr/lib:%s/usr/photon/lib:%s/usr/photon/dll:%s/lib/dll"
+#define PATH_FMT \
+  "%s/lib:%s/usr/lib:%s/usr/photon/lib:%s/usr/photon/dll:%s/lib/dll"
 
   nto_root = nto_target ();
   if (strcmp (gdbarch_bfd_arch_info (target_gdbarch)->arch_name, "i386") == 0)
@@ -125,13 +128,7 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
   sprintf (buf, PATH_FMT, arch_path, arch_path, arch_path, arch_path,
           arch_path);
 
-  /* Don't assume basename() isn't destructive.  */
-  base = strrchr (solib, '/');
-  if (!base)
-    base = solib;
-  else
-    base++;                    /* Skip over '/'.  */
-
+  base = lbasename (solib);
   ret = openp (buf, 1, base, o_flags, temp_pathname);
   if (ret < 0 && base != solib)
     {
@@ -412,6 +409,7 @@ When non-zero, nto specific debug info is\n\
 displayed. Different information is displayed\n\
 for different positive values."),
                            NULL,
-                           NULL, /* FIXME: i18n: QNX NTO internal debugging is %s.  */
+                           NULL, /* FIXME: i18n: QNX NTO internal
+                                    debugging is %s.  */
                            &setdebuglist, &showdebuglist);
 }
This page took 0.023671 seconds and 4 git commands to generate.