constify to_info_proc and friends

This makes a parameter of to_info_proc const and then fixes up some
fallout, including parameters in a couple of gdbarch methods.

I could not test the procfs.c change.  I verified it by inspection.
If this causes an error here, it will be trivial to fix.

2014-06-16  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_info_proc>: Make parameter
	const.
	(target_info_proc): Update.
	* target.c (target_info_proc): Make "args" const.
	* procfs.c (procfs_info_proc): Update.
	* linux-tdep.c (linux_info_proc): Update.
	(linux_core_info_proc_mappings): Make "args" const.
	(linux_core_info_proc): Update.
	* gdbarch.sh (info_proc, core_info_proc): Make "args" const.
	* gdbarch.c: Rebuild.
	* gdbarch.h: Rebuild.
	* corelow.c (core_info_proc): Update.
This commit is contained in:
Tom Tromey
2014-06-06 13:38:16 -06:00
parent fee354eeef
commit 7bc112c1b9
9 changed files with 41 additions and 19 deletions

View File

@@ -1250,8 +1250,8 @@ extern void set_gdbarch_gen_return_address (struct gdbarch *gdbarch, gdbarch_gen
extern int gdbarch_info_proc_p (struct gdbarch *gdbarch);
typedef void (gdbarch_info_proc_ftype) (struct gdbarch *gdbarch, char *args, enum info_proc_what what);
extern void gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what);
typedef void (gdbarch_info_proc_ftype) (struct gdbarch *gdbarch, const char *args, enum info_proc_what what);
extern void gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what);
extern void set_gdbarch_info_proc (struct gdbarch *gdbarch, gdbarch_info_proc_ftype *info_proc);
/* Implement the "info proc" command for core files. Noe that there
@@ -1260,8 +1260,8 @@ extern void set_gdbarch_info_proc (struct gdbarch *gdbarch, gdbarch_info_proc_ft
extern int gdbarch_core_info_proc_p (struct gdbarch *gdbarch);
typedef void (gdbarch_core_info_proc_ftype) (struct gdbarch *gdbarch, char *args, enum info_proc_what what);
extern void gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what);
typedef void (gdbarch_core_info_proc_ftype) (struct gdbarch *gdbarch, const char *args, enum info_proc_what what);
extern void gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what);
extern void set_gdbarch_core_info_proc (struct gdbarch *gdbarch, gdbarch_core_info_proc_ftype *core_info_proc);
/* Iterate over all objfiles in the order that makes the most sense