constify probe.c function
authorTom Tromey <tromey@redhat.com>
Tue, 10 Jun 2014 17:25:18 +0000 (11:25 -0600)
committerTom Tromey <tromey@redhat.com>
Wed, 18 Jun 2014 14:16:54 +0000 (08:16 -0600)
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.

gdb/ChangeLog
gdb/probe.c
gdb/probe.h

index 0b35d83f084dfb172b61fcab9746234e5039acc1..8a7d30cef1d4d660365c9c0ffedad92f36cc665b 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 838d9f98195f68f0e5601c6b25e79220a56030d9..859e6e7191dea848cb11b8b93af27723d223cd5b 100644 (file)
@@ -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);
        }
index aa8aba8ea6838d9a19d99239a7516636a9114e14..b4ff0a6b93ba1a53bcd1a6d67be272680403e3d3 100644 (file)
@@ -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,
This page took 0.030576 seconds and 4 git commands to generate.