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.
This commit is contained in:
parent
3977b71f1d
commit
8236def8eb
@ -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>
|
2014-06-18 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* varobj.c (varobj_create): Update.
|
* varobj.c (varobj_create): Update.
|
||||||
|
@ -486,7 +486,8 @@ get_number_extra_fields (const struct probe_ops *pops)
|
|||||||
/* See comment in probe.h. */
|
/* See comment in probe.h. */
|
||||||
|
|
||||||
void
|
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;
|
char *provider, *probe_name = NULL, *objname = NULL;
|
||||||
struct cleanup *cleanup = make_cleanup (null_cleanup, 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 ();
|
struct gdbarch *gdbarch = get_current_arch ();
|
||||||
|
|
||||||
/* Do we have a `provider:probe:objfile' style of linespec? */
|
/* Do we have a `provider:probe:objfile' style of linespec? */
|
||||||
provider = extract_arg (&arg);
|
provider = extract_arg_const (&arg);
|
||||||
if (provider)
|
if (provider)
|
||||||
{
|
{
|
||||||
make_cleanup (xfree, provider);
|
make_cleanup (xfree, provider);
|
||||||
|
|
||||||
probe_name = extract_arg (&arg);
|
probe_name = extract_arg_const (&arg);
|
||||||
if (probe_name)
|
if (probe_name)
|
||||||
{
|
{
|
||||||
make_cleanup (xfree, probe_name);
|
make_cleanup (xfree, probe_name);
|
||||||
|
|
||||||
objname = extract_arg (&arg);
|
objname = extract_arg_const (&arg);
|
||||||
if (objname)
|
if (objname)
|
||||||
make_cleanup (xfree, objname);
|
make_cleanup (xfree, objname);
|
||||||
}
|
}
|
||||||
|
@ -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
|
function that can be used by the probe backends to print their
|
||||||
`info probe TYPE'. */
|
`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);
|
const struct probe_ops *pops);
|
||||||
|
|
||||||
/* Return the `cmd_list_element' associated with the `info probes' command,
|
/* Return the `cmd_list_element' associated with the `info probes' command,
|
||||||
|
Loading…
Reference in New Issue
Block a user