aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-06-10 11:25:18 -0600
committerTom Tromey <tromey@redhat.com>2014-06-18 08:16:54 -0600
commit8236def8eb5276731a00eb21c2e687e4484aeb59 (patch)
treee0093625aca243fa217bebad58b4bbab7c70765a
parent3977b71f1dfd04b6ac2c14e1405ce251c31a38aa (diff)
downloadgdb-8236def8eb5276731a00eb21c2e687e4484aeb59.zip
gdb-8236def8eb5276731a00eb21c2e687e4484aeb59.tar.gz
gdb-8236def8eb5276731a00eb21c2e687e4484aeb59.tar.bz2
constify probe.c function
This constifies an argument to info_probes_for_ops. 2014-06-18 Tom Tromey <tromey@redhat.com> * probe.c (info_probes_for_ops): Make "arg" const. * probe.h (info_probes_for_ops): Update.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/probe.c9
-rw-r--r--gdb/probe.h2
3 files changed, 11 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0b35d83..8a7d30c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2014-06-18 Tom Tromey <tromey@redhat.com>
+ * probe.c (info_probes_for_ops): Make "arg" const.
+ * probe.h (info_probes_for_ops): Update.
+
+2014-06-18 Tom Tromey <tromey@redhat.com>
+
* varobj.c (varobj_create): Update.
* valops.c (value_of_this): Update.
* tracepoint.c (add_local_symbols, scope_info): Update.
diff --git a/gdb/probe.c b/gdb/probe.c
index 838d9f9..859e6e7 100644
--- a/gdb/probe.c
+++ b/gdb/probe.c
@@ -486,7 +486,8 @@ get_number_extra_fields (const struct probe_ops *pops)
/* See comment in probe.h. */
void
-info_probes_for_ops (char *arg, int from_tty, const struct probe_ops *pops)
+info_probes_for_ops (const char *arg, int from_tty,
+ const struct probe_ops *pops)
{
char *provider, *probe_name = NULL, *objname = NULL;
struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
@@ -501,17 +502,17 @@ info_probes_for_ops (char *arg, int from_tty, const struct probe_ops *pops)
struct gdbarch *gdbarch = get_current_arch ();
/* Do we have a `provider:probe:objfile' style of linespec? */
- provider = extract_arg (&arg);
+ provider = extract_arg_const (&arg);
if (provider)
{
make_cleanup (xfree, provider);
- probe_name = extract_arg (&arg);
+ probe_name = extract_arg_const (&arg);
if (probe_name)
{
make_cleanup (xfree, probe_name);
- objname = extract_arg (&arg);
+ objname = extract_arg_const (&arg);
if (objname)
make_cleanup (xfree, objname);
}
diff --git a/gdb/probe.h b/gdb/probe.h
index aa8aba8..b4ff0a6 100644
--- a/gdb/probe.h
+++ b/gdb/probe.h
@@ -230,7 +230,7 @@ extern VEC (probe_p) *find_probes_in_objfile (struct objfile *objfile,
function that can be used by the probe backends to print their
`info probe TYPE'. */
-extern void info_probes_for_ops (char *arg, int from_tty,
+extern void info_probes_for_ops (const char *arg, int from_tty,
const struct probe_ops *pops);
/* Return the `cmd_list_element' associated with the `info probes' command,