aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2015-07-31 13:19:53 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2015-07-31 13:19:53 -0400
commitf486487f558686c05d4f4d91a75638b9da399044 (patch)
treefef0470290c0abbc6d79d451a651aae987e47699 /gdb/ui-out.c
parent22d31b1192bb38c766e349e5eed1a82298cc2c1f (diff)
downloadgdb-f486487f558686c05d4f4d91a75638b9da399044.zip
gdb-f486487f558686c05d4f4d91a75638b9da399044.tar.gz
gdb-f486487f558686c05d4f4d91a75638b9da399044.tar.bz2
Mostly trivial enum fixes
This is a patch I extracted from Pedro's C++ branch. It contains the most trivial enum fixes, where an integer type/value was used instead of the appropriate enum type/value. It fixes many C++ errors, since in C++ you can't mix integers and enums implicitely. Regardless of the C++ conversion, I think this is a good cleanup to make use of the appropriate enum types. Regression-tested on native x86_64. gdb/ChangeLog: * aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): Use enum type or value instead of integer. (aarch64_linux_insert_watchpoint): Likewise. (aarch64_linux_remove_watchpoint): Likewise. * ada-lang.c (ada_op_print_tab): Likewise. * amd64-linux-tdep.c (amd64_canonicalize_syscall): Likewise. (amd64_linux_syscall_record_common): Likewise. * arch-utils.c (target_byte_order_user): Likewise. (default_byte_order): Likewise. * arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Likewise. (arm_linux_get_hwbp_type): Likewise. (arm_linux_hw_watchpoint_initialize): Likewise. (arm_linux_insert_watchpoint): Likewise. * arm-linux-tdep.c (arm_canonicalize_syscall): Likewise. (arm_linux_syscall_record): Likewise. * breakpoint.c (update_watchpoint): Likewise. (breakpoint_here_p): Likewise. (bpstat_print): Likewise. (enable_breakpoint_disp): Likewise. * c-lang.c (c_op_print_tab): Likewise. * cli/cli-decode.c (add_info_alias): Likewise. * d-lang.c (d_op_print_tab): Likewise. * eval.c (evaluate_subexp_standard): Likewise. * f-exp.y (dot_ops): Likewise. (f77_keywords): Likewise. * f-lang.c (f_op_print_tab): Likewise. * go-lang.c (go_op_print_tab): Likewise. * guile/scm-breakpoint.c (gdbscm_make_breakpoint): Likewise. * guile/scm-cmd.c (gdbscm_make_command): Likewise. * guile/scm-param.c (gdbscm_make_parameter): Likewise. * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Likewise. * guile/scm-string.c (struct scm_to_stringn_data): Likewise. (struct scm_from_stringn_data): Likewise. * i386-linux-tdep.c (i386_canonicalize_syscall): Likewise. * ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise. (ia64_linux_remove_watchpoint): Likewise. (ia64_linux_can_use_hw_breakpoint): Likewise. * infrun.c (print_stop_event): Likewise. * jv-lang.c (java_op_print_tab): Likewise. * linux-nat.c (linux_proc_xfer_partial): Likewise. * linux-nat.h (struct lwp_info): Likewise. * linux-thread-db.c (enable_thread_event): Likewise. * m2-lang.c (m2_op_print_tab): Likewise. * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise. (mi_cmd_stack_list_variables): Likewise. * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise. * mi/mi-out.c (mi_table_begin): Likewise. (mi_table_header): Likewise. * mips-linux-nat.c (mips_linux_can_use_hw_breakpoint): Likewise. (mips_linux_insert_watchpoint): Likewise. (mips_linux_remove_watchpoint): Likewise. * nat/mips-linux-watch.c (mips_linux_watch_type_to_irw): Likewise. * nat/mips-linux-watch.h (struct mips_watchpoint): Likewise. (mips_linux_watch_type_to_irw): Likewise. * nto-procfs.c (procfs_can_use_hw_breakpoint): Likewise. (procfs_insert_hw_watchpoint): Likewise. (procfs_remove_hw_watchpoint): Likewise. (procfs_hw_watchpoint): Likewise. (procfs_can_use_hw_breakpoint): Likewise. (procfs_remove_hw_watchpoint): Likewise. (procfs_insert_hw_watchpoint): Likewise. * p-lang.c (pascal_op_print_tab): Likewise. * ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Likewise. * ppc-linux-tdep.c (ppu2spu_unwind_register): Likewise. * ppc-sysv-tdep.c (get_decimal_float_return_value): Likewise. * procfs.c (procfs_can_use_hw_breakpoint): Likewise. (procfs_insert_watchpoint): Likewise. (procfs_remove_watchpoint): Likewise. * psymtab.c (recursively_search_psymtabs): Likewise. * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint): Likewise. (m32r_insert_watchpoint): Likewise. * remote-mips.c (mips_can_use_watchpoint): Likewise. (mips_insert_watchpoint): Likewise. (mips_remove_watchpoint): Likewise. * remote.c (watchpoint_to_Z_packet): Likewise. (remote_insert_watchpoint): Likewise. (remote_remove_watchpoint): Likewise. (remote_check_watch_resources): Likewise. * s390-linux-nat.c (s390_insert_watchpoint): Likewise. (s390_remove_watchpoint): Likewise. (s390_can_use_hw_breakpoint): Likewise. * s390-linux-tdep.c (s390_gdbarch_init): Likewise. * spu-linux-nat.c (spu_can_use_hw_breakpoint): Likewise. * target.h (struct target_ops): Likewise. * tilegx-tdep.c (tilegx_analyze_prologue): Likewise. * ui-out.c (struct ui_out_hdr): Likewise. (append_header_to_list): Likewise. (get_next_header): Likewise. (verify_field): Likewise. (ui_out_begin): Likewise. (ui_out_field_int): Likewise. (ui_out_field_fmt_int): Likewise. (ui_out_field_skip): Likewise. (ui_out_field_string): Likewise. (ui_out_field_fmt): Likewise. * varobj.c (new_variable): Likewise. * x86-nat.c (x86_insert_watchpoint): Likewise. (x86_remove_watchpoint): Likewise. (x86_can_use_hw_breakpoint): Likewise. * xtensa-tdep.h (struct gdbarch_tdep): Likewise. * inflow.c (enum gdb_has_a_terminal_flag_enum): Add name to previously anonymous enumeration type.. * linux-record.h (enum gdb_syscall): Add gdb_sys_no_syscall value. * target-debug.h (target_debug_print_enum_target_hw_bp_type): New. (target_debug_print_enum_bptype): New. * target-delegates.c: Regenerate.
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r--gdb/ui-out.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 8872600..a18fe2e 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -31,7 +31,7 @@ struct ui_out_hdr
{
int colno;
int width;
- int alignment;
+ enum ui_align alignment;
char *col_name;
char *colhdr;
struct ui_out_hdr *next;
@@ -269,14 +269,14 @@ static void uo_data_destroy (struct ui_out *uiout);
extern void _initialize_ui_out (void);
static void append_header_to_list (struct ui_out *uiout, int width,
- int alignment, const char *col_name,
+ enum ui_align alignment, const char *col_name,
const char *colhdr);
static int get_next_header (struct ui_out *uiout, int *colno, int *width,
- int *alignment, char **colhdr);
+ enum ui_align *alignment, char **colhdr);
static void clear_header_list (struct ui_out *uiout);
static void clear_table (struct ui_out *uiout);
static void verify_field (struct ui_out *uiout, int *fldno, int *width,
- int *align);
+ enum ui_align *align);
/* exported functions (ui_out API) */
@@ -395,7 +395,7 @@ specified after table_body."));
{
int fldno;
int width;
- int align;
+ enum ui_align align;
verify_field (uiout, &fldno, &width, &align);
}
@@ -470,7 +470,7 @@ ui_out_field_int (struct ui_out *uiout,
{
int fldno;
int width;
- int align;
+ enum ui_align align;
verify_field (uiout, &fldno, &width, &align);
@@ -486,7 +486,7 @@ ui_out_field_fmt_int (struct ui_out *uiout,
{
int fldno;
int width;
- int align;
+ enum ui_align align;
verify_field (uiout, &fldno, &width, &align);
@@ -530,7 +530,7 @@ ui_out_field_skip (struct ui_out *uiout,
{
int fldno;
int width;
- int align;
+ enum ui_align align;
verify_field (uiout, &fldno, &width, &align);
@@ -544,7 +544,7 @@ ui_out_field_string (struct ui_out *uiout,
{
int fldno;
int width;
- int align;
+ enum ui_align align;
verify_field (uiout, &fldno, &width, &align);
@@ -560,7 +560,7 @@ ui_out_field_fmt (struct ui_out *uiout,
va_list args;
int fldno;
int width;
- int align;
+ enum ui_align align;
/* Will not align, but has to call anyway. */
verify_field (uiout, &fldno, &width, &align);
@@ -956,7 +956,7 @@ clear_header_list (struct ui_out *uiout)
static void
append_header_to_list (struct ui_out *uiout,
int width,
- int alignment,
+ enum ui_align alignment,
const char *col_name,
const char *colhdr)
{
@@ -1002,7 +1002,7 @@ static int
get_next_header (struct ui_out *uiout,
int *colno,
int *width,
- int *alignment,
+ enum ui_align *alignment,
char **colhdr)
{
/* There may be no headers at all or we may have used all columns. */
@@ -1023,7 +1023,8 @@ get_next_header (struct ui_out *uiout,
available/applicable). */
static void
-verify_field (struct ui_out *uiout, int *fldno, int *width, int *align)
+verify_field (struct ui_out *uiout, int *fldno, int *width,
+ enum ui_align *align)
{
struct ui_out_level *current = current_level (uiout);
char *text;