+2021-01-13 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * arc-tdep.h (arc_debug): Change type to bool.
+ * arc-tdep.c (arc_debug): Change type to bool.
+ (arc_analyze_prologue): Adjust.
+ (_initialize_arc_tdep): Use add_setshow_boolean_cmd.
+ * arc-linux-nat.c (ps_get_thread_area): Adjust.
+
2021-01-13 Simon Marchi <simon.marchi@polymtl.ca>
* auto-load.c (auto_load_objfile_script_1): Use bool.
ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx,
void **base)
{
- if (arc_debug >= 2)
+ if (arc_debug)
debug_printf ("arc-linux-nat: ps_get_thread_area called");
if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
/* Global debug flag. */
-int arc_debug;
+bool arc_debug;
/* List of "maintenance print arc" commands. */
arc_insn_decode (current_prologue_end, &di, arc_delayed_print_insn,
&insn);
- if (arc_debug >= 2)
+ if (arc_debug)
arc_insn_dump (insn);
/* If this instruction is in the prologue, fields in the cache will be
&maintenance_print_arc_list);
/* Debug internals for ARC GDB. */
- add_setshow_zinteger_cmd ("arc", class_maintenance,
- &arc_debug,
- _("Set ARC specific debugging."),
- _("Show ARC specific debugging."),
- _("Non-zero enables ARC specific debugging."),
- NULL, NULL, &setdebuglist, &showdebuglist);
+ add_setshow_boolean_cmd ("arc", class_maintenance,
+ &arc_debug,
+ _("Set ARC specific debugging."),
+ _("Show ARC specific debugging."),
+ _("When set, ARC specific debugging is enabled."),
+ NULL, NULL, &setdebuglist, &showdebuglist);
}