Constify get_exec_file
[deliverable/binutils-gdb.git] / gdb / bsd-kvm.c
index 21f978728da629ef3569f996af9cfe7aa12fe8f6..74c044f6c734f2f2256ff650a633155c3942257c 100644 (file)
@@ -106,7 +106,7 @@ static void
 bsd_kvm_target_open (const char *arg, int from_tty)
 {
   char errbuf[_POSIX2_LINE_MAX];
-  char *execfile = NULL;
+  const char *execfile = NULL;
   kvm_t *temp_kd;
   char *filename = NULL;
 
@@ -114,14 +114,13 @@ bsd_kvm_target_open (const char *arg, int from_tty)
 
   if (arg)
     {
-      char *temp;
-
       filename = tilde_expand (arg);
       if (filename[0] != '/')
        {
-         temp = concat (current_directory, "/", filename, (char *)NULL);
+         gdb::unique_xmalloc_ptr<char> temp (gdb_abspath (filename));
+
          xfree (filename);
-         filename = temp;
+         filename = temp.release ();
        }
     }
 
This page took 0.025159 seconds and 4 git commands to generate.