aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-05-22 15:41:28 -0400
committerTom Tromey <tromey@adacore.com>2019-05-22 15:41:28 -0400
commit4ca51187d21562b6626eea2bd0e45f6b64719dfd (patch)
tree495ae47403983a234de936f10b05289268195175 /gdb/target-delegates.c
parent18125b163947bfd0c358d4a5acf4e0e3b43b64cf (diff)
downloadgdb-4ca51187d21562b6626eea2bd0e45f6b64719dfd.zip
gdb-4ca51187d21562b6626eea2bd0e45f6b64719dfd.tar.gz
gdb-4ca51187d21562b6626eea2bd0e45f6b64719dfd.tar.bz2
Constify target_ops::follow_exec
I noticed that target_ops::follow_exec took a "char *" parameter, where "const char *" would be more correct. This patch changes this (and related functions) to be constified. Tested by rebuilding. gdb/ChangeLog 2019-05-22 Tom Tromey <tromey@adacore.com> * target.c (target_follow_exec): Constify parameter. * target-delegates.c: Rebuild. * remote.c (remote_target::follow_exec): Constify parameter. * infrun.c (follow_exec): Constify parameter. * target.h (struct target_ops) <follow_exec>: Constify parameter. (target_follow_exec): Likewise.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index cfc0ce0..52034fe 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -59,7 +59,7 @@ struct dummy_target : public target_ops
int follow_fork (int arg0, int arg1) override;
int insert_exec_catchpoint (int arg0) override;
int remove_exec_catchpoint (int arg0) override;
- void follow_exec (struct inferior *arg0, char *arg1) override;
+ void follow_exec (struct inferior *arg0, const char *arg1) override;
int set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_view<const int> arg3) override;
void mourn_inferior () override;
void pass_signals (gdb::array_view<const unsigned char> arg0) override;
@@ -227,7 +227,7 @@ struct debug_target : public target_ops
int follow_fork (int arg0, int arg1) override;
int insert_exec_catchpoint (int arg0) override;
int remove_exec_catchpoint (int arg0) override;
- void follow_exec (struct inferior *arg0, char *arg1) override;
+ void follow_exec (struct inferior *arg0, const char *arg1) override;
int set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_view<const int> arg3) override;
void mourn_inferior () override;
void pass_signals (gdb::array_view<const unsigned char> arg0) override;
@@ -1585,25 +1585,25 @@ debug_target::remove_exec_catchpoint (int arg0)
}
void
-target_ops::follow_exec (struct inferior *arg0, char *arg1)
+target_ops::follow_exec (struct inferior *arg0, const char *arg1)
{
this->beneath ()->follow_exec (arg0, arg1);
}
void
-dummy_target::follow_exec (struct inferior *arg0, char *arg1)
+dummy_target::follow_exec (struct inferior *arg0, const char *arg1)
{
}
void
-debug_target::follow_exec (struct inferior *arg0, char *arg1)
+debug_target::follow_exec (struct inferior *arg0, const char *arg1)
{
fprintf_unfiltered (gdb_stdlog, "-> %s->follow_exec (...)\n", this->beneath ()->shortname ());
this->beneath ()->follow_exec (arg0, arg1);
fprintf_unfiltered (gdb_stdlog, "<- %s->follow_exec (", this->beneath ()->shortname ());
target_debug_print_struct_inferior_p (arg0);
fputs_unfiltered (", ", gdb_stdlog);
- target_debug_print_char_p (arg1);
+ target_debug_print_const_char_p (arg1);
fputs_unfiltered (")\n", gdb_stdlog);
}