d9fa87f Constify get_exec_file

Authored and Committed by Tom Tromey 4 years ago
    Constify get_exec_file
    
    I noticed that get_exec_file could return a "const char *".  This
    patch implements this change.
    
    I couldn't build all the code -- but I did build Linux native and a
    mingw cross.
    
    Consequently, the NTO code has a hack, where it casts away const.  I
    think this can be removed, but that required more work there, and
    since I couldn't compile it, I felt it best not to try.
    
    Let me know what you think.
    
    gdb/ChangeLog
    2019-12-16  Tom Tromey  <tromey@adacore.com>
    
    	* windows-nat.c (windows_nat_target::attach): Update.
    	* remote.c (extended_remote_target::attach): Update.
    	* procfs.c (procfs_target::attach): Update.
    	* nto-procfs.c (nto_procfs_target::attach): Update.
    	(nto_procfs_target::create_inferior): Update.
    	* inf-ptrace.c (inf_ptrace_target::attach): Update.
    	* gnu-nat.c (gnu_nat_target::attach): Update.
    	(gnu_nat_target::detach): Update.
    	* darwin-nat.c (darwin_nat_target::attach): Update.
    	* corefile.c (get_exec_file): Constify result.  Remove extraneous
    	return.
    	* bsd-kvm.c (bsd_kvm_target_open): Update.
    	* gdbsupport/common-inferior.h (get_exec_file): Constify result.
    
    gdb/gdbserver/ChangeLog
    2019-12-16  Tom Tromey  <tromey@adacore.com>
    
    	* server.c (get_exec_file): Constify result.
    
    Change-Id: I29c60f7313a7def0dcb290ff0c2a4c1dea4f981f
    
        
file modified
+16 -0
file modified
+1 -1
file modified
+1 -2
file modified
+1 -1
file modified
+4 -0
file modified
+1 -1
file modified
+2 -3
file modified
+1 -2
file modified
+2 -3
file modified
+1 -2
file modified
+1 -1
file modified
+1 -1