aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-04-26 14:08:03 -0600
committerTom Tromey <tromey@adacore.com>2022-05-13 08:21:16 -0600
commit0e90c441629bcf1f53ba484f7d855ed8eb68f138 (patch)
tree32543d4e42dfa1873b0fca3e3a81c0e33cd67702 /gdb/linux-nat.h
parentf1025b233f6dad43981f5ad35c81481f8d3658bf (diff)
downloadfsf-binutils-gdb-0e90c441629bcf1f53ba484f7d855ed8eb68f138.zip
fsf-binutils-gdb-0e90c441629bcf1f53ba484f7d855ed8eb68f138.tar.gz
fsf-binutils-gdb-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/linux-nat.h')
-rw-r--r--gdb/linux-nat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h
index 12a90ec..11043c4 100644
--- a/gdb/linux-nat.h
+++ b/gdb/linux-nat.h
@@ -123,7 +123,7 @@ public:
int set_syscall_catchpoint (int pid, bool needed, int any_count,
gdb::array_view<const int> syscall_counts) override;
- char *pid_to_exec_file (int pid) override;
+ const char *pid_to_exec_file (int pid) override;
void post_attach (int) override;