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.
This commit is contained in:
Simon Marchi 2015-07-31 13:19:53 -04:00
parent 22d31b1192
commit f486487f55
57 changed files with 290 additions and 144 deletions

View file

@ -1,3 +1,113 @@
2015-07-31 Simon Marchi <simon.marchi@ericsson.com>
* 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.
2015-07-30 Sandra Loosemore <sandra@codesourcery.com> 2015-07-30 Sandra Loosemore <sandra@codesourcery.com>
* nios2-tdep.c (nios2_analyze_prologue): Do what the comment * nios2-tdep.c (nios2_analyze_prologue): Do what the comment

View file

@ -711,7 +711,8 @@ aarch64_linux_read_description (struct target_ops *ops)
static int static int
aarch64_linux_can_use_hw_breakpoint (struct target_ops *self, aarch64_linux_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type,
int cnt, int othertype)
{ {
if (type == bp_hardware_watchpoint || type == bp_read_watchpoint if (type == bp_hardware_watchpoint || type == bp_read_watchpoint
|| type == bp_access_watchpoint || type == bp_watchpoint) || type == bp_access_watchpoint || type == bp_watchpoint)
@ -807,7 +808,8 @@ aarch64_linux_remove_hw_breakpoint (struct target_ops *self,
static int static int
aarch64_linux_insert_watchpoint (struct target_ops *self, aarch64_linux_insert_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
int ret; int ret;
@ -839,7 +841,8 @@ aarch64_linux_insert_watchpoint (struct target_ops *self,
static int static int
aarch64_linux_remove_watchpoint (struct target_ops *self, aarch64_linux_remove_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
int ret; int ret;

View file

@ -13636,7 +13636,7 @@ static const struct op_print ada_op_print_tab[] = {
{".all", UNOP_IND, PREC_SUFFIX, 1}, {".all", UNOP_IND, PREC_SUFFIX, 1},
{"'access", UNOP_ADDR, PREC_SUFFIX, 1}, {"'access", UNOP_ADDR, PREC_SUFFIX, 1},
{"'size", OP_ATR_SIZE, PREC_SUFFIX, 1}, {"'size", OP_ATR_SIZE, PREC_SUFFIX, 1},
{NULL, 0, 0, 0} {NULL, OP_NULL, PREC_SUFFIX, 0}
}; };
enum ada_primitive_types { enum ada_primitive_types {

View file

@ -995,7 +995,7 @@ amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
case amd64_sys_arch_prctl: case amd64_sys_arch_prctl:
case amd64_x32_sys_arch_prctl: case amd64_x32_sys_arch_prctl:
return -1; /* Note */ return gdb_sys_no_syscall; /* Note */
case amd64_sys_adjtimex: case amd64_sys_adjtimex:
case amd64_x32_sys_adjtimex: case amd64_x32_sys_adjtimex:
@ -1429,7 +1429,7 @@ amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
return gdb_sys_move_pages; return gdb_sys_move_pages;
default: default:
return -1; return gdb_sys_no_syscall;
} }
} }
@ -1451,7 +1451,7 @@ amd64_linux_syscall_record_common (struct regcache *regcache,
{ {
int ret; int ret;
ULONGEST syscall_native; ULONGEST syscall_native;
enum gdb_syscall syscall_gdb = -1; enum gdb_syscall syscall_gdb = gdb_sys_no_syscall;
regcache_raw_read_unsigned (regcache, AMD64_RAX_REGNUM, &syscall_native); regcache_raw_read_unsigned (regcache, AMD64_RAX_REGNUM, &syscall_native);
@ -1486,9 +1486,10 @@ amd64_linux_syscall_record_common (struct regcache *regcache,
break; break;
} }
syscall_gdb = amd64_canonicalize_syscall (syscall_native); syscall_gdb
= amd64_canonicalize_syscall ((enum amd64_syscall) syscall_native);
if (syscall_gdb < 0) if (syscall_gdb == gdb_sys_no_syscall)
{ {
printf_unfiltered (_("Process record and replay target doesn't " printf_unfiltered (_("Process record and replay target doesn't "
"support syscall number %s\n"), "support syscall number %s\n"),

View file

@ -273,7 +273,7 @@ default_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
/* Functions to manipulate the endianness of the target. */ /* Functions to manipulate the endianness of the target. */
static int target_byte_order_user = BFD_ENDIAN_UNKNOWN; static enum bfd_endian target_byte_order_user = BFD_ENDIAN_UNKNOWN;
static const char endian_big[] = "big"; static const char endian_big[] = "big";
static const char endian_little[] = "little"; static const char endian_little[] = "little";
@ -603,7 +603,7 @@ static const bfd_target *default_bfd_vec = &DEFAULT_BFD_VEC;
static const bfd_target *default_bfd_vec; static const bfd_target *default_bfd_vec;
#endif #endif
static int default_byte_order = BFD_ENDIAN_UNKNOWN; static enum bfd_endian default_byte_order = BFD_ENDIAN_UNKNOWN;
void void
initialize_current_architecture (void) initialize_current_architecture (void)

View file

@ -686,7 +686,8 @@ arm_linux_get_hw_watchpoint_count (void)
there is not an appropriate resource available, otherwise returns 1. */ there is not an appropriate resource available, otherwise returns 1. */
static int static int
arm_linux_can_use_hw_breakpoint (struct target_ops *self, arm_linux_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int ot) enum bptype type,
int cnt, int ot)
{ {
if (type == bp_hardware_watchpoint || type == bp_read_watchpoint if (type == bp_hardware_watchpoint || type == bp_read_watchpoint
|| type == bp_access_watchpoint || type == bp_watchpoint) || type == bp_access_watchpoint || type == bp_watchpoint)
@ -922,10 +923,10 @@ arm_linux_hw_breakpoint_initialize (struct gdbarch *gdbarch,
p->control = arm_hwbp_control_initialize (mask, arm_hwbp_break, 1); p->control = arm_hwbp_control_initialize (mask, arm_hwbp_break, 1);
} }
/* Get the ARM hardware breakpoint type from the RW value we're given when /* Get the ARM hardware breakpoint type from the type value we're
asked to set a watchpoint. */ given when asked to set a watchpoint. */
static arm_hwbp_type static arm_hwbp_type
arm_linux_get_hwbp_type (int rw) arm_linux_get_hwbp_type (enum target_hw_bp_type type)
{ {
if (rw == hw_read) if (rw == hw_read)
return arm_hwbp_load; return arm_hwbp_load;
@ -938,7 +939,8 @@ arm_linux_get_hwbp_type (int rw)
/* Initialize the hardware breakpoint structure P for a watchpoint at ADDR /* Initialize the hardware breakpoint structure P for a watchpoint at ADDR
to LEN. The type of watchpoint is given in RW. */ to LEN. The type of watchpoint is given in RW. */
static void static void
arm_linux_hw_watchpoint_initialize (CORE_ADDR addr, int len, int rw, arm_linux_hw_watchpoint_initialize (CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct arm_linux_hw_breakpoint *p) struct arm_linux_hw_breakpoint *p)
{ {
const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap (); const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap ();
@ -951,7 +953,7 @@ arm_linux_hw_watchpoint_initialize (CORE_ADDR addr, int len, int rw,
p->address = (unsigned int) addr; p->address = (unsigned int) addr;
p->control = arm_hwbp_control_initialize (mask, p->control = arm_hwbp_control_initialize (mask,
arm_linux_get_hwbp_type (rw), 1); arm_linux_get_hwbp_type (type), 1);
} }
/* Are two break-/watch-points equal? */ /* Are two break-/watch-points equal? */
@ -1147,7 +1149,8 @@ arm_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
/* Insert a Hardware breakpoint. */ /* Insert a Hardware breakpoint. */
static int static int
arm_linux_insert_watchpoint (struct target_ops *self, arm_linux_insert_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int rw, CORE_ADDR addr, int len,
enum target_hw_bp_type rw,
struct expression *cond) struct expression *cond)
{ {
struct lwp_info *lp; struct lwp_info *lp;

View file

@ -1267,7 +1267,7 @@ arm_canonicalize_syscall (int syscall)
else if (syscall >= 248 && syscall <= 253) else if (syscall >= 248 && syscall <= 253)
return syscall + 4; return syscall + 4;
return -1; return gdb_sys_no_syscall;
} }
/* Record all registers but PC register for process-record. */ /* Record all registers but PC register for process-record. */
@ -1299,7 +1299,7 @@ arm_linux_syscall_record (struct regcache *regcache, unsigned long svc_number)
syscall_gdb = arm_canonicalize_syscall (svc_number); syscall_gdb = arm_canonicalize_syscall (svc_number);
if (syscall_gdb < 0) if (syscall_gdb == gdb_sys_no_syscall)
{ {
printf_unfiltered (_("Process record and replay target doesn't " printf_unfiltered (_("Process record and replay target doesn't "
"support syscall number %s\n"), "support syscall number %s\n"),

View file

@ -1966,7 +1966,7 @@ update_watchpoint (struct watchpoint *b, int reparse)
&& TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
{ {
CORE_ADDR addr; CORE_ADDR addr;
int type; enum target_hw_bp_type type;
struct bp_location *loc, **tmp; struct bp_location *loc, **tmp;
int bitpos = 0, bitsize = 0; int bitpos = 0, bitsize = 0;
@ -4211,7 +4211,7 @@ breakpoint_here_p (struct address_space *aspace, CORE_ADDR pc)
} }
} }
return any_breakpoint_here ? ordinary_breakpoint_here : 0; return any_breakpoint_here ? ordinary_breakpoint_here : no_breakpoint_here;
} }
/* Return true if there's a moribund breakpoint at PC. */ /* Return true if there's a moribund breakpoint at PC. */
@ -4838,7 +4838,7 @@ print_solib_event (int is_catchpoint)
enum print_stop_action enum print_stop_action
bpstat_print (bpstat bs, int kind) bpstat_print (bpstat bs, int kind)
{ {
int val; enum print_stop_action val;
/* Maybe another breakpoint in the chain caused us to stop. /* Maybe another breakpoint in the chain caused us to stop.
(Currently all watchpoints go on the bpstat whether hit or not. (Currently all watchpoints go on the bpstat whether hit or not.
@ -14573,7 +14573,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition,
if (is_watchpoint (bpt)) if (is_watchpoint (bpt))
{ {
/* Initialize it just to avoid a GCC false warning. */ /* Initialize it just to avoid a GCC false warning. */
enum enable_state orig_enable_state = 0; enum enable_state orig_enable_state = bp_disabled;
TRY TRY
{ {

View file

@ -754,7 +754,7 @@ const struct op_print c_op_print_tab[] =
{"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0}, {"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0}, {"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
{"--", UNOP_PREDECREMENT, PREC_PREFIX, 0}, {"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
{NULL, 0, 0, 0} {NULL, OP_NULL, PREC_PREFIX, 0}
}; };
enum c_primitive_types { enum c_primitive_types {

View file

@ -864,7 +864,7 @@ add_info (const char *name, cmd_cfunc_ftype *fun, const char *doc)
struct cmd_list_element * struct cmd_list_element *
add_info_alias (const char *name, const char *oldname, int abbrev_flag) add_info_alias (const char *name, const char *oldname, int abbrev_flag)
{ {
return add_alias_cmd (name, oldname, 0, abbrev_flag, &infolist); return add_alias_cmd (name, oldname, class_run, abbrev_flag, &infolist);
} }
/* Add an element to the list of commands. */ /* Add an element to the list of commands. */

View file

@ -90,7 +90,7 @@ static const struct op_print d_op_print_tab[] =
{"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0}, {"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0}, {"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
{"--", UNOP_PREDECREMENT, PREC_PREFIX, 0}, {"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
{NULL, 0, 0, 0} {NULL, OP_NULL, PREC_PREFIX, 0}
}; };
/* Mapping of all D basic data types into the language vector. */ /* Mapping of all D basic data types into the language vector. */

View file

@ -1063,7 +1063,7 @@ evaluate_subexp_standard (struct type *expect_type,
CORE_ADDR selector = 0; CORE_ADDR selector = 0;
int struct_return = 0; int struct_return = 0;
int sub_no_side = 0; enum noside sub_no_side = EVAL_NORMAL;
struct value *msg_send = NULL; struct value *msg_send = NULL;
struct value *msg_send_stret = NULL; struct value *msg_send_stret = NULL;

View file

@ -859,7 +859,7 @@ static const struct token dot_ops[] =
{ ".GT.", GREATERTHAN, BINOP_END }, { ".GT.", GREATERTHAN, BINOP_END },
{ ".lt.", LESSTHAN, BINOP_END }, { ".lt.", LESSTHAN, BINOP_END },
{ ".LT.", LESSTHAN, BINOP_END }, { ".LT.", LESSTHAN, BINOP_END },
{ NULL, 0, 0 } { NULL, 0, BINOP_END }
}; };
struct f77_boolean_val struct f77_boolean_val
@ -894,7 +894,7 @@ static const struct token f77_keywords[] =
{ "sizeof", SIZEOF, BINOP_END }, { "sizeof", SIZEOF, BINOP_END },
{ "real_8", REAL_S8_KEYWORD, BINOP_END }, { "real_8", REAL_S8_KEYWORD, BINOP_END },
{ "real", REAL_KEYWORD, BINOP_END }, { "real", REAL_KEYWORD, BINOP_END },
{ NULL, 0, 0 } { NULL, 0, BINOP_END }
}; };
/* Implementation of a dynamically expandable buffer for processing input /* Implementation of a dynamically expandable buffer for processing input

View file

@ -143,7 +143,7 @@ static const struct op_print f_op_print_tab[] =
{".LT.", BINOP_LESS, PREC_ORDER, 0}, {".LT.", BINOP_LESS, PREC_ORDER, 0},
{"**", UNOP_IND, PREC_PREFIX, 0}, {"**", UNOP_IND, PREC_PREFIX, 0},
{"@", BINOP_REPEAT, PREC_REPEAT, 0}, {"@", BINOP_REPEAT, PREC_REPEAT, 0},
{NULL, 0, 0, 0} {NULL, OP_NULL, PREC_REPEAT, 0}
}; };
enum f_primitive_types { enum f_primitive_types {

View file

@ -478,7 +478,7 @@ static const struct op_print go_op_print_tab[] =
{"unsafe.Sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0}, {"unsafe.Sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
{"++", UNOP_POSTINCREMENT, PREC_SUFFIX, 0}, {"++", UNOP_POSTINCREMENT, PREC_SUFFIX, 0},
{"--", UNOP_POSTDECREMENT, PREC_SUFFIX, 0}, {"--", UNOP_POSTDECREMENT, PREC_SUFFIX, 0},
{NULL, 0, 0, 0} {NULL, OP_NULL, PREC_SUFFIX, 0}
}; };
enum go_primitive_types { enum go_primitive_types {

View file

@ -340,8 +340,8 @@ gdbscm_make_breakpoint (SCM location_scm, SCM rest)
char *s; char *s;
char *location; char *location;
int type_arg_pos = -1, access_type_arg_pos = -1, internal_arg_pos = -1; int type_arg_pos = -1, access_type_arg_pos = -1, internal_arg_pos = -1;
int type = bp_breakpoint; enum bptype type = bp_breakpoint;
int access_type = hw_write; enum target_hw_bp_type access_type = hw_write;
int internal = 0; int internal = 0;
SCM result; SCM result;
breakpoint_smob *bp_smob; breakpoint_smob *bp_smob;

View file

@ -673,7 +673,7 @@ gdbscm_make_command (SCM name_scm, SCM rest)
int doc_arg_pos = -1; int doc_arg_pos = -1;
char *s; char *s;
char *name; char *name;
int command_class = no_class; enum command_class command_class = no_class;
SCM completer_class = SCM_BOOL_F; SCM completer_class = SCM_BOOL_F;
int is_prefix = 0; int is_prefix = 0;
char *doc = NULL; char *doc = NULL;

View file

@ -957,7 +957,7 @@ gdbscm_make_parameter (SCM name_scm, SCM rest)
if (gdbscm_is_exception (initial_value_scm)) if (gdbscm_is_exception (initial_value_scm))
gdbscm_throw (initial_value_scm); gdbscm_throw (initial_value_scm);
} }
pascm_set_param_value_x (param_type, &p_smob->value, enum_list, pascm_set_param_value_x (p_smob->type, &p_smob->value, enum_list,
initial_value_scm, initial_value_scm,
initial_value_arg_pos, FUNC_NAME); initial_value_arg_pos, FUNC_NAME);
} }

View file

@ -971,7 +971,7 @@ gdbscm_apply_val_pretty_printer (const struct extension_language_defn *extlang,
struct value *value; struct value *value;
enum display_hint hint; enum display_hint hint;
struct cleanup *cleanups; struct cleanup *cleanups;
int result = EXT_LANG_RC_NOP; enum ext_lang_rc result = EXT_LANG_RC_NOP;
enum string_repr_result print_result; enum string_repr_result print_result;
/* No pretty-printer support for unavailable values. */ /* No pretty-printer support for unavailable values. */

View file

@ -83,7 +83,7 @@ struct scm_to_stringn_data
SCM string; SCM string;
size_t *lenp; size_t *lenp;
const char *charset; const char *charset;
int conversion_kind; scm_t_string_failed_conversion_handler conversion_kind;
char *result; char *result;
}; };
@ -151,7 +151,7 @@ struct scm_from_stringn_data
const char *string; const char *string;
size_t len; size_t len;
const char *charset; const char *charset;
int conversion_kind; scm_t_string_failed_conversion_handler conversion_kind;
SCM result; SCM result;
}; };

View file

@ -381,7 +381,7 @@ i386_canonicalize_syscall (int syscall)
if (syscall <= i386_syscall_max) if (syscall <= i386_syscall_max)
return syscall; return syscall;
else else
return -1; return gdb_sys_no_syscall;
} }
/* Parse the arguments of current system call instruction and record /* Parse the arguments of current system call instruction and record

View file

@ -542,7 +542,8 @@ is_power_of_2 (int val)
static int static int
ia64_linux_insert_watchpoint (struct target_ops *self, ia64_linux_insert_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int rw, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
struct lwp_info *lp; struct lwp_info *lp;
@ -569,7 +570,7 @@ ia64_linux_insert_watchpoint (struct target_ops *self,
dbr_addr = (long) addr; dbr_addr = (long) addr;
dbr_mask = (~(len - 1) & 0x00ffffffffffffffL); /* construct mask to match */ dbr_mask = (~(len - 1) & 0x00ffffffffffffffL); /* construct mask to match */
dbr_mask |= 0x0800000000000000L; /* Only match privilege level 3 */ dbr_mask |= 0x0800000000000000L; /* Only match privilege level 3 */
switch (rw) switch (type)
{ {
case hw_write: case hw_write:
dbr_mask |= (1L << 62); /* Set w bit */ dbr_mask |= (1L << 62); /* Set w bit */
@ -597,7 +598,8 @@ ia64_linux_insert_watchpoint (struct target_ops *self,
static int static int
ia64_linux_remove_watchpoint (struct target_ops *self, ia64_linux_remove_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
int idx; int idx;
@ -678,7 +680,8 @@ ia64_linux_stopped_by_watchpoint (struct target_ops *ops)
static int static int
ia64_linux_can_use_hw_breakpoint (struct target_ops *self, ia64_linux_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type,
int cnt, int othertype)
{ {
return 1; return 1;
} }

View file

@ -136,7 +136,7 @@ gdb_getpgrp (void)
} }
#endif #endif
enum enum gdb_has_a_terminal_flag_enum
{ {
yes, no, have_not_checked yes, no, have_not_checked
} }

View file

@ -6486,7 +6486,7 @@ void
print_stop_event (struct target_waitstatus *ws) print_stop_event (struct target_waitstatus *ws)
{ {
int bpstat_ret; int bpstat_ret;
int source_flag; enum print_what source_flag;
int do_frame_printing = 1; int do_frame_printing = 1;
struct thread_info *tp = inferior_thread (); struct thread_info *tp = inferior_thread ();

View file

@ -1098,7 +1098,7 @@ const struct op_print java_op_print_tab[] =
{"*", UNOP_IND, PREC_PREFIX, 0}, {"*", UNOP_IND, PREC_PREFIX, 0},
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0}, {"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
{"--", UNOP_PREDECREMENT, PREC_PREFIX, 0}, {"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
{NULL, 0, 0, 0} {NULL, OP_NULL, PREC_PREFIX, 0}
}; };
enum java_primitive_types enum java_primitive_types

View file

@ -4154,7 +4154,7 @@ linux_proc_xfer_partial (struct target_ops *ops, enum target_object object,
char filename[64]; char filename[64];
if (object != TARGET_OBJECT_MEMORY || !readbuf) if (object != TARGET_OBJECT_MEMORY || !readbuf)
return 0; return TARGET_XFER_EOF;
/* Don't bother for one word. */ /* Don't bother for one word. */
if (len < 3 * sizeof (long)) if (len < 3 * sizeof (long))

View file

@ -98,7 +98,7 @@ struct lwp_info
Values: Values:
- TARGET_WAITKIND_SYSCALL_ENTRY - TARGET_WAITKIND_SYSCALL_ENTRY
- TARGET_WAITKIND_SYSCALL_RETURN */ - TARGET_WAITKIND_SYSCALL_RETURN */
int syscall_state; enum target_waitkind syscall_state;
/* The processor core this LWP was last seen on. */ /* The processor core this LWP was last seen on. */
int core; int core;

View file

@ -182,6 +182,9 @@ struct linux_record_tdep
each must provide a mapping from their set to this one. */ each must provide a mapping from their set to this one. */
enum gdb_syscall { enum gdb_syscall {
/* An unknown GDB syscall, not a real syscall. */
gdb_sys_no_syscall = -1,
gdb_sys_restart_syscall = 0, gdb_sys_restart_syscall = 0,
gdb_sys_exit = 1, gdb_sys_exit = 1,
gdb_sys_fork = 2, gdb_sys_fork = 2,

View file

@ -476,7 +476,7 @@ verbose_dlsym (void *handle, const char *name)
} }
static td_err_e static td_err_e
enable_thread_event (int event, CORE_ADDR *bp) enable_thread_event (td_event_e event, CORE_ADDR *bp)
{ {
td_notify_t notify; td_notify_t notify;
td_err_e err; td_err_e err;

View file

@ -304,7 +304,7 @@ static const struct op_print m2_op_print_tab[] =
{"MIN", UNOP_MIN, PREC_BUILTIN_FUNCTION, 0}, {"MIN", UNOP_MIN, PREC_BUILTIN_FUNCTION, 0},
{"ODD", UNOP_ODD, PREC_BUILTIN_FUNCTION, 0}, {"ODD", UNOP_ODD, PREC_BUILTIN_FUNCTION, 0},
{"TRUNC", UNOP_TRUNC, PREC_BUILTIN_FUNCTION, 0}, {"TRUNC", UNOP_TRUNC, PREC_BUILTIN_FUNCTION, 0},
{NULL, 0, 0, 0} {NULL, OP_NULL, PREC_BUILTIN_FUNCTION, 0}
}; };
/* The built-in types of Modula-2. */ /* The built-in types of Modula-2. */

View file

@ -215,7 +215,7 @@ mi_cmd_stack_list_locals (char *command, char **argv, int argc)
struct frame_info *frame; struct frame_info *frame;
int raw_arg = 0; int raw_arg = 0;
enum ext_lang_bt_status result = EXT_LANG_BT_ERROR; enum ext_lang_bt_status result = EXT_LANG_BT_ERROR;
int print_value; enum print_values print_value;
int oind = 0; int oind = 0;
int skip_unavailable = 0; int skip_unavailable = 0;
int i; int i;
@ -412,7 +412,7 @@ mi_cmd_stack_list_variables (char *command, char **argv, int argc)
struct frame_info *frame; struct frame_info *frame;
int raw_arg = 0; int raw_arg = 0;
enum ext_lang_bt_status result = EXT_LANG_BT_ERROR; enum ext_lang_bt_status result = EXT_LANG_BT_ERROR;
int print_value; enum print_values print_value;
int oind = 0; int oind = 0;
int skip_unavailable = 0; int skip_unavailable = 0;

View file

@ -2755,8 +2755,8 @@ mi_cmd_trace_frame_collected (char *command, char **argv, int argc)
struct collection_list tracepoint_list, stepping_list; struct collection_list tracepoint_list, stepping_list;
struct traceframe_info *tinfo; struct traceframe_info *tinfo;
int oind = 0; int oind = 0;
int var_print_values = PRINT_ALL_VALUES; enum print_values var_print_values = PRINT_ALL_VALUES;
int comp_print_values = PRINT_ALL_VALUES; enum print_values comp_print_values = PRINT_ALL_VALUES;
int registers_format = 'x'; int registers_format = 'x';
int memory_contents = 0; int memory_contents = 0;
struct ui_out *uiout = current_uiout; struct ui_out *uiout = current_uiout;

View file

@ -106,8 +106,8 @@ mi_table_begin (struct ui_out *uiout,
const char *tblid) const char *tblid)
{ {
mi_open (uiout, tblid, ui_out_type_tuple); mi_open (uiout, tblid, ui_out_type_tuple);
mi_field_int (uiout, -1, -1, -1, "nr_rows", nr_rows); mi_field_int (uiout, -1, -1, ui_left, "nr_rows", nr_rows);
mi_field_int (uiout, -1, -1, -1, "nr_cols", nr_cols); mi_field_int (uiout, -1, -1, ui_left, "nr_cols", nr_cols);
mi_open (uiout, "hdr", ui_out_type_list); mi_open (uiout, "hdr", ui_out_type_list);
} }
@ -149,9 +149,9 @@ mi_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
return; return;
mi_open (uiout, NULL, ui_out_type_tuple); mi_open (uiout, NULL, ui_out_type_tuple);
mi_field_int (uiout, 0, 0, 0, "width", width); mi_field_int (uiout, 0, 0, ui_center, "width", width);
mi_field_int (uiout, 0, 0, 0, "alignment", alignment); mi_field_int (uiout, 0, 0, ui_center, "alignment", alignment);
mi_field_string (uiout, 0, 0, 0, "col_name", col_name); mi_field_string (uiout, 0, 0, ui_center, "col_name", col_name);
mi_field_string (uiout, 0, width, alignment, "colhdr", colhdr); mi_field_string (uiout, 0, width, alignment, "colhdr", colhdr);
mi_close (uiout, ui_out_type_tuple); mi_close (uiout, ui_out_type_tuple);
} }

View file

@ -509,7 +509,8 @@ mips_show_dr (const char *func, CORE_ADDR addr,
static int static int
mips_linux_can_use_hw_breakpoint (struct target_ops *self, mips_linux_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int ot) enum bptype type,
int cnt, int ot)
{ {
int i; int i;
uint32_t wanted_mask, irw_mask; uint32_t wanted_mask, irw_mask;
@ -643,7 +644,8 @@ mips_linux_new_thread (struct lwp_info *lp)
static int static int
mips_linux_insert_watchpoint (struct target_ops *self, mips_linux_insert_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
struct pt_watch_regs regs; struct pt_watch_regs regs;
@ -697,7 +699,8 @@ mips_linux_insert_watchpoint (struct target_ops *self,
static int static int
mips_linux_remove_watchpoint (struct target_ops *self, mips_linux_remove_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
int retval; int retval;

View file

@ -198,7 +198,7 @@ mips_linux_read_watch_registers (long lwpid,
/* Convert GDB's TYPE to an IRW mask. */ /* Convert GDB's TYPE to an IRW mask. */
uint32_t uint32_t
mips_linux_watch_type_to_irw (int type) mips_linux_watch_type_to_irw (enum target_hw_bp_type type)
{ {
switch (type) switch (type)
{ {

View file

@ -94,7 +94,7 @@ struct mips_watchpoint
{ {
CORE_ADDR addr; CORE_ADDR addr;
int len; int len;
int type; enum target_hw_bp_type type;
struct mips_watchpoint *next; struct mips_watchpoint *next;
}; };
@ -110,7 +110,7 @@ int mips_linux_watch_try_one_watch (struct pt_watch_regs *regs,
CORE_ADDR addr, int len, uint32_t irw); CORE_ADDR addr, int len, uint32_t irw);
void mips_linux_watch_populate_regs (struct mips_watchpoint *current_watches, void mips_linux_watch_populate_regs (struct mips_watchpoint *current_watches,
struct pt_watch_regs *regs); struct pt_watch_regs *regs);
uint32_t mips_linux_watch_type_to_irw (int type); uint32_t mips_linux_watch_type_to_irw (enum target_hw_bp_type type);
int mips_linux_read_watch_registers (long lwpid, int mips_linux_read_watch_registers (long lwpid,
struct pt_watch_regs *watch_readback, struct pt_watch_regs *watch_readback,

View file

@ -54,14 +54,16 @@ static procfs_run run;
static ptid_t do_attach (ptid_t ptid); static ptid_t do_attach (ptid_t ptid);
static int procfs_can_use_hw_breakpoint (struct target_ops *self, static int procfs_can_use_hw_breakpoint (struct target_ops *self,
int, int, int); enum target_hw_bp_type, int, int);
static int procfs_insert_hw_watchpoint (struct target_ops *self, static int procfs_insert_hw_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond); struct expression *cond);
static int procfs_remove_hw_watchpoint (struct target_ops *self, static int procfs_remove_hw_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond); struct expression *cond);
static int procfs_stopped_by_watchpoint (struct target_ops *ops); static int procfs_stopped_by_watchpoint (struct target_ops *ops);
@ -1494,16 +1496,16 @@ _initialize_procfs (void)
static int static int
procfs_hw_watchpoint (int addr, int len, int type) procfs_hw_watchpoint (int addr, int len, enum target_hw_bp_type type)
{ {
procfs_break brk; procfs_break brk;
switch (type) switch (type)
{ {
case 1: /* Read. */ case hw_read:
brk.type = _DEBUG_BREAK_RD; brk.type = _DEBUG_BREAK_RD;
break; break;
case 2: /* Read/Write. */ case hw_access:
brk.type = _DEBUG_BREAK_RW; brk.type = _DEBUG_BREAK_RW;
break; break;
default: /* Modify. */ default: /* Modify. */
@ -1525,14 +1527,16 @@ procfs_hw_watchpoint (int addr, int len, int type)
static int static int
procfs_can_use_hw_breakpoint (struct target_ops *self, procfs_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type,
int cnt, int othertype)
{ {
return 1; return 1;
} }
static int static int
procfs_remove_hw_watchpoint (struct target_ops *self, procfs_remove_hw_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
return procfs_hw_watchpoint (addr, -1, type); return procfs_hw_watchpoint (addr, -1, type);
@ -1540,7 +1544,8 @@ procfs_remove_hw_watchpoint (struct target_ops *self,
static int static int
procfs_insert_hw_watchpoint (struct target_ops *self, procfs_insert_hw_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
return procfs_hw_watchpoint (addr, len, type); return procfs_hw_watchpoint (addr, len, type);

View file

@ -339,7 +339,7 @@ const struct op_print pascal_op_print_tab[] =
{"^", UNOP_IND, PREC_SUFFIX, 1}, {"^", UNOP_IND, PREC_SUFFIX, 1},
{"@", UNOP_ADDR, PREC_PREFIX, 0}, {"@", UNOP_ADDR, PREC_PREFIX, 0},
{"sizeof", UNOP_SIZEOF, PREC_PREFIX, 0}, {"sizeof", UNOP_SIZEOF, PREC_PREFIX, 0},
{NULL, 0, 0, 0} {NULL, OP_NULL, PREC_PREFIX, 0}
}; };
enum pascal_primitive_types { enum pascal_primitive_types {

View file

@ -1391,7 +1391,7 @@ have_ptrace_hwdebug_interface (void)
static int static int
ppc_linux_can_use_hw_breakpoint (struct target_ops *self, ppc_linux_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int ot) enum bptype type, int cnt, int ot)
{ {
int total_hw_wp, total_hw_bp; int total_hw_wp, total_hw_bp;

View file

@ -1292,7 +1292,7 @@ struct ppu2spu_data
gdb_byte gprs[128*16]; gdb_byte gprs[128*16];
}; };
static int static enum register_status
ppu2spu_unwind_register (void *src, int regnum, gdb_byte *buf) ppu2spu_unwind_register (void *src, int regnum, gdb_byte *buf)
{ {
struct ppu2spu_data *data = src; struct ppu2spu_data *data = src;

View file

@ -608,7 +608,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
} }
/* Handle the return-value conventions for Decimal Floating Point values. */ /* Handle the return-value conventions for Decimal Floating Point values. */
static int static enum return_value_convention
get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype, get_decimal_float_return_value (struct gdbarch *gdbarch, struct type *valtype,
struct regcache *regcache, gdb_byte *readbuf, struct regcache *regcache, gdb_byte *readbuf,
const gdb_byte *writebuf) const gdb_byte *writebuf)

View file

@ -143,7 +143,7 @@ static char * procfs_make_note_section (struct target_ops *self,
bfd *, int *); bfd *, int *);
static int procfs_can_use_hw_breakpoint (struct target_ops *self, static int procfs_can_use_hw_breakpoint (struct target_ops *self,
int, int, int); enum bptype, int, int);
static void procfs_info_proc (struct target_ops *, const char *, static void procfs_info_proc (struct target_ops *, const char *,
enum info_proc_what); enum info_proc_what);
@ -4764,7 +4764,8 @@ procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rwflag,
static int static int
procfs_can_use_hw_breakpoint (struct target_ops *self, procfs_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type,
int cnt, int othertype)
{ {
/* Due to the way that proc_set_watchpoint() is implemented, host /* Due to the way that proc_set_watchpoint() is implemented, host
and target pointers must be of the same size. If they are not, and target pointers must be of the same size. If they are not,
@ -4828,7 +4829,8 @@ procfs_stopped_data_address (struct target_ops *targ, CORE_ADDR *addr)
static int static int
procfs_insert_watchpoint (struct target_ops *self, procfs_insert_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
if (!target_have_steppable_watchpoint if (!target_have_steppable_watchpoint
@ -4851,7 +4853,8 @@ procfs_insert_watchpoint (struct target_ops *self,
static int static int
procfs_remove_watchpoint (struct target_ops *self, procfs_remove_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len,
enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0); return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0);

View file

@ -1318,7 +1318,7 @@ recursively_search_psymtabs (struct partial_symtab *ps,
struct partial_symbol **psym; struct partial_symbol **psym;
struct partial_symbol **bound, **gbound, **sbound; struct partial_symbol **bound, **gbound, **sbound;
int keep_going = 1; int keep_going = 1;
int result = PST_SEARCHED_AND_NOT_FOUND; enum psymtab_search_status result = PST_SEARCHED_AND_NOT_FOUND;
int i; int i;
if (ps->searched_flag != PST_NOT_SEARCHED) if (ps->searched_flag != PST_NOT_SEARCHED)

View file

@ -1424,7 +1424,8 @@ m32r_stop (struct target_ops *self, ptid_t ptid)
static int static int
m32r_can_use_hw_watchpoint (struct target_ops *self, m32r_can_use_hw_watchpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type,
int cnt, int othertype)
{ {
return sdi_desc != NULL && cnt < max_access_breaks; return sdi_desc != NULL && cnt < max_access_breaks;
} }
@ -1435,7 +1436,7 @@ m32r_can_use_hw_watchpoint (struct target_ops *self,
static int static int
m32r_insert_watchpoint (struct target_ops *self, m32r_insert_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len, enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
int i; int i;

View file

@ -2402,7 +2402,7 @@ mips_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
static int static int
mips_can_use_watchpoint (struct target_ops *self, mips_can_use_watchpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type, int cnt, int othertype)
{ {
return cnt < MAX_LSI_BREAKPOINTS && strcmp (target_shortname, "lsi") == 0; return cnt < MAX_LSI_BREAKPOINTS && strcmp (target_shortname, "lsi") == 0;
} }
@ -2437,10 +2437,13 @@ calculate_mask (CORE_ADDR addr, int len)
static int static int
mips_insert_watchpoint (struct target_ops *self, mips_insert_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len, enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
if (mips_set_breakpoint (addr, len, type)) /* These enum types are compatible by design. */
enum break_type btype = (enum break_type) type;
if (mips_set_breakpoint (addr, len, btype))
return -1; return -1;
return 0; return 0;
@ -2450,10 +2453,13 @@ mips_insert_watchpoint (struct target_ops *self,
static int static int
mips_remove_watchpoint (struct target_ops *self, mips_remove_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len, enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
if (mips_clear_breakpoint (addr, len, type)) /* These enum types are compatible by design. */
enum break_type btype = (enum break_type) type;
if (mips_clear_breakpoint (addr, len, btype))
return -1; return -1;
return 0; return 0;

View file

@ -8706,7 +8706,7 @@ remote_remove_breakpoint (struct target_ops *ops,
return memory_remove_breakpoint (ops, gdbarch, bp_tgt); return memory_remove_breakpoint (ops, gdbarch, bp_tgt);
} }
static int static enum Z_packet_type
watchpoint_to_Z_packet (int type) watchpoint_to_Z_packet (int type)
{ {
switch (type) switch (type)
@ -8727,9 +8727,8 @@ watchpoint_to_Z_packet (int type)
} }
static int static int
remote_insert_watchpoint (struct target_ops *self, remote_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
CORE_ADDR addr, int len, int type, enum target_hw_bp_type type, struct expression *cond)
struct expression *cond)
{ {
struct remote_state *rs = get_remote_state (); struct remote_state *rs = get_remote_state ();
char *endbuf = rs->buf + get_remote_packet_size (); char *endbuf = rs->buf + get_remote_packet_size ();
@ -8777,9 +8776,8 @@ remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
static int static int
remote_remove_watchpoint (struct target_ops *self, remote_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
CORE_ADDR addr, int len, int type, enum target_hw_bp_type type, struct expression *cond)
struct expression *cond)
{ {
struct remote_state *rs = get_remote_state (); struct remote_state *rs = get_remote_state ();
char *endbuf = rs->buf + get_remote_packet_size (); char *endbuf = rs->buf + get_remote_packet_size ();
@ -8835,7 +8833,7 @@ remote_region_ok_for_hw_watchpoint (struct target_ops *self,
static int static int
remote_check_watch_resources (struct target_ops *self, remote_check_watch_resources (struct target_ops *self,
int type, int cnt, int ot) enum bptype type, int cnt, int ot)
{ {
if (type == bp_hardware_breakpoint) if (type == bp_hardware_breakpoint)
{ {

View file

@ -554,7 +554,7 @@ s390_new_thread (struct lwp_info *lp)
static int static int
s390_insert_watchpoint (struct target_ops *self, s390_insert_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len, enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
struct lwp_info *lp; struct lwp_info *lp;
@ -576,7 +576,7 @@ s390_insert_watchpoint (struct target_ops *self,
static int static int
s390_remove_watchpoint (struct target_ops *self, s390_remove_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len, int type, CORE_ADDR addr, int len, enum target_hw_bp_type type,
struct expression *cond) struct expression *cond)
{ {
struct lwp_info *lp; struct lwp_info *lp;
@ -605,7 +605,7 @@ s390_remove_watchpoint (struct target_ops *self,
static int static int
s390_can_use_hw_breakpoint (struct target_ops *self, s390_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type, int cnt, int othertype)
{ {
return type == bp_hardware_watchpoint; return type == bp_hardware_watchpoint;
} }

View file

@ -2979,7 +2979,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
struct tdesc_arch_data *tdesc_data = NULL; struct tdesc_arch_data *tdesc_data = NULL;
struct gdbarch *gdbarch; struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep; struct gdbarch_tdep *tdep;
int tdep_abi; enum s390_abi_kind tdep_abi;
enum s390_vector_abi_kind vector_abi; enum s390_vector_abi_kind vector_abi;
int have_upper = 0; int have_upper = 0;
int have_linux_v1 = 0; int have_linux_v1 = 0;

View file

@ -625,7 +625,7 @@ spu_xfer_partial (struct target_ops *ops,
/* Override the to_can_use_hw_breakpoint routine. */ /* Override the to_can_use_hw_breakpoint routine. */
static int static int
spu_can_use_hw_breakpoint (struct target_ops *self, spu_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type, int cnt, int othertype)
{ {
return 0; return 0;
} }

View file

@ -152,6 +152,10 @@
target_debug_do_print (host_address_to_string (X)) target_debug_do_print (host_address_to_string (X))
#define target_debug_print_const_struct_btrace_target_info_p(X) \ #define target_debug_print_const_struct_btrace_target_info_p(X) \
target_debug_do_print (host_address_to_string (X)) target_debug_do_print (host_address_to_string (X))
#define target_debug_print_enum_target_hw_bp_type(X) \
target_debug_do_print (plongest (X))
#define target_debug_print_enum_bptype(X) \
target_debug_do_print (plongest (X))
static void static void
target_debug_print_struct_target_waitstatus_p (struct target_waitstatus *status) target_debug_print_struct_target_waitstatus_p (struct target_waitstatus *status)

View file

@ -401,20 +401,20 @@ debug_supports_stopped_by_hw_breakpoint (struct target_ops *self)
} }
static int static int
delegate_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int arg3) delegate_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
{ {
self = self->beneath; self = self->beneath;
return self->to_can_use_hw_breakpoint (self, arg1, arg2, arg3); return self->to_can_use_hw_breakpoint (self, arg1, arg2, arg3);
} }
static int static int
tdefault_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int arg3) tdefault_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
{ {
return 0; return 0;
} }
static int static int
debug_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int arg3) debug_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
{ {
int result; int result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_use_hw_breakpoint (...)\n", debug_target.to_shortname); fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_use_hw_breakpoint (...)\n", debug_target.to_shortname);
@ -422,7 +422,7 @@ debug_can_use_hw_breakpoint (struct target_ops *self, int arg1, int arg2, int ar
fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_use_hw_breakpoint (", debug_target.to_shortname); fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_use_hw_breakpoint (", debug_target.to_shortname);
target_debug_print_struct_target_ops_p (&debug_target); target_debug_print_struct_target_ops_p (&debug_target);
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_int (arg1); target_debug_print_enum_bptype (arg1);
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_int (arg2); target_debug_print_int (arg2);
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
@ -523,20 +523,20 @@ debug_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struc
} }
static int static int
delegate_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) delegate_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
{ {
self = self->beneath; self = self->beneath;
return self->to_remove_watchpoint (self, arg1, arg2, arg3, arg4); return self->to_remove_watchpoint (self, arg1, arg2, arg3, arg4);
} }
static int static int
tdefault_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) tdefault_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
{ {
return -1; return -1;
} }
static int static int
debug_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) debug_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
{ {
int result; int result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_watchpoint (...)\n", debug_target.to_shortname); fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_watchpoint (...)\n", debug_target.to_shortname);
@ -548,7 +548,7 @@ debug_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_int (arg2); target_debug_print_int (arg2);
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_int (arg3); target_debug_print_enum_target_hw_bp_type (arg3);
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_struct_expression_p (arg4); target_debug_print_struct_expression_p (arg4);
fputs_unfiltered (") = ", gdb_stdlog); fputs_unfiltered (") = ", gdb_stdlog);
@ -558,20 +558,20 @@ debug_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int
} }
static int static int
delegate_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) delegate_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
{ {
self = self->beneath; self = self->beneath;
return self->to_insert_watchpoint (self, arg1, arg2, arg3, arg4); return self->to_insert_watchpoint (self, arg1, arg2, arg3, arg4);
} }
static int static int
tdefault_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) tdefault_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
{ {
return -1; return -1;
} }
static int static int
debug_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4) debug_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
{ {
int result; int result;
fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_watchpoint (...)\n", debug_target.to_shortname); fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_watchpoint (...)\n", debug_target.to_shortname);
@ -583,7 +583,7 @@ debug_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, int
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_int (arg2); target_debug_print_int (arg2);
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_int (arg3); target_debug_print_enum_target_hw_bp_type (arg3);
fputs_unfiltered (", ", gdb_stdlog); fputs_unfiltered (", ", gdb_stdlog);
target_debug_print_struct_expression_p (arg4); target_debug_print_struct_expression_p (arg4);
fputs_unfiltered (") = ", gdb_stdlog); fputs_unfiltered (") = ", gdb_stdlog);

View file

@ -41,6 +41,7 @@ struct dcache_struct;
struct inferior; struct inferior;
#include "infrun.h" /* For enum exec_direction_kind. */ #include "infrun.h" /* For enum exec_direction_kind. */
#include "breakpoint.h" /* For enum bptype. */
/* This include file defines the interface between the main part /* This include file defines the interface between the main part
of the debugger, and the part which is target-specific, or of the debugger, and the part which is target-specific, or
@ -73,6 +74,8 @@ struct inferior;
#include "btrace.h" #include "btrace.h"
#include "command.h" #include "command.h"
#include "break-common.h" /* For enum target_hw_bp_type. */
enum strata enum strata
{ {
dummy_stratum, /* The lowest of the low */ dummy_stratum, /* The lowest of the low */
@ -513,7 +516,8 @@ struct target_ops
int (*to_supports_stopped_by_hw_breakpoint) (struct target_ops *) int (*to_supports_stopped_by_hw_breakpoint) (struct target_ops *)
TARGET_DEFAULT_RETURN (0); TARGET_DEFAULT_RETURN (0);
int (*to_can_use_hw_breakpoint) (struct target_ops *, int, int, int) int (*to_can_use_hw_breakpoint) (struct target_ops *,
enum bptype, int, int)
TARGET_DEFAULT_RETURN (0); TARGET_DEFAULT_RETURN (0);
int (*to_ranged_break_num_registers) (struct target_ops *) int (*to_ranged_break_num_registers) (struct target_ops *)
TARGET_DEFAULT_RETURN (-1); TARGET_DEFAULT_RETURN (-1);
@ -526,11 +530,11 @@ struct target_ops
/* Documentation of what the two routines below are expected to do is /* Documentation of what the two routines below are expected to do is
provided with the corresponding target_* macros. */ provided with the corresponding target_* macros. */
int (*to_remove_watchpoint) (struct target_ops *, int (*to_remove_watchpoint) (struct target_ops *, CORE_ADDR, int,
CORE_ADDR, int, int, struct expression *) enum target_hw_bp_type, struct expression *)
TARGET_DEFAULT_RETURN (-1); TARGET_DEFAULT_RETURN (-1);
int (*to_insert_watchpoint) (struct target_ops *, int (*to_insert_watchpoint) (struct target_ops *, CORE_ADDR, int,
CORE_ADDR, int, int, struct expression *) enum target_hw_bp_type, struct expression *)
TARGET_DEFAULT_RETURN (-1); TARGET_DEFAULT_RETURN (-1);
int (*to_insert_mask_watchpoint) (struct target_ops *, int (*to_insert_mask_watchpoint) (struct target_ops *,

View file

@ -437,7 +437,7 @@ tilegx_analyze_prologue (struct gdbarch* gdbarch,
status = safe_frame_unwind_memory (next_frame, instbuf_start, status = safe_frame_unwind_memory (next_frame, instbuf_start,
instbuf, instbuf_size); instbuf, instbuf_size);
if (status == 0) if (status == 0)
memory_error (status, next_addr); memory_error (TARGET_XFER_E_IO, next_addr);
} }
reverse_frame_valid = 0; reverse_frame_valid = 0;

View file

@ -31,7 +31,7 @@ struct ui_out_hdr
{ {
int colno; int colno;
int width; int width;
int alignment; enum ui_align alignment;
char *col_name; char *col_name;
char *colhdr; char *colhdr;
struct ui_out_hdr *next; struct ui_out_hdr *next;
@ -269,14 +269,14 @@ static void uo_data_destroy (struct ui_out *uiout);
extern void _initialize_ui_out (void); extern void _initialize_ui_out (void);
static void append_header_to_list (struct ui_out *uiout, int width, 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); const char *colhdr);
static int get_next_header (struct ui_out *uiout, int *colno, int *width, 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_header_list (struct ui_out *uiout);
static void clear_table (struct ui_out *uiout); static void clear_table (struct ui_out *uiout);
static void verify_field (struct ui_out *uiout, int *fldno, int *width, static void verify_field (struct ui_out *uiout, int *fldno, int *width,
int *align); enum ui_align *align);
/* exported functions (ui_out API) */ /* exported functions (ui_out API) */
@ -395,7 +395,7 @@ specified after table_body."));
{ {
int fldno; int fldno;
int width; int width;
int align; enum ui_align align;
verify_field (uiout, &fldno, &width, &align); verify_field (uiout, &fldno, &width, &align);
} }
@ -470,7 +470,7 @@ ui_out_field_int (struct ui_out *uiout,
{ {
int fldno; int fldno;
int width; int width;
int align; enum ui_align align;
verify_field (uiout, &fldno, &width, &align); verify_field (uiout, &fldno, &width, &align);
@ -486,7 +486,7 @@ ui_out_field_fmt_int (struct ui_out *uiout,
{ {
int fldno; int fldno;
int width; int width;
int align; enum ui_align align;
verify_field (uiout, &fldno, &width, &align); verify_field (uiout, &fldno, &width, &align);
@ -530,7 +530,7 @@ ui_out_field_skip (struct ui_out *uiout,
{ {
int fldno; int fldno;
int width; int width;
int align; enum ui_align align;
verify_field (uiout, &fldno, &width, &align); verify_field (uiout, &fldno, &width, &align);
@ -544,7 +544,7 @@ ui_out_field_string (struct ui_out *uiout,
{ {
int fldno; int fldno;
int width; int width;
int align; enum ui_align align;
verify_field (uiout, &fldno, &width, &align); verify_field (uiout, &fldno, &width, &align);
@ -560,7 +560,7 @@ ui_out_field_fmt (struct ui_out *uiout,
va_list args; va_list args;
int fldno; int fldno;
int width; int width;
int align; enum ui_align align;
/* Will not align, but has to call anyway. */ /* Will not align, but has to call anyway. */
verify_field (uiout, &fldno, &width, &align); verify_field (uiout, &fldno, &width, &align);
@ -956,7 +956,7 @@ clear_header_list (struct ui_out *uiout)
static void static void
append_header_to_list (struct ui_out *uiout, append_header_to_list (struct ui_out *uiout,
int width, int width,
int alignment, enum ui_align alignment,
const char *col_name, const char *col_name,
const char *colhdr) const char *colhdr)
{ {
@ -1002,7 +1002,7 @@ static int
get_next_header (struct ui_out *uiout, get_next_header (struct ui_out *uiout,
int *colno, int *colno,
int *width, int *width,
int *alignment, enum ui_align *alignment,
char **colhdr) char **colhdr)
{ {
/* There may be no headers at all or we may have used all columns. */ /* 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). */ available/applicable). */
static void 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); struct ui_out_level *current = current_level (uiout);
char *text; char *text;

View file

@ -2123,7 +2123,7 @@ new_variable (void)
var->num_children = -1; var->num_children = -1;
var->parent = NULL; var->parent = NULL;
var->children = NULL; var->children = NULL;
var->format = 0; var->format = FORMAT_NATURAL;
var->root = NULL; var->root = NULL;
var->updated = 0; var->updated = 0;
var->print_value = NULL; var->print_value = NULL;

View file

@ -149,9 +149,8 @@ x86_cleanup_dregs (void)
of the type TYPE. Return 0 on success, -1 on failure. */ of the type TYPE. Return 0 on success, -1 on failure. */
static int static int
x86_insert_watchpoint (struct target_ops *self, x86_insert_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
CORE_ADDR addr, int len, int type, enum target_hw_bp_type type, struct expression *cond)
struct expression *cond)
{ {
struct x86_debug_reg_state *state struct x86_debug_reg_state *state
= x86_debug_reg_state (ptid_get_pid (inferior_ptid)); = x86_debug_reg_state (ptid_get_pid (inferior_ptid));
@ -163,9 +162,8 @@ x86_insert_watchpoint (struct target_ops *self,
address ADDR, whose length is LEN bytes, and for accesses of the address ADDR, whose length is LEN bytes, and for accesses of the
type TYPE. Return 0 on success, -1 on failure. */ type TYPE. Return 0 on success, -1 on failure. */
static int static int
x86_remove_watchpoint (struct target_ops *self, x86_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
CORE_ADDR addr, int len, int type, enum target_hw_bp_type type, struct expression *cond)
struct expression *cond)
{ {
struct x86_debug_reg_state *state struct x86_debug_reg_state *state
= x86_debug_reg_state (ptid_get_pid (inferior_ptid)); = x86_debug_reg_state (ptid_get_pid (inferior_ptid));
@ -259,7 +257,7 @@ x86_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
static int static int
x86_can_use_hw_breakpoint (struct target_ops *self, x86_can_use_hw_breakpoint (struct target_ops *self,
int type, int cnt, int othertype) enum bptype type, int cnt, int othertype)
{ {
return 1; return 1;
} }

View file

@ -246,7 +246,7 @@ struct gdbarch_tdep
.spill_location = -1, \ .spill_location = -1, \
.spill_size = (spillsz), \ .spill_size = (spillsz), \
.unused = 0, \ .unused = 0, \
.call_abi = 0, \ .call_abi = CallAbiDefault, \
.debug_interrupt_level = XCHAL_DEBUGLEVEL, \ .debug_interrupt_level = XCHAL_DEBUGLEVEL, \
.icache_line_bytes = XCHAL_ICACHE_LINESIZE, \ .icache_line_bytes = XCHAL_ICACHE_LINESIZE, \
.dcache_line_bytes = XCHAL_DCACHE_LINESIZE, \ .dcache_line_bytes = XCHAL_DCACHE_LINESIZE, \