diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-01-18 20:14:54 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-01-18 20:47:55 -0500 |
commit | cc67f780ecdb8a5c50eaae9e04b7fc11ce23ddba (patch) | |
tree | c8445fbe78b1e5a2599e45689cf67e14938ceaf7 /sim/common | |
parent | 7fd14d6f580eeed46ef4d6f04f6b5f2f1318c0f9 (diff) | |
download | binutils-cc67f780ecdb8a5c50eaae9e04b7fc11ce23ddba.zip binutils-cc67f780ecdb8a5c50eaae9e04b7fc11ce23ddba.tar.gz binutils-cc67f780ecdb8a5c50eaae9e04b7fc11ce23ddba.tar.bz2 |
sim: info: convert verbose field to a bool
The verbose argument has always been an int treated as a bool, so
convert it to an explicit bool. Further, update the API docs to
match the reality that the verbose value is actually used by some
of the internal modules.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/cgen-scache.c | 2 | ||||
-rw-r--r-- | sim/common/cgen-scache.h | 2 | ||||
-rw-r--r-- | sim/common/sim-info.c | 2 | ||||
-rw-r--r-- | sim/common/sim-module.c | 2 | ||||
-rw-r--r-- | sim/common/sim-module.h | 4 | ||||
-rw-r--r-- | sim/common/sim-profile.c | 12 | ||||
-rw-r--r-- | sim/common/sim-profile.h | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c index f087dc7..c6de30e 100644 --- a/sim/common/cgen-scache.c +++ b/sim/common/cgen-scache.c @@ -420,7 +420,7 @@ scache_lookup_or_alloc (SIM_CPU *cpu, IADDR pc, int n, SCACHE **bufp) /* Print cache access statics for CPU. */ void -scache_print_profile (SIM_CPU *cpu, int verbose) +scache_print_profile (SIM_CPU *cpu, bool verbose) { SIM_DESC sd = CPU_STATE (cpu); unsigned long hits = CPU_SCACHE_HITS (cpu); diff --git a/sim/common/cgen-scache.h b/sim/common/cgen-scache.h index f3674cc..2b79cb1 100644 --- a/sim/common/cgen-scache.h +++ b/sim/common/cgen-scache.h @@ -117,7 +117,7 @@ extern void scache_flush_cpu (SIM_CPU *); /* Scache profiling support. */ /* Print summary scache usage information. */ -extern void scache_print_profile (SIM_CPU *cpu, int verbose); +extern void scache_print_profile (SIM_CPU *cpu, bool verbose); #if WITH_PROFILE_SCACHE_P diff --git a/sim/common/sim-info.c b/sim/common/sim-info.c index 0e3554d..db8cc85 100644 --- a/sim/common/sim-info.c +++ b/sim/common/sim-info.c @@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ sim-module. */ void -sim_info (SIM_DESC sd, int verbose) +sim_info (SIM_DESC sd, bool verbose) { SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); sim_module_info (sd, verbose || STATE_VERBOSE_P (sd)); diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c index 0d5f6c1..f03e4b7 100644 --- a/sim/common/sim-module.c +++ b/sim/common/sim-module.c @@ -272,7 +272,7 @@ sim_module_uninstall (SIM_DESC sd) /* Called when ever simulator info is needed */ void -sim_module_info (SIM_DESC sd, int verbose) +sim_module_info (SIM_DESC sd, bool verbose) { struct module_list *modules = STATE_MODULES (sd); MODULE_INFO_LIST *modp; diff --git a/sim/common/sim-module.h b/sim/common/sim-module.h index d50e5df..cfa06cb 100644 --- a/sim/common/sim-module.h +++ b/sim/common/sim-module.h @@ -39,7 +39,7 @@ typedef SIM_RC (MODULE_INIT_FN) (SIM_DESC); typedef SIM_RC (MODULE_RESUME_FN) (SIM_DESC); typedef SIM_RC (MODULE_SUSPEND_FN) (SIM_DESC); typedef void (MODULE_UNINSTALL_FN) (SIM_DESC); -typedef void (MODULE_INFO_FN) (SIM_DESC, int); +typedef void (MODULE_INFO_FN) (SIM_DESC, bool); /* Lists of installed handlers. */ @@ -98,7 +98,7 @@ SIM_RC sim_module_suspend (SIM_DESC sd); SIM_RC sim_module_resume (SIM_DESC sd); /* Report general information on module */ -void sim_module_info (SIM_DESC sd, int verbose); +void sim_module_info (SIM_DESC sd, bool verbose); /* Module private data */ diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c index 77b2bd3..6b3853e 100644 --- a/sim/common/sim-profile.c +++ b/sim/common/sim-profile.c @@ -611,7 +611,7 @@ profile_pc_init (SIM_DESC sd) } static void -profile_print_pc (sim_cpu *cpu, int verbose) +profile_print_pc (sim_cpu *cpu, bool verbose) { SIM_DESC sd = CPU_STATE (cpu); PROFILE_DATA *profile = CPU_PROFILE_DATA (cpu); @@ -758,7 +758,7 @@ profile_insn_init (SIM_DESC sd) } static void -profile_print_insn (sim_cpu *cpu, int verbose) +profile_print_insn (sim_cpu *cpu, bool verbose) { unsigned int i, n, total, max_val, max_name_len; SIM_DESC sd = CPU_STATE (cpu); @@ -831,7 +831,7 @@ profile_print_insn (sim_cpu *cpu, int verbose) #if WITH_PROFILE_MEMORY_P static void -profile_print_memory (sim_cpu *cpu, int verbose) +profile_print_memory (sim_cpu *cpu, bool verbose) { unsigned int i, n; unsigned int total_read, total_write; @@ -905,7 +905,7 @@ profile_print_memory (sim_cpu *cpu, int verbose) #if WITH_PROFILE_CORE_P static void -profile_print_core (sim_cpu *cpu, int verbose) +profile_print_core (sim_cpu *cpu, bool verbose) { unsigned int total; unsigned int max_val; @@ -962,7 +962,7 @@ profile_print_core (sim_cpu *cpu, int verbose) #if WITH_PROFILE_MODEL_P static void -profile_print_model (sim_cpu *cpu, int verbose) +profile_print_model (sim_cpu *cpu, bool verbose) { SIM_DESC sd = CPU_STATE (cpu); PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); @@ -1110,7 +1110,7 @@ profile_print_addr_ranges (sim_cpu *cpu) section titles. */ static void -profile_info (SIM_DESC sd, int verbose) +profile_info (SIM_DESC sd, bool verbose) { int i,c; int print_title_p = 0; diff --git a/sim/common/sim-profile.h b/sim/common/sim-profile.h index 23b21ea..9b062f3 100644 --- a/sim/common/sim-profile.h +++ b/sim/common/sim-profile.h @@ -120,7 +120,7 @@ SIM_RC sim_profile_set_option (SIM_DESC sd_, const char *name_, int idx_, typedef void (PROFILE_INFO_CALLBACK_FN) (SIM_DESC, int); struct _sim_cpu; /* forward reference */ -typedef void (PROFILE_INFO_CPU_CALLBACK_FN) (struct _sim_cpu *cpu, int verbose); +typedef void (PROFILE_INFO_CPU_CALLBACK_FN) (struct _sim_cpu *cpu, bool verbose); /* Struct containing most profiling data. |