Use nat/windows-nat function indirection code
[binutils-gdb.git] / gdbserver / server.cc
index 2a443305691063d745e560e9063dab5a44f99644..a5d9f85216d1e2e8bf2823da519dbc494e9ced87 100644 (file)
@@ -1466,7 +1466,6 @@ handle_qxfer_exec_file (const char *annex,
                        gdb_byte *readbuf, const gdb_byte *writebuf,
                        ULONGEST offset, LONGEST len)
 {
-  char *file;
   ULONGEST pid;
   int total_len;
 
@@ -1490,7 +1489,7 @@ handle_qxfer_exec_file (const char *annex,
   if (pid <= 0)
     return -1;
 
-  file = the_target->pid_to_exec_file (pid);
+  const char *file = the_target->pid_to_exec_file (pid);
   if (file == NULL)
     return -1;