diff options
author | Tom Tromey <tromey@adacore.com> | 2022-04-26 14:08:03 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-05-13 08:21:16 -0600 |
commit | 0e90c441629bcf1f53ba484f7d855ed8eb68f138 (patch) | |
tree | 32543d4e42dfa1873b0fca3e3a81c0e33cd67702 /gdb/netbsd-nat.c | |
parent | f1025b233f6dad43981f5ad35c81481f8d3658bf (diff) | |
download | binutils-0e90c441629bcf1f53ba484f7d855ed8eb68f138.zip binutils-0e90c441629bcf1f53ba484f7d855ed8eb68f138.tar.gz binutils-0e90c441629bcf1f53ba484f7d855ed8eb68f138.tar.bz2 |
Constify target_pid_to_exec_file
This changes target_pid_to_exec_file and target_ops::pid_to_exec_file
to return a "const char *". I couldn't build many of these targets,
but did examine the code by hand -- also, as this only affects the
return type, it's normally pretty safe. This brings gdb and gdbserver
a bit closer, and allows for the removal of a const_cast as well.
Diffstat (limited to 'gdb/netbsd-nat.c')
-rw-r--r-- | gdb/netbsd-nat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/netbsd-nat.c b/gdb/netbsd-nat.c index f2eeb3f..2ccd0e0 100644 --- a/gdb/netbsd-nat.c +++ b/gdb/netbsd-nat.c @@ -34,10 +34,10 @@ /* Return the name of a file that can be opened to get the symbols for the child process identified by PID. */ -char * +const char * nbsd_nat_target::pid_to_exec_file (int pid) { - return const_cast<char *> (netbsd_nat::pid_to_exec_file (pid)); + return netbsd_nat::pid_to_exec_file (pid); } /* Return the current directory for the process identified by PID. */ |