From 0e90c441629bcf1f53ba484f7d855ed8eb68f138 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 26 Apr 2022 14:08:03 -0600 Subject: 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. --- gdb/target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/target.c') diff --git a/gdb/target.c b/gdb/target.c index 1063f80..18e53aa 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -423,7 +423,7 @@ target_extra_thread_info (thread_info *tp) /* See target.h. */ -char * +const char * target_pid_to_exec_file (int pid) { return current_inferior ()->top_target ()->pid_to_exec_file (pid); -- cgit v1.1