* Re: [RFA] enum enable [not found] ` <3B4E41B5.64FB@redhat.com> @ 2001-07-14 4:08 ` Eli Zaretskii 2001-07-16 14:52 ` Jim Blandy ` (2 more replies) 0 siblings, 3 replies; 21+ messages in thread From: Eli Zaretskii @ 2001-07-14 4:08 UTC (permalink / raw) To: msnyder; +Cc: gdb-patches, ac131313 > Date: Thu, 12 Jul 2001 17:32:53 -0700 > From: Michael Snyder <msnyder@redhat.com> > > Eli Zaretskii wrote: > > > > Is it possible to rename the enum to something less general, such as > > `enum bp_enable'? > > It's been discussed before, and I think the consensus > was that it is a good idea. I'm certainly open to it. Here's what I came up with. This includes changes to TUI files, since they used the affected members of struct breakpoint. Please review. 2001-07-14 Eli Zaretskii <eliz@is.elta.co.il> The following changes avoid polluting global namespace with the `enable' and `disable' identifiers, because some platforms define in their system headers symbols with global scope that go by those names. * breakpoint.h (enum enable_state): Rename from `enum enable'. Also rename all the enum members to have the "bp_" prefix. (struct breakpoint): Rename the `enable' member to `enable_state'. (enum bpdisp): Rename all members to have the "disp_" prefix. * breakpoint.c: All users of `enum enable' and `enum bpdisp' changed. (args_for_catchpoint_enable): Rename the `enable' member to `enable_p'. All users changed. * tracepoint.h (enum enable): Remove. (struct tracepoint): The member `enabled' is now `int enabled_p'. * tracepoint.c: All users of the `enabled' member changed. * printcmd.c (struct display): The `status' member is now an int. * memattr.h (struct mem_region): Rename the `status' member to `enabled_p'. (enum enable): Remove. * memattr.c: Change all users of the `status' member of struct mem_region to use `enabled_p' instead. * infcmd.c (run_stack_dummy): Use disp_del instead of del. * go32-nat.c: Remove the kludgey work-around for conflicts between <dos.h> and "breakpoint.h". --- gdb/breakpoint.h~0 Sun May 6 04:35:56 2001 +++ gdb/breakpoint.h Sat Jul 14 13:09:40 2001 @@ -133,21 +133,21 @@ /* States of enablement of breakpoint. */ -enum enable +enum enable_state { - disabled, /* The eventpoint is inactive, and cannot trigger. */ - enabled, /* The eventpoint is active, and can trigger. */ - shlib_disabled, /* The eventpoint's address is in an unloaded solib. + bp_disabled, /* The eventpoint is inactive, and cannot trigger. */ + bp_enabled, /* The eventpoint is active, and can trigger. */ + bp_shlib_disabled, /* The eventpoint's address is in an unloaded solib. The eventpoint will be automatically enabled and reset when that solib is loaded. */ - call_disabled, /* The eventpoint has been disabled while a call + bp_call_disabled, /* The eventpoint has been disabled while a call into the inferior is "in flight", because some eventpoints interfere with the implementation of a call on some targets. The eventpoint will be automatically enabled and reset when the call "lands" (either completes, or stops at another eventpoint). */ - permanent /* There is a breakpoint instruction hard-wired into + bp_permanent /* There is a breakpoint instruction hard-wired into the target's code. Don't try to write another breakpoint instruction on top of it, or restore its value. Step over it using the architecture's @@ -159,10 +159,10 @@ enum bpdisp { - del, /* Delete it */ - del_at_next_stop, /* Delete at next stop, whether hit or not */ - disable, /* Disable it */ - donttouch /* Leave it alone */ + disp_del, /* Delete it */ + disp_del_at_next_stop, /* Delete at next stop, whether hit or not */ + disp_disable, /* Disable it */ + disp_donttouch /* Leave it alone */ }; enum target_hw_bp_type @@ -187,7 +187,7 @@ /* Type of breakpoint. */ enum bptype type; /* Zero means disabled; remember the info but don't break here. */ - enum enable enable; + enum enable_state enable_state; /* What to do with this breakpoint after we hit it. */ enum bpdisp disposition; /* Number assigned to distinguish breakpoints. */ --- gdb/breakpoint.c~0 Wed May 23 03:52:44 2001 +++ gdb/breakpoint.c Sat Jul 14 13:21:16 2001 @@ -135,7 +135,7 @@ static enum print_stop_action print_bp_s typedef struct { enum exception_event_kind kind; - int enable; + int enable_p; } args_for_catchpoint_enable; @@ -721,7 +721,7 @@ insert_breakpoints (void) ALL_BREAKPOINTS_SAFE (b, temp) { - if (b->enable == permanent) + if (b->enable_state == bp_permanent) /* Permanent breakpoints cannot be inserted or removed. */ continue; else if (b->type != bp_watchpoint @@ -733,9 +733,9 @@ insert_breakpoints (void) && b->type != bp_catch_exec && b->type != bp_catch_throw && b->type != bp_catch_catch - && b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + && b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && !b->inserted && !b->duplicate) { @@ -774,7 +774,7 @@ insert_breakpoints (void) { /* See also: disable_breakpoints_in_shlibs. */ val = 0; - b->enable = shlib_disabled; + b->enable_state = bp_shlib_disabled; if (!disabled_breaks) { target_terminal_ours_for_output (); @@ -802,9 +802,9 @@ insert_breakpoints (void) return_val = val; /* remember failure */ } else if (ep_is_exception_catchpoint (b) - && b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + && b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && !b->inserted && !b->duplicate) @@ -822,7 +822,7 @@ insert_breakpoints (void) target_terminal_ours_for_output (); warning ("Cannot insert catchpoint %d; disabling it.", b->number); - b->enable = disabled; + b->enable_state = bp_disabled; } else { @@ -831,7 +831,7 @@ insert_breakpoints (void) args_for_catchpoint_enable args; args.kind = b->type == bp_catch_catch ? EX_EVENT_CATCH : EX_EVENT_THROW; - args.enable = 1; + args.enable_p = 1; val = catch_errors (cover_target_enable_exception_callback, &args, message, RETURN_MASK_ALL); @@ -846,7 +846,7 @@ insert_breakpoints (void) target_terminal_ours_for_output (); warning ("Cannot insert catchpoint %d; disabling it.", b->number); - b->enable = disabled; + b->enable_state = bp_disabled; } } @@ -857,8 +857,8 @@ insert_breakpoints (void) else if ((b->type == bp_hardware_watchpoint || b->type == bp_read_watchpoint || b->type == bp_access_watchpoint) - && b->enable == enabled - && b->disposition != del_at_next_stop + && b->enable_state == bp_enabled + && b->disposition != disp_del_at_next_stop && !b->inserted && !b->duplicate) { @@ -965,8 +965,8 @@ insert_breakpoints (void) printf_filtered ("because the program has left the block \n"); printf_filtered ("in which its expression is valid.\n"); if (b->related_breakpoint) - b->related_breakpoint->disposition = del_at_next_stop; - b->disposition = del_at_next_stop; + b->related_breakpoint->disposition = disp_del_at_next_stop; + b->disposition = disp_del_at_next_stop; } /* Restore the frame and level. */ @@ -980,7 +980,7 @@ insert_breakpoints (void) else if ((b->type == bp_catch_fork || b->type == bp_catch_vfork || b->type == bp_catch_exec) - && b->enable == enabled + && b->enable_state == bp_enabled && !b->inserted && !b->duplicate) { @@ -1249,7 +1249,7 @@ remove_breakpoint (struct breakpoint *b, { int val; - if (b->enable == permanent) + if (b->enable_state == bp_permanent) /* Permanent breakpoints cannot be inserted or removed. */ return 0; @@ -1301,7 +1301,7 @@ remove_breakpoint (struct breakpoint *b, else if ((b->type == bp_hardware_watchpoint || b->type == bp_read_watchpoint || b->type == bp_access_watchpoint) - && b->enable == enabled + && b->enable_state == bp_enabled && !b->duplicate) { value_ptr v, n; @@ -1356,7 +1356,7 @@ remove_breakpoint (struct breakpoint *b, else if ((b->type == bp_catch_fork || b->type == bp_catch_vfork || b->type == bp_catch_exec) - && b->enable == enabled + && b->enable_state == bp_enabled && !b->duplicate) { val = -1; @@ -1381,7 +1381,7 @@ remove_breakpoint (struct breakpoint *b, } else if ((b->type == bp_catch_catch || b->type == bp_catch_throw) - && b->enable == enabled + && b->enable_state == bp_enabled && !b->duplicate) { @@ -1392,7 +1392,7 @@ remove_breakpoint (struct breakpoint *b, } else if (ep_is_exception_catchpoint (b) && b->inserted /* sometimes previous insert doesn't happen */ - && b->enable == enabled + && b->enable_state == bp_enabled && !b->duplicate) { @@ -1503,15 +1503,15 @@ breakpoint_here_p (CORE_ADDR pc) int any_breakpoint_here = 0; ALL_BREAKPOINTS (b) - if ((b->enable == enabled - || b->enable == permanent) + if ((b->enable_state == bp_enabled + || b->enable_state == bp_permanent) && b->address == pc) /* bp is enabled and matches pc */ { if (overlay_debugging && section_is_overlay (b->section) && !section_is_mapped (b->section)) continue; /* unmapped overlay -- can't be a match */ - else if (b->enable == permanent) + else if (b->enable_state == bp_permanent) return permanent_breakpoint_here; else any_breakpoint_here = 1; @@ -1589,9 +1589,9 @@ breakpoint_thread_match (CORE_ADDR pc, p thread = pid_to_thread_id (ptid); ALL_BREAKPOINTS (b) - if (b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + if (b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && b->address == pc && (b->thread == -1 || b->thread == thread)) { @@ -2360,8 +2360,8 @@ which its expression is valid.\n", bs->b #endif if (b->related_breakpoint) - b->related_breakpoint->disposition = del_at_next_stop; - b->disposition = del_at_next_stop; + b->related_breakpoint->disposition = disp_del_at_next_stop; + b->disposition = disp_del_at_next_stop; return WP_DELETED; } @@ -2408,9 +2408,9 @@ bpstat_stop_status (CORE_ADDR *pc, int n ALL_BREAKPOINTS_SAFE (b, temp) { - if (b->enable == disabled - || b->enable == shlib_disabled - || b->enable == call_disabled) + if (b->enable_state == bp_disabled + || b->enable_state == bp_shlib_disabled + || b->enable_state == bp_call_disabled) continue; if (b->type != bp_watchpoint @@ -2517,8 +2517,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n /* Error from catch_errors. */ printf_filtered ("Watchpoint %d deleted.\n", b->number); if (b->related_breakpoint) - b->related_breakpoint->disposition = del_at_next_stop; - b->disposition = del_at_next_stop; + b->related_breakpoint->disposition = disp_del_at_next_stop; + b->disposition = disp_del_at_next_stop; /* We've already printed what needs to be printed. */ bs->print_it = print_it_done; @@ -2589,8 +2589,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n /* Error from catch_errors. */ printf_filtered ("Watchpoint %d deleted.\n", b->number); if (b->related_breakpoint) - b->related_breakpoint->disposition = del_at_next_stop; - b->disposition = del_at_next_stop; + b->related_breakpoint->disposition = disp_del_at_next_stop; + b->disposition = disp_del_at_next_stop; /* We've already printed what needs to be printed. */ bs->print_it = print_it_done; break; @@ -2649,8 +2649,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n else { /* We will stop here */ - if (b->disposition == disable) - b->enable = disabled; + if (b->disposition == disp_disable) + b->enable_state = bp_disabled; bs->commands = b->commands; if (b->silent) bs->print = 0; @@ -2991,7 +2991,7 @@ bpstat_should_step (void) { struct breakpoint *b; ALL_BREAKPOINTS (b) - if (b->enable == enabled && b->type == bp_watchpoint) + if (b->enable_state == bp_enabled && b->type == bp_watchpoint) return 1; return 0; } @@ -3002,7 +3002,7 @@ bpstat_have_active_hw_watchpoints (void) { struct breakpoint *b; ALL_BREAKPOINTS (b) - if ((b->enable == enabled) && + if ((b->enable_state == bp_enabled) && (b->inserted) && ((b->type == bp_hardware_watchpoint) || (b->type == bp_read_watchpoint) || @@ -3161,10 +3161,10 @@ print_one_breakpoint (struct breakpoint /* 4 */ annotate_field (3); #ifdef UI_OUT - ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int) b->enable]); + ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int) b->enable_state]); ui_out_spaces (uiout, 2); #else - printf_filtered ("%-3c ", bpenables[(int) b->enable]); + printf_filtered ("%-3c ", bpenables[(int) b->enable_state]); #endif /* 5 and 6 */ @@ -3708,10 +3708,10 @@ describe_other_breakpoints (CORE_ADDR pc others--; printf_filtered ("%d%s%s ", b->number, - ((b->enable == disabled || - b->enable == shlib_disabled || - b->enable == call_disabled) ? " (disabled)" - : b->enable == permanent ? " (permanent)" + ((b->enable_state == bp_disabled || + b->enable_state == bp_shlib_disabled || + b->enable_state == bp_call_disabled) ? " (disabled)" + : b->enable_state == bp_permanent ? " (permanent)" : ""), (others > 1) ? "," : ((others == 1) ? " and" : "")); @@ -3788,15 +3788,15 @@ check_duplicates (struct breakpoint *bpt return; ALL_BREAKPOINTS (b) - if (b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + if (b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && b->address == address && (overlay_debugging == 0 || b->section == section) && breakpoint_address_is_meaningful (b)) { /* Have we found a permanent breakpoint? */ - if (b->enable == permanent) + if (b->enable_state == bp_permanent) { perm_bp = b; break; @@ -3827,9 +3827,9 @@ check_duplicates (struct breakpoint *bpt "another breakpoint was inserted on top of " "a permanent breakpoint"); - if (b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + if (b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && b->address == address && (overlay_debugging == 0 || b->section == section) && breakpoint_address_is_meaningful (b)) @@ -3872,7 +3872,7 @@ set_raw_breakpoint (struct symtab_and_li b->input_radix = input_radix; b->thread = -1; b->line_number = sal.line; - b->enable = enabled; + b->enable_state = bp_enabled; b->next = 0; b->silent = 0; b->ignore_count = 0; @@ -3909,7 +3909,7 @@ set_raw_breakpoint (struct symtab_and_li void make_breakpoint_permanent (struct breakpoint *b) { - b->enable = permanent; + b->enable_state = bp_permanent; /* By definition, permanent breakpoints are already present in the code. */ b->inserted = 1; @@ -3939,8 +3939,8 @@ create_longjmp_breakpoint (char *func_na b = set_raw_breakpoint (sal, func_name != NULL ? bp_longjmp : bp_longjmp_resume); - b->disposition = donttouch; - b->enable = disabled; + b->disposition = disp_donttouch; + b->enable_state = bp_disabled; b->silent = 1; if (func_name) b->addr_string = xstrdup (func_name); @@ -3961,7 +3961,7 @@ enable_longjmp_breakpoint (void) ALL_BREAKPOINTS (b) if (b->type == bp_longjmp) { - b->enable = enabled; + b->enable_state = bp_enabled; check_duplicates (b); } } @@ -3975,7 +3975,7 @@ disable_longjmp_breakpoint (void) if (b->type == bp_longjmp || b->type == bp_longjmp_resume) { - b->enable = disabled; + b->enable_state = bp_disabled; check_duplicates (b); } } @@ -3993,8 +3993,8 @@ create_thread_event_breakpoint (CORE_ADD b = set_raw_breakpoint (sal, bp_thread_event); b->number = internal_breakpoint_number--; - b->disposition = donttouch; - b->enable = enabled; + b->disposition = disp_donttouch; + b->enable_state = bp_enabled; /* addr_string has to be used or breakpoint_re_set will delete me. */ sprintf (addr_string, "*0x%s", paddr (b->address)); b->addr_string = xstrdup (addr_string); @@ -4034,7 +4034,7 @@ create_solib_event_breakpoint (CORE_ADDR sal.section = find_pc_overlay (sal.pc); b = set_raw_breakpoint (sal, bp_shlib_event); b->number = internal_breakpoint_number--; - b->disposition = donttouch; + b->disposition = disp_donttouch; return b; } @@ -4054,11 +4054,11 @@ disable_breakpoints_in_shlibs (int silen #if defined (PC_SOLIB) if (((b->type == bp_breakpoint) || (b->type == bp_hardware_breakpoint)) && - b->enable == enabled && + b->enable_state == bp_enabled && !b->duplicate && PC_SOLIB (b->address)) { - b->enable = shlib_disabled; + b->enable_state = bp_shlib_disabled; if (!silent) { if (!disabled_shlib_breaks) @@ -4081,14 +4081,14 @@ re_enable_breakpoints_in_shlibs (void) struct breakpoint *b; ALL_BREAKPOINTS (b) - if (b->enable == shlib_disabled) + if (b->enable_state == bp_shlib_disabled) { char buf[1]; /* Do not reenable the breakpoint if the shared library is still not mapped in. */ if (target_read_memory (b->address, buf, 1) == 0) - b->enable = enabled; + b->enable_state = bp_enabled; } } @@ -4155,8 +4155,8 @@ solib_load_unload_1 (char *hookname, int else if (addr_start) b->addr_string = savestring (addr_start, addr_end - addr_start); - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; if (dll_pathname == NULL) b->dll_pathname = NULL; @@ -4207,8 +4207,8 @@ create_fork_vfork_event_catchpoint (int NULL : savestring (cond_string, strlen (cond_string)); b->thread = thread; b->addr_string = NULL; - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; b->forked_inferior_pid = 0; mention (b); @@ -4246,8 +4246,8 @@ create_exec_event_catchpoint (int tempfl NULL : savestring (cond_string, strlen (cond_string)); b->thread = thread; b->addr_string = NULL; - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; mention (b); } @@ -4260,7 +4260,7 @@ hw_breakpoint_used_count (void) ALL_BREAKPOINTS (b) { - if (b->type == bp_hardware_breakpoint && b->enable == enabled) + if (b->type == bp_hardware_breakpoint && b->enable_state == bp_enabled) i++; } @@ -4276,14 +4276,14 @@ hw_watchpoint_used_count (enum bptype ty *other_type_used = 0; ALL_BREAKPOINTS (b) { - if (b->enable == enabled) + if (b->enable_state == bp_enabled) { if (b->type == type) i++; else if ((b->type == bp_hardware_watchpoint || b->type == bp_read_watchpoint || b->type == bp_access_watchpoint) - && b->enable == enabled) + && b->enable_state == bp_enabled) *other_type_used = 1; } } @@ -4305,7 +4305,7 @@ set_longjmp_resume_breakpoint (CORE_ADDR if (b->type == bp_longjmp_resume) { b->address = pc; - b->enable = enabled; + b->enable_state = bp_enabled; if (frame != NULL) b->frame = frame->frame; else @@ -4327,9 +4327,9 @@ disable_watchpoints_before_interactive_c || (b->type == bp_read_watchpoint) || (b->type == bp_access_watchpoint) || ep_is_exception_catchpoint (b)) - && (b->enable == enabled)) + && (b->enable_state == bp_enabled)) { - b->enable = call_disabled; + b->enable_state = bp_call_disabled; check_duplicates (b); } } @@ -4347,9 +4347,9 @@ enable_watchpoints_after_interactive_cal || (b->type == bp_read_watchpoint) || (b->type == bp_access_watchpoint) || ep_is_exception_catchpoint (b)) - && (b->enable == call_disabled)) + && (b->enable_state == bp_call_disabled)) { - b->enable = enabled; + b->enable_state = bp_enabled; check_duplicates (b); } } @@ -4366,8 +4366,8 @@ set_momentary_breakpoint (struct symtab_ { register struct breakpoint *b; b = set_raw_breakpoint (sal, type); - b->enable = enabled; - b->disposition = donttouch; + b->enable_state = bp_enabled; + b->disposition = disp_donttouch; b->frame = (frame ? frame->frame : 0); /* If we're debugging a multi-threaded program, then we @@ -4597,7 +4597,7 @@ create_breakpoints (struct symtabs_and_l b->addr_string = addr_string[i]; b->cond_string = cond_string[i]; b->ignore_count = ignore_count; - b->enable = enabled; + b->enable_state = bp_enabled; b->disposition = disposition; mention (b); } @@ -4822,7 +4822,7 @@ break_command_1 (char *arg, int flag, in create_breakpoints (sals, addr_string, cond, cond_string, hardwareflag ? bp_hardware_breakpoint : bp_breakpoint, - tempflag ? del : donttouch, + tempflag ? disp_del : disp_donttouch, thread, ignore_count, from_tty); if (sals.nelts > 1) @@ -4934,7 +4934,7 @@ do_captured_breakpoint (void *data) create_breakpoints (sals, addr_string, cond, cond_string, args->hardwareflag ? bp_hardware_breakpoint : bp_breakpoint, - args->tempflag ? del : donttouch, + args->tempflag ? disp_del : disp_donttouch, args->thread, args->ignore_count, 0/*from-tty*/); /* That's it. Discard the cleanups for data inserted into the @@ -5400,7 +5400,7 @@ watch_command_1 (char *arg, int accessfl b = set_raw_breakpoint (sal, bp_type); set_breakpoint_count (breakpoint_count + 1); b->number = breakpoint_count; - b->disposition = donttouch; + b->disposition = disp_donttouch; b->exp = exp; b->exp_valid_block = exp_valid_block; b->exp_string = savestring (exp_start, exp_end - exp_start); @@ -5439,10 +5439,10 @@ watch_command_1 (char *arg, int accessfl set_breakpoint_count (breakpoint_count + 1); scope_breakpoint->number = breakpoint_count; - scope_breakpoint->enable = enabled; + scope_breakpoint->enable_state = bp_enabled; /* Automatically delete the breakpoint when it hits. */ - scope_breakpoint->disposition = del; + scope_breakpoint->disposition = disp_del; /* Only break in the proper frame (help with recursion). */ scope_breakpoint->frame = prev_frame->frame; @@ -6193,8 +6193,8 @@ create_exception_catchpoint (int tempfla NULL : savestring (cond_string, strlen (cond_string)); b->thread = thread; b->addr_string = NULL; - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; mention (b); } @@ -6257,7 +6257,7 @@ cover_target_enable_exception_callback ( { args_for_catchpoint_enable *args = arg; struct symtab_and_line *sal; - sal = target_enable_exception_callback (args->kind, args->enable); + sal = target_enable_exception_callback (args->kind, args->enable_p); if (sal == NULL) return 0; else if (sal == (struct symtab_and_line *) -1) @@ -6357,8 +6357,8 @@ handle_gnu_4_16_catch_command (char *arg b->number = breakpoint_count; b->cond = cond; - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; mention (b); } @@ -6387,8 +6387,8 @@ create_temp_exception_breakpoint (CORE_A b = set_raw_breakpoint (sal, bp_breakpoint); - b->disposition = del; - b->enable = enabled; + b->disposition = disp_del; + b->enable_state = bp_enabled; b->silent = 1; b->number = internal_breakpoint_number--; return b; @@ -6712,13 +6712,13 @@ breakpoint_auto_delete (bpstat bs) struct breakpoint *b, *temp; for (; bs; bs = bs->next) - if (bs->breakpoint_at && bs->breakpoint_at->disposition == del + if (bs->breakpoint_at && bs->breakpoint_at->disposition == disp_del && bs->stop) delete_breakpoint (bs->breakpoint_at); ALL_BREAKPOINTS_SAFE (b, temp) { - if (b->disposition == del_at_next_stop) + if (b->disposition == disp_del_at_next_stop) delete_breakpoint (b); } } @@ -6778,7 +6778,7 @@ delete_breakpoint (struct breakpoint *bp sprintf (message, message1, bpt->number); args.kind = bpt->type == bp_catch_catch ? EX_EVENT_CATCH : EX_EVENT_THROW; - args.enable = 0; + args.enable_p = 0; catch_errors (cover_target_enable_exception_callback, &args, message, RETURN_MASK_ALL); } @@ -6826,9 +6826,9 @@ delete_breakpoint (struct breakpoint *bp if (b->address == bpt->address && b->section == bpt->section && !b->duplicate - && b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled) + && b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled) { int val; @@ -6836,7 +6836,7 @@ delete_breakpoint (struct breakpoint *bp breakpoint at the same address as the one being deleted. If there is a permanent breakpoint somewhere, it should always be the only one inserted. */ - if (b->enable == permanent) + if (b->enable_state == bp_permanent) internal_error (__FILE__, __LINE__, "another breakpoint was inserted on top of " "a permanent breakpoint"); @@ -6972,7 +6972,7 @@ breakpoint_re_set_one (PTR bint) int i; struct symtabs_and_lines sals; char *s; - enum enable save_enable; + enum enable_state save_enable; switch (b->type) { @@ -6992,8 +6992,8 @@ breakpoint_re_set_one (PTR bint) } /* In case we have a problem, disable this breakpoint. We'll restore its status if we succeed. */ - save_enable = b->enable; - b->enable = disabled; + save_enable = b->enable_state; + b->enable_state = bp_disabled; set_language (b->language); input_radix = b->input_radix; @@ -7049,7 +7049,7 @@ breakpoint_re_set_one (PTR bint) breakpoints_changed (); } b->section = sals.sals[i].section; - b->enable = save_enable; /* Restore it, this worked. */ + b->enable_state = save_enable; /* Restore it, this worked. */ /* Now that this is re-enabled, check_duplicates @@ -7093,7 +7093,7 @@ breakpoint_re_set_one (PTR bint) xfree (b->cond); b->cond = parse_exp_1 (&s, (struct block *) 0, 0); } - if (b->enable == enabled) + if (b->enable_state == bp_enabled) mention (b); value_free_to_mark (mark); break; @@ -7314,10 +7314,10 @@ disable_breakpoint (struct breakpoint *b return; /* You can't disable permanent breakpoints. */ - if (bpt->enable == permanent) + if (bpt->enable_state == bp_permanent) return; - bpt->enable = disabled; + bpt->enable_state = bp_disabled; check_duplicates (bpt); @@ -7381,8 +7381,8 @@ do_enable_breakpoint (struct breakpoint error ("Hardware breakpoints used exceeds limit."); } - if (bpt->enable != permanent) - bpt->enable = enabled; + if (bpt->enable_state != bp_permanent) + bpt->enable_state = bp_enabled; bpt->disposition = disposition; check_duplicates (bpt); breakpoints_changed (); @@ -7406,7 +7406,7 @@ do_enable_breakpoint (struct breakpoint printf_filtered ("\ Cannot enable watchpoint %d because the block in which its expression\n\ is valid is not currently in scope.\n", bpt->number); - bpt->enable = disabled; + bpt->enable_state = bp_disabled; return; } @@ -7440,7 +7440,7 @@ is valid is not currently in scope.\n", printf_filtered ("\ Cannot enable watchpoint %d because target watch resources\n\ have been allocated for other watchpoints.\n", bpt->number); - bpt->enable = disabled; + bpt->enable_state = bp_disabled; value_free_to_mark (mark); return; } @@ -7502,7 +7502,7 @@ enable_command (char *args, int from_tty static void enable_once_breakpoint (struct breakpoint *bpt) { - do_enable_breakpoint (bpt, disable); + do_enable_breakpoint (bpt, disp_disable); } /* ARGSUSED */ @@ -7515,7 +7515,7 @@ enable_once_command (char *args, int fro static void enable_delete_breakpoint (struct breakpoint *bpt) { - do_enable_breakpoint (bpt, del); + do_enable_breakpoint (bpt, disp_del); } /* ARGSUSED */ --- gdb/memattr.h~0 Thu Mar 1 23:56:34 2001 +++ gdb/memattr.h Sat Jul 14 12:17:06 2001 @@ -60,8 +60,8 @@ struct mem_region /* Item number of this memory region. */ int number; - /* Status of this memory region (enabled or disabled) */ - int status; + /* Status of this memory region (enabled if non-zero, otherwise disabled) */ + int enabled_p; /* Attributes for this region */ struct mem_attrib attrib; --- gdb/memattr.c~0 Tue Mar 27 22:36:22 2001 +++ gdb/memattr.c Sat Jul 14 12:15:44 2001 @@ -8,16 +8,6 @@ #include "language.h" #include "gdb_string.h" -/* FIXME: While this conflicts with the enum defined in breakpoint.h, - I used them to be consistant with how breakpoints, tracepoints, and - displays are implemented. It doesn't lose now because breakpoint.h - is not included. */ -enum enable -{ - disabled, - enabled -}; - const struct mem_attrib default_mem_attrib = { MEM_RW, /* mode */ @@ -58,7 +48,7 @@ create_mem_region (CORE_ADDR lo, CORE_AD new->lo = lo; new->hi = hi; new->number = ++mem_number; - new->status = enabled; + new->enabled_p = 1; new->attrib = *attrib; /* link in new node */ @@ -97,7 +87,7 @@ lookup_mem_region (CORE_ADDR addr) for (m = mem_region_chain; m; m = m->next) { - if (m->status == enabled) + if (m->enabled_p == 1) { if (addr >= m->lo && addr < m->hi) return m; @@ -214,7 +204,7 @@ mem_info_command (char *args, int from_t { printf_filtered ("%d: %c\t", m->number, - m->status ? 'y' : 'n'); + m->enabled_p ? 'y' : 'n'); printf_filtered ("%s - ", local_hex_string_custom ((unsigned long) m->lo, "08l")); printf_filtered ("%s\t", @@ -300,7 +290,7 @@ mem_enable (int num) for (m = mem_region_chain; m; m = m->next) if (m->number == num) { - m->status = enabled; + m->enabled_p = 1; return; } printf_unfiltered ("No memory region number %d.\n", num); @@ -319,7 +309,7 @@ mem_enable_command (char *args, int from if (p == 0) { for (m = mem_region_chain; m; m = m->next) - m->status = enabled; + m->enabled_p = 1; } else while (*p) @@ -350,7 +340,7 @@ mem_disable (int num) for (m = mem_region_chain; m; m = m->next) if (m->number == num) { - m->status = disabled; + m->enabled_p = 0; return; } printf_unfiltered ("No memory region number %d.\n", num); @@ -369,7 +359,7 @@ mem_disable_command (char *args, int fro if (p == 0) { for (m = mem_region_chain; m; m = m->next) - m->status = disabled; + m->enabled_p = 0; } else while (*p) --- gdb/tracepoint.h~0 Tue Mar 6 10:21:16 2001 +++ gdb/tracepoint.h Sat Jul 14 12:29:56 2001 @@ -21,12 +21,6 @@ #if !defined (TRACEPOINT_H) #define TRACEPOINT_H 1 -#if !defined (BREAKPOINT_H) -enum enable - { - disabled, enabled - }; -#endif /* The data structure for an action: */ struct action_line { @@ -40,7 +34,7 @@ { struct tracepoint *next; - enum enable enabled; + int enabled_p; #if 0 /* Type of tracepoint (MVS FIXME: needed?). */ --- gdb/tracepoint.c~0 Tue Apr 17 23:16:30 2001 +++ gdb/tracepoint.c Sat Jul 14 12:30:52 2001 @@ -355,7 +355,7 @@ set_raw_tracepoint (struct symtab_and_li t->language = current_language->la_language; t->input_radix = input_radix; t->line_number = sal.line; - t->enabled = enabled; + t->enabled_p = 1; t->next = 0; t->step_count = 0; t->pass_count = 0; @@ -496,7 +496,7 @@ tracepoints_info (char *tpnum_exp, int f } printf_filtered ("%-3d %-3s ", t->number, - t->enabled == enabled ? "y" : "n"); + t->enabled_p ? "y" : "n"); if (addressprint) { char *tmp; @@ -571,12 +571,12 @@ tracepoint_operation (struct tracepoint switch (opcode) { case enable_op: - t->enabled = enabled; + t->enabled_p = 1; if (modify_tracepoint_hook) modify_tracepoint_hook (t); break; case disable_op: - t->enabled = disabled; + t->enabled_p = 0; if (modify_tracepoint_hook) modify_tracepoint_hook (t); break; @@ -1743,7 +1743,7 @@ trace_start_command (char *args, int fro sprintf_vma (tmp, t->address); sprintf (buf, "QTDP:%x:%s:%c:%lx:%x", t->number, tmp, /* address */ - t->enabled == enabled ? 'E' : 'D', + t->enabled_p ? 'E' : 'D', t->step_count, t->pass_count); if (t->actions) --- gdb/printcmd.c~0 Sat May 12 07:08:22 2001 +++ gdb/printcmd.c Sat Jul 14 12:23:40 2001 @@ -111,7 +111,7 @@ struct display /* Innermost block required by this expression when evaluated */ struct block *block; /* Status of this display (enabled or disabled) */ - enum enable status; + int enabled_p; }; /* Chain of expressions whose values should be displayed @@ -1427,7 +1427,7 @@ display_command (char *exp, int from_tty new->next = display_chain; new->number = ++display_number; new->format = fmt; - new->status = enabled; + new->enabled_p = 1; display_chain = new; if (from_tty && target_has_execution) @@ -1538,7 +1538,7 @@ do_one_display (struct display *d) { int within_current_scope; - if (d->status == disabled) + if (d->enabled_p == 0) return; if (d->block) @@ -1638,7 +1638,7 @@ disable_display (int num) for (d = display_chain; d; d = d->next) if (d->number == num) { - d->status = disabled; + d->enabled_p = 0; return; } printf_unfiltered ("No display number %d.\n", num); @@ -1669,7 +1669,7 @@ Num Enb Expression\n"); for (d = display_chain; d; d = d->next) { - printf_filtered ("%d: %c ", d->number, "ny"[(int) d->status]); + printf_filtered ("%d: %c ", d->number, "ny"[(int) d->enabled_p]); if (d->format.size) printf_filtered ("/%d%c%c ", d->format.count, d->format.size, d->format.format); @@ -1694,7 +1694,7 @@ enable_display (char *args, int from_tty if (p == 0) { for (d = display_chain; d; d = d->next) - d->status = enabled; + d->enabled_p = 1; } else while (*p) @@ -1710,7 +1710,7 @@ enable_display (char *args, int from_tty for (d = display_chain; d; d = d->next) if (d->number == num) { - d->status = enabled; + d->enabled_p = 1; goto win; } printf_unfiltered ("No display number %d.\n", num); @@ -1732,7 +1732,7 @@ disable_display_command (char *args, int if (p == 0) { for (d = display_chain; d; d = d->next) - d->status = disabled; + d->enabled_p = 0; } else while (*p) --- gdb/infcmd.c~0 Wed May 16 23:05:48 2001 +++ gdb/infcmd.c Sat Jul 14 13:16:06 2001 @@ -893,7 +893,7 @@ run_stack_dummy (CORE_ADDR addr, char *b bpt = set_momentary_breakpoint (sal, get_current_frame (), bp_call_dummy); - bpt->disposition = del; + bpt->disposition = disp_del; /* If all error()s out of proceed ended up calling normal_stop (and perhaps they should; it already does in the special case of error --- gdb/go32-nat.c~3 Tue Jul 10 20:40:20 2001 +++ gdb/go32-nat.c Sat Jul 14 12:04:50 2001 @@ -41,10 +41,7 @@ #include <unistd.h> #include <sys/utsname.h> #include <io.h> -/* breakpoint.h defines `disable' which is an enum member. */ -#define disable interrup_disable #include <dos.h> -#undef disable #include <dpmi.h> #include <go32.h> #include <debug/v2load.h> 2001-07-14 Eli Zaretskii <eliz@is.elta.co.il> * tuiSourceWin.c: Use disp_del instead of del. * tuiSource.c: Use disp_del instead of del. * tuiDisassem.c: Use disp_del instead of del. --- gdb/tui/tuiDisassem.c~0 Sun May 28 04:12:42 2000 +++ gdb/tui/tuiDisassem.c Sat Jul 14 13:18:18 2001 @@ -112,7 +112,7 @@ extern void strcat_address_numeric (CORE element->whichElement.source.hasBreak = (bp != (struct breakpoint *) NULL && (!element->whichElement.source.isExecPoint || - (bp->disposition != del || bp->hit_count <= 0))); + (bp->disposition != disp_del || bp->hit_count <= 0))); curLine++; pc = newpc; /* reset the buffer to empty */ --- gdb/tui/tuiSource.c~0 Sun May 28 04:12:42 2000 +++ gdb/tui/tuiSource.c Sat Jul 14 13:20:46 2001 @@ -165,8 +165,8 @@ tuiSetSourceContent (s, lineNo, noerror) element->whichElement.source.hasBreak = (bp != (struct breakpoint *) NULL && (!element->whichElement.source.isExecPoint || - (bp->disposition != del || bp->hit_count <= 0))); + (bp->disposition != disp_del || bp->hit_count <= 0))); if (c != EOF) { i = strlen (srcLine) - 1; --- gdb/tui/tuiSourceWin.c~0 Wed Jul 7 23:19:30 1999 +++ gdb/tui/tuiSourceWin.c Sat Jul 14 13:19:42 2001 @@ -756,7 +756,7 @@ tuiSetExecInfoContent (winInfo) srcElement->whichElement.source.lineOrAddr.addr); if (found) srcElement->whichElement.source.hasBreak = - (bp->disposition != del || bp->hit_count <= 0); + (bp->disposition != disp_del || bp->hit_count <= 0); } if (!found) srcElement->whichElement.source.hasBreak = FALSE; ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-14 4:08 ` [RFA] enum enable Eli Zaretskii @ 2001-07-16 14:52 ` Jim Blandy 2001-07-16 15:53 ` Andrew Cagney 2001-07-17 0:06 ` Eli Zaretskii [not found] ` <npzoa4y1hp.fsf@zwingli.cygnus.com> 2001-07-29 0:49 ` Eli Zaretskii 2 siblings, 2 replies; 21+ messages in thread From: Jim Blandy @ 2001-07-16 14:52 UTC (permalink / raw) To: Eli Zaretskii; +Cc: msnyder, gdb-patches, ac131313 > 2001-07-14 Eli Zaretskii <eliz@is.elta.co.il> > > The following changes avoid polluting global namespace with the > `enable' and `disable' identifiers, because some platforms define > in their system headers symbols with global scope that go by those > names. > Why are the following changes necessary? Structure members aren't in the global namespace: > (struct breakpoint): Rename the `enable' member to `enable_state'. > (args_for_catchpoint_enable): Rename the `enable' member to > `enable_p'. All users changed. > (struct tracepoint): The member `enabled' is now `int enabled_p'. > * printcmd.c (struct display): The `status' member is now an int. > * memattr.h (struct mem_region): Rename the `status' member to > `enabled_p'. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-16 14:52 ` Jim Blandy @ 2001-07-16 15:53 ` Andrew Cagney 2001-07-17 0:06 ` Eli Zaretskii 1 sibling, 0 replies; 21+ messages in thread From: Andrew Cagney @ 2001-07-16 15:53 UTC (permalink / raw) To: Jim Blandy; +Cc: Eli Zaretskii, msnyder, gdb-patches >> 2001-07-14 Eli Zaretskii <eliz@is.elta.co.il> >> >> The following changes avoid polluting global namespace with the >> `enable' and `disable' identifiers, because some platforms define >> in their system headers symbols with global scope that go by those >> names. >> > > > Why are the following changes necessary? Structure members aren't in > the global namespace: See earlier e-mail from me. The existing code read: b->enable = enabled and b->enable == disabled ulgh. Andrew ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-16 14:52 ` Jim Blandy 2001-07-16 15:53 ` Andrew Cagney @ 2001-07-17 0:06 ` Eli Zaretskii 2001-07-17 10:45 ` Jim Blandy 2001-07-19 5:57 ` Michael Snyder 1 sibling, 2 replies; 21+ messages in thread From: Eli Zaretskii @ 2001-07-17 0:06 UTC (permalink / raw) To: Jim Blandy; +Cc: msnyder, gdb-patches, ac131313 On 16 Jul 2001, Jim Blandy wrote: > Why are the following changes necessary? Structure members aren't in > the global namespace: > > > (struct breakpoint): Rename the `enable' member to `enable_state'. > > (args_for_catchpoint_enable): Rename the `enable' member to > > `enable_p'. All users changed. > > (struct tracepoint): The member `enabled' is now `int enabled_p'. > > * printcmd.c (struct display): The `status' member is now an int. > > * memattr.h (struct mem_region): Rename the `status' member to > > `enabled_p'. In addition to Andrew's request to change that, GCC 2.7.2.1 barfs if it sees the declaration of a member `enable' together with a prototype of a function `enable' in the same compilation unit. In my case, the function is declared in one of the system headers, so I guess GCC sees it first and protests when the same identifier appears in a struct. (Yes, I know, GCC 2.7.2.1 is old, but I still use it on one of my machines because, unlike 2.9x series, it is remarkably stable and bug-free. I use it as a ``reference implementation'' whenever I have obscure problems with code which behaves in some weird fashion.) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-17 0:06 ` Eli Zaretskii @ 2001-07-17 10:45 ` Jim Blandy [not found] ` <200107180700.KAA12466@is.elta.co.il> 2001-07-19 5:57 ` Michael Snyder 1 sibling, 1 reply; 21+ messages in thread From: Jim Blandy @ 2001-07-17 10:45 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Jim Blandy, msnyder, gdb-patches, ac131313 Eli Zaretskii <eliz@is.elta.co.il> writes: > In addition to Andrew's request to change that, GCC 2.7.2.1 barfs if > it sees the declaration of a member `enable' together with a prototype > of a function `enable' in the same compilation unit. In my case, the > function is declared in one of the system headers, so I guess GCC sees > it first and protests when the same identifier appears in a struct. You've *got* to be kidding. So, the following program gets an error? extern int foo (void); struct bar { int foo; }; ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <200107180700.KAA12466@is.elta.co.il>]
* Re: [RFA] enum enable [not found] ` <200107180700.KAA12466@is.elta.co.il> @ 2001-07-18 0:34 ` Daniel Berlin 2001-07-18 10:15 ` Jim Blandy 1 sibling, 0 replies; 21+ messages in thread From: Daniel Berlin @ 2001-07-18 0:34 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jimb, msnyder, gdb-patches, ac131313 Eli Zaretskii <eliz@is.elta.co.il> writes: >> From: Jim Blandy <jimb@zwingli.cygnus.com> >> Date: 17 Jul 2001 12:46:32 -0500 >> >> Eli Zaretskii <eliz@is.elta.co.il> writes: >> > In addition to Andrew's request to change that, GCC 2.7.2.1 barfs if >> > it sees the declaration of a member `enable' together with a prototype >> > of a function `enable' in the same compilation unit. In my case, the >> > function is declared in one of the system headers, so I guess GCC sees >> > it first and protests when the same identifier appears in a struct. >> >> You've *got* to be kidding. >> >> So, the following program gets an error? >> >> extern int foo (void); >> >> struct bar >> { >> int foo; >> }; >> > > No, that one passes. But this one does not: > > enum foobar > { > foo, > bar > }; > > int foo(void); > > $ gcc2721 -c enum.c > enum.c:8: two or more data types in declaration of `foo' > enum.c:8: `foo' redeclared as different kind of symbol > enum.c:4: previous declaration of `foo' > > If I switch the order of the function and enum declaration, the > resulting message might give a clue about what's going on: > > int foo(void); > > enum foobar > { > foo, > bar > }; > > $ gcc2721 -c enum.c > enum.c:6: `foo' redeclared as different kind of symbol > enum.c:2: previous declaration of `foo' > enum.c:6: warning: `foo' was declared `extern' and later `static' > > Actually, now I see that even GCC 2.95.3 reports the same errors. > > [Dig, dig] and it looks like this is expected: my references indicate > that enumeration constants and function names belong to the same > namespace in C programs. Yeah, but in case you still thought gcc was off the hook for this type of failure, check this out: #include <vector> struct fill {}; // comment out this line to compile successfully struct y {}; void f() { std::vector<y> x(10); x.insert(x.begin(), 10, y()); } Works fine with 2.95. Perfectly valid C++. Fails miserably with 3.0. Whoops. :) --Dan -- "Women... Can't live with 'em... Can't shoot 'em. "-Steven Wright ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable [not found] ` <200107180700.KAA12466@is.elta.co.il> 2001-07-18 0:34 ` Daniel Berlin @ 2001-07-18 10:15 ` Jim Blandy 2001-07-18 12:59 ` Eli Zaretskii 1 sibling, 1 reply; 21+ messages in thread From: Jim Blandy @ 2001-07-18 10:15 UTC (permalink / raw) To: Eli Zaretskii; +Cc: msnyder, gdb-patches, ac131313 Eli Zaretskii <eliz@is.elta.co.il> writes: > [Dig, dig] and it looks like this is expected: my references indicate > that enumeration constants and function names belong to the same > namespace in C programs. Right. The changes I asked about were all renamings of *structure* members, not enum members. Structure members are supposed to be in per-type namespaces; I was astonished to hear some version of GCC was having problems with that. But it wasn't. I can go re-patch, recompile, and send you the error messages, but in order to correct your patch, you'll need to update your source tree anyway, right? ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-18 10:15 ` Jim Blandy @ 2001-07-18 12:59 ` Eli Zaretskii 0 siblings, 0 replies; 21+ messages in thread From: Eli Zaretskii @ 2001-07-18 12:59 UTC (permalink / raw) To: jimb; +Cc: msnyder, gdb-patches, ac131313 > From: Jim Blandy <jimb@zwingli.cygnus.com> > Date: 18 Jul 2001 12:16:47 -0500 > > Eli Zaretskii <eliz@is.elta.co.il> writes: > > [Dig, dig] and it looks like this is expected: my references indicate > > that enumeration constants and function names belong to the same > > namespace in C programs. > > Right. The changes I asked about were all renamings of *structure* > members, not enum members. Sure, but it hardly made any sense to correct `enable' and `disable' in some places, but not in others. That would have raised a few brows. > I can go re-patch, recompile, and send you the error messages, but in > order to correct your patch, you'll need to update your source tree > anyway, right? Hopefully, I won't, if the messages are self-explanatory ;-) It's a terrible nuisance for me to fetch the monster distro and copy all my local changes to it, that's why I try to avoid that. So if you can afford it, please send me the messages. Thanks. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-17 0:06 ` Eli Zaretskii 2001-07-17 10:45 ` Jim Blandy @ 2001-07-19 5:57 ` Michael Snyder 2001-07-19 6:13 ` Eli Zaretskii 1 sibling, 1 reply; 21+ messages in thread From: Michael Snyder @ 2001-07-19 5:57 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Jim Blandy, gdb-patches, ac131313 Eli Zaretskii wrote: > > On 16 Jul 2001, Jim Blandy wrote: > > > Why are the following changes necessary? Structure members aren't in > > the global namespace: > > > > > (struct breakpoint): Rename the `enable' member to `enable_state'. > > > (args_for_catchpoint_enable): Rename the `enable' member to > > > `enable_p'. All users changed. > > > (struct tracepoint): The member `enabled' is now `int enabled_p'. > > > * printcmd.c (struct display): The `status' member is now an int. > > > * memattr.h (struct mem_region): Rename the `status' member to > > > `enabled_p'. > > In addition to Andrew's request to change that, GCC 2.7.2.1 barfs if > it sees the declaration of a member `enable' together with a prototype > of a function `enable' in the same compilation unit. In my case, the > function is declared in one of the system headers, so I guess GCC sees > it first and protests when the same identifier appears in a struct. > > (Yes, I know, GCC 2.7.2.1 is old, but I still use it on one of my > machines because, unlike 2.9x series, it is remarkably stable and > bug-free. I use it as a ``reference implementation'' whenever I have > obscure problems with code which behaves in some weird fashion.) Seems funny to call it bug-free, right after explaining that you had to make a change in gdb sources to work around a bug in it... ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-19 5:57 ` Michael Snyder @ 2001-07-19 6:13 ` Eli Zaretskii 0 siblings, 0 replies; 21+ messages in thread From: Eli Zaretskii @ 2001-07-19 6:13 UTC (permalink / raw) To: Michael Snyder; +Cc: Jim Blandy, gdb-patches, ac131313 On Thu, 19 Jul 2001, Michael Snyder wrote: > > (Yes, I know, GCC 2.7.2.1 is old, but I still use it on one of my > > machines because, unlike 2.9x series, it is remarkably stable and > > bug-free. I use it as a ``reference implementation'' whenever I have > > obscure problems with code which behaves in some weird fashion.) > > Seems funny to call it bug-free, right after explaining > that you had to make a change in gdb sources to work around > a bug in it... It turns out that wasn't a bug; see my other messages in this thread. ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <npzoa4y1hp.fsf@zwingli.cygnus.com>]
* Re: [RFA] enum enable [not found] ` <npzoa4y1hp.fsf@zwingli.cygnus.com> @ 2001-07-17 0:07 ` Eli Zaretskii 2001-07-25 7:28 ` Eli Zaretskii 1 sibling, 0 replies; 21+ messages in thread From: Eli Zaretskii @ 2001-07-17 0:07 UTC (permalink / raw) To: Jim Blandy; +Cc: msnyder, gdb-patches, ac131313 On 16 Jul 2001, Jim Blandy wrote: > Anyway, I get compilation errors with your patch. There are uses of > the old struct tracepoint `enabled' member that your patch didn't > catch. Please send me the error messages. My source tree is somewhat outdated, so perhaps in the meantime more code was added which uses those members. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable [not found] ` <npzoa4y1hp.fsf@zwingli.cygnus.com> 2001-07-17 0:07 ` Eli Zaretskii @ 2001-07-25 7:28 ` Eli Zaretskii 2001-07-30 16:24 ` Jim Blandy 1 sibling, 1 reply; 21+ messages in thread From: Eli Zaretskii @ 2001-07-25 7:28 UTC (permalink / raw) To: jimb; +Cc: msnyder, gdb-patches, ac131313 > From: Jim Blandy <jimb@zwingli.cygnus.com> > Date: 16 Jul 2001 17:04:34 -0500 > > Anyway, I get compilation errors with your patch. There are uses of > the old struct tracepoint `enabled' member that your patch didn't > catch. > > (Or I botched appyling the patch.) I think one of the hunks for tracepoint.c didn't apply for you, because tracepoint.c has changed while I worked on this. The modified patch is attached below. With it, I patched and built yesterday's snapshot without any problems. Since this is just a variable-renaming patch, I hope it can be approved soon. Otherwise, I need a kludge in go32-nat.c to get it to compile, and an IDE used by DJGPP users (which links parts of GDB as its debugging engine) needs further kludges, due to conflicts with system headers. I'd hate to go into release branch with these kludges. Thanks. 2001-07-25 Eli Zaretskii <eliz@is.elta.co.il> The following changes avoid polluting global namespace with the `enable' and `disable' identifiers, because some platforms define in their system headers symbols with global scope that go by those names. * breakpoint.h (enum enable_state): Rename from `enum enable'. Also rename all the enum members to have the "bp_" prefix. (struct breakpoint): Rename the `enable' member to `enable_state'. (enum bpdisp): Rename all members to have the "disp_" prefix. * breakpoint.c: All users of `enum enable' and `enum bpdisp' changed. (args_for_catchpoint_enable): Rename the `enable' member to `enable_p'. All users changed. * tracepoint.h (enum enable): Remove. (struct tracepoint): The member `enabled' is now `int enabled_p'. * tracepoint.c: All users of the `enabled' member changed. * printcmd.c (struct display): The `status' member is now an int. * memattr.h (struct mem_region): Rename the `status' member to `enabled_p'. (enum enable): Remove. * memattr.c: Change all users of the `status' member of struct mem_region to use `enabled_p' instead. * infcmd.c (run_stack_dummy): Use disp_del instead of del. * go32-nat.c: Remove the kludgey work-around for conflicts between <dos.h> and "breakpoint.h". --- gdb/breakpoint.h~0 Sun May 6 04:35:56 2001 +++ gdb/breakpoint.h Sat Jul 14 13:09:40 2001 @@ -133,21 +133,21 @@ /* States of enablement of breakpoint. */ -enum enable +enum enable_state { - disabled, /* The eventpoint is inactive, and cannot trigger. */ - enabled, /* The eventpoint is active, and can trigger. */ - shlib_disabled, /* The eventpoint's address is in an unloaded solib. + bp_disabled, /* The eventpoint is inactive, and cannot trigger. */ + bp_enabled, /* The eventpoint is active, and can trigger. */ + bp_shlib_disabled, /* The eventpoint's address is in an unloaded solib. The eventpoint will be automatically enabled and reset when that solib is loaded. */ - call_disabled, /* The eventpoint has been disabled while a call + bp_call_disabled, /* The eventpoint has been disabled while a call into the inferior is "in flight", because some eventpoints interfere with the implementation of a call on some targets. The eventpoint will be automatically enabled and reset when the call "lands" (either completes, or stops at another eventpoint). */ - permanent /* There is a breakpoint instruction hard-wired into + bp_permanent /* There is a breakpoint instruction hard-wired into the target's code. Don't try to write another breakpoint instruction on top of it, or restore its value. Step over it using the architecture's @@ -159,10 +159,10 @@ enum bpdisp { - del, /* Delete it */ - del_at_next_stop, /* Delete at next stop, whether hit or not */ - disable, /* Disable it */ - donttouch /* Leave it alone */ + disp_del, /* Delete it */ + disp_del_at_next_stop, /* Delete at next stop, whether hit or not */ + disp_disable, /* Disable it */ + disp_donttouch /* Leave it alone */ }; enum target_hw_bp_type @@ -187,7 +187,7 @@ /* Type of breakpoint. */ enum bptype type; /* Zero means disabled; remember the info but don't break here. */ - enum enable enable; + enum enable_state enable_state; /* What to do with this breakpoint after we hit it. */ enum bpdisp disposition; /* Number assigned to distinguish breakpoints. */ --- gdb/breakpoint.c~0 Wed May 23 03:52:44 2001 +++ gdb/breakpoint.c Sat Jul 14 13:21:16 2001 @@ -135,7 +135,7 @@ static enum print_stop_action print_bp_s typedef struct { enum exception_event_kind kind; - int enable; + int enable_p; } args_for_catchpoint_enable; @@ -721,7 +721,7 @@ insert_breakpoints (void) ALL_BREAKPOINTS_SAFE (b, temp) { - if (b->enable == permanent) + if (b->enable_state == bp_permanent) /* Permanent breakpoints cannot be inserted or removed. */ continue; else if (b->type != bp_watchpoint @@ -733,9 +733,9 @@ insert_breakpoints (void) && b->type != bp_catch_exec && b->type != bp_catch_throw && b->type != bp_catch_catch - && b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + && b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && !b->inserted && !b->duplicate) { @@ -774,7 +774,7 @@ insert_breakpoints (void) { /* See also: disable_breakpoints_in_shlibs. */ val = 0; - b->enable = shlib_disabled; + b->enable_state = bp_shlib_disabled; if (!disabled_breaks) { target_terminal_ours_for_output (); @@ -802,9 +802,9 @@ insert_breakpoints (void) return_val = val; /* remember failure */ } else if (ep_is_exception_catchpoint (b) - && b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + && b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && !b->inserted && !b->duplicate) @@ -822,7 +822,7 @@ insert_breakpoints (void) target_terminal_ours_for_output (); warning ("Cannot insert catchpoint %d; disabling it.", b->number); - b->enable = disabled; + b->enable_state = bp_disabled; } else { @@ -831,7 +831,7 @@ insert_breakpoints (void) args_for_catchpoint_enable args; args.kind = b->type == bp_catch_catch ? EX_EVENT_CATCH : EX_EVENT_THROW; - args.enable = 1; + args.enable_p = 1; val = catch_errors (cover_target_enable_exception_callback, &args, message, RETURN_MASK_ALL); @@ -846,7 +846,7 @@ insert_breakpoints (void) target_terminal_ours_for_output (); warning ("Cannot insert catchpoint %d; disabling it.", b->number); - b->enable = disabled; + b->enable_state = bp_disabled; } } @@ -857,8 +857,8 @@ insert_breakpoints (void) else if ((b->type == bp_hardware_watchpoint || b->type == bp_read_watchpoint || b->type == bp_access_watchpoint) - && b->enable == enabled - && b->disposition != del_at_next_stop + && b->enable_state == bp_enabled + && b->disposition != disp_del_at_next_stop && !b->inserted && !b->duplicate) { @@ -965,8 +965,8 @@ insert_breakpoints (void) printf_filtered ("because the program has left the block \n"); printf_filtered ("in which its expression is valid.\n"); if (b->related_breakpoint) - b->related_breakpoint->disposition = del_at_next_stop; - b->disposition = del_at_next_stop; + b->related_breakpoint->disposition = disp_del_at_next_stop; + b->disposition = disp_del_at_next_stop; } /* Restore the frame and level. */ @@ -980,7 +980,7 @@ insert_breakpoints (void) else if ((b->type == bp_catch_fork || b->type == bp_catch_vfork || b->type == bp_catch_exec) - && b->enable == enabled + && b->enable_state == bp_enabled && !b->inserted && !b->duplicate) { @@ -1249,7 +1249,7 @@ remove_breakpoint (struct breakpoint *b, { int val; - if (b->enable == permanent) + if (b->enable_state == bp_permanent) /* Permanent breakpoints cannot be inserted or removed. */ return 0; @@ -1301,7 +1301,7 @@ remove_breakpoint (struct breakpoint *b, else if ((b->type == bp_hardware_watchpoint || b->type == bp_read_watchpoint || b->type == bp_access_watchpoint) - && b->enable == enabled + && b->enable_state == bp_enabled && !b->duplicate) { value_ptr v, n; @@ -1356,7 +1356,7 @@ remove_breakpoint (struct breakpoint *b, else if ((b->type == bp_catch_fork || b->type == bp_catch_vfork || b->type == bp_catch_exec) - && b->enable == enabled + && b->enable_state == bp_enabled && !b->duplicate) { val = -1; @@ -1381,7 +1381,7 @@ remove_breakpoint (struct breakpoint *b, } else if ((b->type == bp_catch_catch || b->type == bp_catch_throw) - && b->enable == enabled + && b->enable_state == bp_enabled && !b->duplicate) { @@ -1392,7 +1392,7 @@ remove_breakpoint (struct breakpoint *b, } else if (ep_is_exception_catchpoint (b) && b->inserted /* sometimes previous insert doesn't happen */ - && b->enable == enabled + && b->enable_state == bp_enabled && !b->duplicate) { @@ -1503,15 +1503,15 @@ breakpoint_here_p (CORE_ADDR pc) int any_breakpoint_here = 0; ALL_BREAKPOINTS (b) - if ((b->enable == enabled - || b->enable == permanent) + if ((b->enable_state == bp_enabled + || b->enable_state == bp_permanent) && b->address == pc) /* bp is enabled and matches pc */ { if (overlay_debugging && section_is_overlay (b->section) && !section_is_mapped (b->section)) continue; /* unmapped overlay -- can't be a match */ - else if (b->enable == permanent) + else if (b->enable_state == bp_permanent) return permanent_breakpoint_here; else any_breakpoint_here = 1; @@ -1589,9 +1589,9 @@ breakpoint_thread_match (CORE_ADDR pc, p thread = pid_to_thread_id (ptid); ALL_BREAKPOINTS (b) - if (b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + if (b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && b->address == pc && (b->thread == -1 || b->thread == thread)) { @@ -2360,8 +2360,8 @@ which its expression is valid.\n", bs->b #endif if (b->related_breakpoint) - b->related_breakpoint->disposition = del_at_next_stop; - b->disposition = del_at_next_stop; + b->related_breakpoint->disposition = disp_del_at_next_stop; + b->disposition = disp_del_at_next_stop; return WP_DELETED; } @@ -2408,9 +2408,9 @@ bpstat_stop_status (CORE_ADDR *pc, int n ALL_BREAKPOINTS_SAFE (b, temp) { - if (b->enable == disabled - || b->enable == shlib_disabled - || b->enable == call_disabled) + if (b->enable_state == bp_disabled + || b->enable_state == bp_shlib_disabled + || b->enable_state == bp_call_disabled) continue; if (b->type != bp_watchpoint @@ -2517,8 +2517,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n /* Error from catch_errors. */ printf_filtered ("Watchpoint %d deleted.\n", b->number); if (b->related_breakpoint) - b->related_breakpoint->disposition = del_at_next_stop; - b->disposition = del_at_next_stop; + b->related_breakpoint->disposition = disp_del_at_next_stop; + b->disposition = disp_del_at_next_stop; /* We've already printed what needs to be printed. */ bs->print_it = print_it_done; @@ -2589,8 +2589,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n /* Error from catch_errors. */ printf_filtered ("Watchpoint %d deleted.\n", b->number); if (b->related_breakpoint) - b->related_breakpoint->disposition = del_at_next_stop; - b->disposition = del_at_next_stop; + b->related_breakpoint->disposition = disp_del_at_next_stop; + b->disposition = disp_del_at_next_stop; /* We've already printed what needs to be printed. */ bs->print_it = print_it_done; break; @@ -2649,8 +2649,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n else { /* We will stop here */ - if (b->disposition == disable) - b->enable = disabled; + if (b->disposition == disp_disable) + b->enable_state = bp_disabled; bs->commands = b->commands; if (b->silent) bs->print = 0; @@ -2991,7 +2991,7 @@ bpstat_should_step (void) { struct breakpoint *b; ALL_BREAKPOINTS (b) - if (b->enable == enabled && b->type == bp_watchpoint) + if (b->enable_state == bp_enabled && b->type == bp_watchpoint) return 1; return 0; } @@ -3002,7 +3002,7 @@ bpstat_have_active_hw_watchpoints (void) { struct breakpoint *b; ALL_BREAKPOINTS (b) - if ((b->enable == enabled) && + if ((b->enable_state == bp_enabled) && (b->inserted) && ((b->type == bp_hardware_watchpoint) || (b->type == bp_read_watchpoint) || @@ -3161,10 +3161,10 @@ print_one_breakpoint (struct breakpoint /* 4 */ annotate_field (3); #ifdef UI_OUT - ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int) b->enable]); + ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int) b->enable_state]); ui_out_spaces (uiout, 2); #else - printf_filtered ("%-3c ", bpenables[(int) b->enable]); + printf_filtered ("%-3c ", bpenables[(int) b->enable_state]); #endif /* 5 and 6 */ @@ -3708,10 +3708,10 @@ describe_other_breakpoints (CORE_ADDR pc others--; printf_filtered ("%d%s%s ", b->number, - ((b->enable == disabled || - b->enable == shlib_disabled || - b->enable == call_disabled) ? " (disabled)" - : b->enable == permanent ? " (permanent)" + ((b->enable_state == bp_disabled || + b->enable_state == bp_shlib_disabled || + b->enable_state == bp_call_disabled) ? " (disabled)" + : b->enable_state == bp_permanent ? " (permanent)" : ""), (others > 1) ? "," : ((others == 1) ? " and" : "")); @@ -3788,15 +3788,15 @@ check_duplicates (struct breakpoint *bpt return; ALL_BREAKPOINTS (b) - if (b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + if (b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && b->address == address && (overlay_debugging == 0 || b->section == section) && breakpoint_address_is_meaningful (b)) { /* Have we found a permanent breakpoint? */ - if (b->enable == permanent) + if (b->enable_state == bp_permanent) { perm_bp = b; break; @@ -3827,9 +3827,9 @@ check_duplicates (struct breakpoint *bpt "another breakpoint was inserted on top of " "a permanent breakpoint"); - if (b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled + if (b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled && b->address == address && (overlay_debugging == 0 || b->section == section) && breakpoint_address_is_meaningful (b)) @@ -3872,7 +3872,7 @@ set_raw_breakpoint (struct symtab_and_li b->input_radix = input_radix; b->thread = -1; b->line_number = sal.line; - b->enable = enabled; + b->enable_state = bp_enabled; b->next = 0; b->silent = 0; b->ignore_count = 0; @@ -3909,7 +3909,7 @@ set_raw_breakpoint (struct symtab_and_li void make_breakpoint_permanent (struct breakpoint *b) { - b->enable = permanent; + b->enable_state = bp_permanent; /* By definition, permanent breakpoints are already present in the code. */ b->inserted = 1; @@ -3939,8 +3939,8 @@ create_longjmp_breakpoint (char *func_na b = set_raw_breakpoint (sal, func_name != NULL ? bp_longjmp : bp_longjmp_resume); - b->disposition = donttouch; - b->enable = disabled; + b->disposition = disp_donttouch; + b->enable_state = bp_disabled; b->silent = 1; if (func_name) b->addr_string = xstrdup (func_name); @@ -3961,7 +3961,7 @@ enable_longjmp_breakpoint (void) ALL_BREAKPOINTS (b) if (b->type == bp_longjmp) { - b->enable = enabled; + b->enable_state = bp_enabled; check_duplicates (b); } } @@ -3975,7 +3975,7 @@ disable_longjmp_breakpoint (void) if (b->type == bp_longjmp || b->type == bp_longjmp_resume) { - b->enable = disabled; + b->enable_state = bp_disabled; check_duplicates (b); } } @@ -3993,8 +3993,8 @@ create_thread_event_breakpoint (CORE_ADD b = set_raw_breakpoint (sal, bp_thread_event); b->number = internal_breakpoint_number--; - b->disposition = donttouch; - b->enable = enabled; + b->disposition = disp_donttouch; + b->enable_state = bp_enabled; /* addr_string has to be used or breakpoint_re_set will delete me. */ sprintf (addr_string, "*0x%s", paddr (b->address)); b->addr_string = xstrdup (addr_string); @@ -4034,7 +4034,7 @@ create_solib_event_breakpoint (CORE_ADDR sal.section = find_pc_overlay (sal.pc); b = set_raw_breakpoint (sal, bp_shlib_event); b->number = internal_breakpoint_number--; - b->disposition = donttouch; + b->disposition = disp_donttouch; return b; } @@ -4054,11 +4054,11 @@ disable_breakpoints_in_shlibs (int silen #if defined (PC_SOLIB) if (((b->type == bp_breakpoint) || (b->type == bp_hardware_breakpoint)) && - b->enable == enabled && + b->enable_state == bp_enabled && !b->duplicate && PC_SOLIB (b->address)) { - b->enable = shlib_disabled; + b->enable_state = bp_shlib_disabled; if (!silent) { if (!disabled_shlib_breaks) @@ -4081,14 +4081,14 @@ re_enable_breakpoints_in_shlibs (void) struct breakpoint *b; ALL_BREAKPOINTS (b) - if (b->enable == shlib_disabled) + if (b->enable_state == bp_shlib_disabled) { char buf[1]; /* Do not reenable the breakpoint if the shared library is still not mapped in. */ if (target_read_memory (b->address, buf, 1) == 0) - b->enable = enabled; + b->enable_state = bp_enabled; } } @@ -4155,8 +4155,8 @@ solib_load_unload_1 (char *hookname, int else if (addr_start) b->addr_string = savestring (addr_start, addr_end - addr_start); - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; if (dll_pathname == NULL) b->dll_pathname = NULL; @@ -4207,8 +4207,8 @@ create_fork_vfork_event_catchpoint (int NULL : savestring (cond_string, strlen (cond_string)); b->thread = thread; b->addr_string = NULL; - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; b->forked_inferior_pid = 0; mention (b); @@ -4246,8 +4246,8 @@ create_exec_event_catchpoint (int tempfl NULL : savestring (cond_string, strlen (cond_string)); b->thread = thread; b->addr_string = NULL; - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; mention (b); } @@ -4260,7 +4260,7 @@ hw_breakpoint_used_count (void) ALL_BREAKPOINTS (b) { - if (b->type == bp_hardware_breakpoint && b->enable == enabled) + if (b->type == bp_hardware_breakpoint && b->enable_state == bp_enabled) i++; } @@ -4276,14 +4276,14 @@ hw_watchpoint_used_count (enum bptype ty *other_type_used = 0; ALL_BREAKPOINTS (b) { - if (b->enable == enabled) + if (b->enable_state == bp_enabled) { if (b->type == type) i++; else if ((b->type == bp_hardware_watchpoint || b->type == bp_read_watchpoint || b->type == bp_access_watchpoint) - && b->enable == enabled) + && b->enable_state == bp_enabled) *other_type_used = 1; } } @@ -4305,7 +4305,7 @@ set_longjmp_resume_breakpoint (CORE_ADDR if (b->type == bp_longjmp_resume) { b->address = pc; - b->enable = enabled; + b->enable_state = bp_enabled; if (frame != NULL) b->frame = frame->frame; else @@ -4327,9 +4327,9 @@ disable_watchpoints_before_interactive_c || (b->type == bp_read_watchpoint) || (b->type == bp_access_watchpoint) || ep_is_exception_catchpoint (b)) - && (b->enable == enabled)) + && (b->enable_state == bp_enabled)) { - b->enable = call_disabled; + b->enable_state = bp_call_disabled; check_duplicates (b); } } @@ -4347,9 +4347,9 @@ enable_watchpoints_after_interactive_cal || (b->type == bp_read_watchpoint) || (b->type == bp_access_watchpoint) || ep_is_exception_catchpoint (b)) - && (b->enable == call_disabled)) + && (b->enable_state == bp_call_disabled)) { - b->enable = enabled; + b->enable_state = bp_enabled; check_duplicates (b); } } @@ -4366,8 +4366,8 @@ set_momentary_breakpoint (struct symtab_ { register struct breakpoint *b; b = set_raw_breakpoint (sal, type); - b->enable = enabled; - b->disposition = donttouch; + b->enable_state = bp_enabled; + b->disposition = disp_donttouch; b->frame = (frame ? frame->frame : 0); /* If we're debugging a multi-threaded program, then we @@ -4597,7 +4597,7 @@ create_breakpoints (struct symtabs_and_l b->addr_string = addr_string[i]; b->cond_string = cond_string[i]; b->ignore_count = ignore_count; - b->enable = enabled; + b->enable_state = bp_enabled; b->disposition = disposition; mention (b); } @@ -4822,7 +4822,7 @@ break_command_1 (char *arg, int flag, in create_breakpoints (sals, addr_string, cond, cond_string, hardwareflag ? bp_hardware_breakpoint : bp_breakpoint, - tempflag ? del : donttouch, + tempflag ? disp_del : disp_donttouch, thread, ignore_count, from_tty); if (sals.nelts > 1) @@ -4934,7 +4934,7 @@ do_captured_breakpoint (void *data) create_breakpoints (sals, addr_string, cond, cond_string, args->hardwareflag ? bp_hardware_breakpoint : bp_breakpoint, - args->tempflag ? del : donttouch, + args->tempflag ? disp_del : disp_donttouch, args->thread, args->ignore_count, 0/*from-tty*/); /* That's it. Discard the cleanups for data inserted into the @@ -5400,7 +5400,7 @@ watch_command_1 (char *arg, int accessfl b = set_raw_breakpoint (sal, bp_type); set_breakpoint_count (breakpoint_count + 1); b->number = breakpoint_count; - b->disposition = donttouch; + b->disposition = disp_donttouch; b->exp = exp; b->exp_valid_block = exp_valid_block; b->exp_string = savestring (exp_start, exp_end - exp_start); @@ -5439,10 +5439,10 @@ watch_command_1 (char *arg, int accessfl set_breakpoint_count (breakpoint_count + 1); scope_breakpoint->number = breakpoint_count; - scope_breakpoint->enable = enabled; + scope_breakpoint->enable_state = bp_enabled; /* Automatically delete the breakpoint when it hits. */ - scope_breakpoint->disposition = del; + scope_breakpoint->disposition = disp_del; /* Only break in the proper frame (help with recursion). */ scope_breakpoint->frame = prev_frame->frame; @@ -6193,8 +6193,8 @@ create_exception_catchpoint (int tempfla NULL : savestring (cond_string, strlen (cond_string)); b->thread = thread; b->addr_string = NULL; - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; mention (b); } @@ -6257,7 +6257,7 @@ cover_target_enable_exception_callback ( { args_for_catchpoint_enable *args = arg; struct symtab_and_line *sal; - sal = target_enable_exception_callback (args->kind, args->enable); + sal = target_enable_exception_callback (args->kind, args->enable_p); if (sal == NULL) return 0; else if (sal == (struct symtab_and_line *) -1) @@ -6357,8 +6357,8 @@ handle_gnu_4_16_catch_command (char *arg b->number = breakpoint_count; b->cond = cond; - b->enable = enabled; - b->disposition = tempflag ? del : donttouch; + b->enable_state = bp_enabled; + b->disposition = tempflag ? disp_del : disp_donttouch; mention (b); } @@ -6387,8 +6387,8 @@ create_temp_exception_breakpoint (CORE_A b = set_raw_breakpoint (sal, bp_breakpoint); - b->disposition = del; - b->enable = enabled; + b->disposition = disp_del; + b->enable_state = bp_enabled; b->silent = 1; b->number = internal_breakpoint_number--; return b; @@ -6712,13 +6712,13 @@ breakpoint_auto_delete (bpstat bs) struct breakpoint *b, *temp; for (; bs; bs = bs->next) - if (bs->breakpoint_at && bs->breakpoint_at->disposition == del + if (bs->breakpoint_at && bs->breakpoint_at->disposition == disp_del && bs->stop) delete_breakpoint (bs->breakpoint_at); ALL_BREAKPOINTS_SAFE (b, temp) { - if (b->disposition == del_at_next_stop) + if (b->disposition == disp_del_at_next_stop) delete_breakpoint (b); } } @@ -6778,7 +6778,7 @@ delete_breakpoint (struct breakpoint *bp sprintf (message, message1, bpt->number); args.kind = bpt->type == bp_catch_catch ? EX_EVENT_CATCH : EX_EVENT_THROW; - args.enable = 0; + args.enable_p = 0; catch_errors (cover_target_enable_exception_callback, &args, message, RETURN_MASK_ALL); } @@ -6826,9 +6826,9 @@ delete_breakpoint (struct breakpoint *bp if (b->address == bpt->address && b->section == bpt->section && !b->duplicate - && b->enable != disabled - && b->enable != shlib_disabled - && b->enable != call_disabled) + && b->enable_state != bp_disabled + && b->enable_state != bp_shlib_disabled + && b->enable_state != bp_call_disabled) { int val; @@ -6836,7 +6836,7 @@ delete_breakpoint (struct breakpoint *bp breakpoint at the same address as the one being deleted. If there is a permanent breakpoint somewhere, it should always be the only one inserted. */ - if (b->enable == permanent) + if (b->enable_state == bp_permanent) internal_error (__FILE__, __LINE__, "another breakpoint was inserted on top of " "a permanent breakpoint"); @@ -6972,7 +6972,7 @@ breakpoint_re_set_one (PTR bint) int i; struct symtabs_and_lines sals; char *s; - enum enable save_enable; + enum enable_state save_enable; switch (b->type) { @@ -6992,8 +6992,8 @@ breakpoint_re_set_one (PTR bint) } /* In case we have a problem, disable this breakpoint. We'll restore its status if we succeed. */ - save_enable = b->enable; - b->enable = disabled; + save_enable = b->enable_state; + b->enable_state = bp_disabled; set_language (b->language); input_radix = b->input_radix; @@ -7049,7 +7049,7 @@ breakpoint_re_set_one (PTR bint) breakpoints_changed (); } b->section = sals.sals[i].section; - b->enable = save_enable; /* Restore it, this worked. */ + b->enable_state = save_enable; /* Restore it, this worked. */ /* Now that this is re-enabled, check_duplicates @@ -7093,7 +7093,7 @@ breakpoint_re_set_one (PTR bint) xfree (b->cond); b->cond = parse_exp_1 (&s, (struct block *) 0, 0); } - if (b->enable == enabled) + if (b->enable_state == bp_enabled) mention (b); value_free_to_mark (mark); break; @@ -7314,10 +7314,10 @@ disable_breakpoint (struct breakpoint *b return; /* You can't disable permanent breakpoints. */ - if (bpt->enable == permanent) + if (bpt->enable_state == bp_permanent) return; - bpt->enable = disabled; + bpt->enable_state = bp_disabled; check_duplicates (bpt); @@ -7381,8 +7381,8 @@ do_enable_breakpoint (struct breakpoint error ("Hardware breakpoints used exceeds limit."); } - if (bpt->enable != permanent) - bpt->enable = enabled; + if (bpt->enable_state != bp_permanent) + bpt->enable_state = bp_enabled; bpt->disposition = disposition; check_duplicates (bpt); breakpoints_changed (); @@ -7406,7 +7406,7 @@ do_enable_breakpoint (struct breakpoint printf_filtered ("\ Cannot enable watchpoint %d because the block in which its expression\n\ is valid is not currently in scope.\n", bpt->number); - bpt->enable = disabled; + bpt->enable_state = bp_disabled; return; } @@ -7440,7 +7440,7 @@ is valid is not currently in scope.\n", printf_filtered ("\ Cannot enable watchpoint %d because target watch resources\n\ have been allocated for other watchpoints.\n", bpt->number); - bpt->enable = disabled; + bpt->enable_state = bp_disabled; value_free_to_mark (mark); return; } @@ -7502,7 +7502,7 @@ enable_command (char *args, int from_tty static void enable_once_breakpoint (struct breakpoint *bpt) { - do_enable_breakpoint (bpt, disable); + do_enable_breakpoint (bpt, disp_disable); } /* ARGSUSED */ @@ -7515,7 +7515,7 @@ enable_once_command (char *args, int fro static void enable_delete_breakpoint (struct breakpoint *bpt) { - do_enable_breakpoint (bpt, del); + do_enable_breakpoint (bpt, disp_del); } /* ARGSUSED */ --- gdb/memattr.h~0 Thu Mar 1 23:56:34 2001 +++ gdb/memattr.h Sat Jul 14 12:17:06 2001 @@ -60,8 +60,8 @@ struct mem_region /* Item number of this memory region. */ int number; - /* Status of this memory region (enabled or disabled) */ - int status; + /* Status of this memory region (enabled if non-zero, otherwise disabled) */ + int enabled_p; /* Attributes for this region */ struct mem_attrib attrib; --- gdb/memattr.c~0 Tue Mar 27 22:36:22 2001 +++ gdb/memattr.c Sat Jul 14 12:15:44 2001 @@ -8,16 +8,6 @@ #include "language.h" #include "gdb_string.h" -/* FIXME: While this conflicts with the enum defined in breakpoint.h, - I used them to be consistant with how breakpoints, tracepoints, and - displays are implemented. It doesn't lose now because breakpoint.h - is not included. */ -enum enable -{ - disabled, - enabled -}; - const struct mem_attrib default_mem_attrib = { MEM_RW, /* mode */ @@ -58,7 +48,7 @@ create_mem_region (CORE_ADDR lo, CORE_AD new->lo = lo; new->hi = hi; new->number = ++mem_number; - new->status = enabled; + new->enabled_p = 1; new->attrib = *attrib; /* link in new node */ @@ -97,7 +87,7 @@ lookup_mem_region (CORE_ADDR addr) for (m = mem_region_chain; m; m = m->next) { - if (m->status == enabled) + if (m->enabled_p == 1) { if (addr >= m->lo && addr < m->hi) return m; @@ -214,7 +204,7 @@ mem_info_command (char *args, int from_t { printf_filtered ("%d: %c\t", m->number, - m->status ? 'y' : 'n'); + m->enabled_p ? 'y' : 'n'); printf_filtered ("%s - ", local_hex_string_custom ((unsigned long) m->lo, "08l")); printf_filtered ("%s\t", @@ -300,7 +290,7 @@ mem_enable (int num) for (m = mem_region_chain; m; m = m->next) if (m->number == num) { - m->status = enabled; + m->enabled_p = 1; return; } printf_unfiltered ("No memory region number %d.\n", num); @@ -319,7 +309,7 @@ mem_enable_command (char *args, int from if (p == 0) { for (m = mem_region_chain; m; m = m->next) - m->status = enabled; + m->enabled_p = 1; } else while (*p) @@ -350,7 +340,7 @@ mem_disable (int num) for (m = mem_region_chain; m; m = m->next) if (m->number == num) { - m->status = disabled; + m->enabled_p = 0; return; } printf_unfiltered ("No memory region number %d.\n", num); @@ -369,7 +359,7 @@ mem_disable_command (char *args, int fro if (p == 0) { for (m = mem_region_chain; m; m = m->next) - m->status = disabled; + m->enabled_p = 0; } else while (*p) --- gdb/tracepoint.h~0 Tue Mar 6 10:21:16 2001 +++ gdb/tracepoint.h Sat Jul 14 12:29:56 2001 @@ -21,12 +21,6 @@ #if !defined (TRACEPOINT_H) #define TRACEPOINT_H 1 -#if !defined (BREAKPOINT_H) -enum enable - { - disabled, enabled - }; -#endif /* The data structure for an action: */ struct action_line { @@ -40,7 +34,7 @@ { struct tracepoint *next; - enum enable enabled; + int enabled_p; #if 0 /* Type of tracepoint (MVS FIXME: needed?). */ --- gdb/tracepoint.c.~1~ Thu Jun 14 19:30:16 2001 +++ gdb/tracepoint.c Wed Jul 25 16:52:18 2001 @@ -357,7 +357,7 @@ set_raw_tracepoint (struct symtab_and_li t->language = current_language->la_language; t->input_radix = input_radix; t->line_number = sal.line; - t->enabled = enabled; + t->enabled_p = 1; t->next = 0; t->step_count = 0; t->pass_count = 0; @@ -494,7 +494,7 @@ tracepoints_info (char *tpnum_exp, int f } printf_filtered ("%-3d %-3s ", t->number, - t->enabled == enabled ? "y" : "n"); + t->enabled_p ? "y" : "n"); if (addressprint) { char *tmp; @@ -569,11 +569,11 @@ tracepoint_operation (struct tracepoint switch (opcode) { case enable_op: - t->enabled = enabled; + t->enabled_p = 1; tracepoint_modify_event (t->number); break; case disable_op: - t->enabled = disabled; + t->enabled_p = 0; tracepoint_modify_event (t->number); break; case delete_op: @@ -1735,8 +1735,8 @@ trace_start_command (char *args, int fro sprintf_vma (tmp, t->address); sprintf (buf, "QTDP:%x:%s:%c:%lx:%x", t->number, tmp, /* address */ - t->enabled == enabled ? 'E' : 'D', + t->enabled_p ? 'E' : 'D', t->step_count, t->pass_count); if (t->actions) --- gdb/infcmd.c~0 Wed May 16 23:05:48 2001 +++ gdb/infcmd.c Sat Jul 14 13:16:06 2001 @@ -893,7 +893,7 @@ run_stack_dummy (CORE_ADDR addr, char *b bpt = set_momentary_breakpoint (sal, get_current_frame (), bp_call_dummy); - bpt->disposition = del; + bpt->disposition = disp_del; /* If all error()s out of proceed ended up calling normal_stop (and perhaps they should; it already does in the special case of error --- gdb/go32-nat.c~3 Tue Jul 10 20:40:20 2001 +++ gdb/go32-nat.c Sat Jul 14 12:04:50 2001 @@ -41,10 +41,7 @@ #include <unistd.h> #include <sys/utsname.h> #include <io.h> -/* breakpoint.h defines `disable' which is an enum member. */ -#define disable interrup_disable #include <dos.h> -#undef disable #include <dpmi.h> #include <go32.h> #include <debug/v2load.h> 2001-07-14 Eli Zaretskii <eliz@is.elta.co.il> * tuiSourceWin.c: Use disp_del instead of del. * tuiSource.c: Use disp_del instead of del. * tuiDisassem.c: Use disp_del instead of del. --- gdb/tui/tuiDisassem.c~0 Sun May 28 04:12:42 2000 +++ gdb/tui/tuiDisassem.c Sat Jul 14 13:18:18 2001 @@ -112,7 +112,7 @@ extern void strcat_address_numeric (CORE element->whichElement.source.hasBreak = (bp != (struct breakpoint *) NULL && (!element->whichElement.source.isExecPoint || - (bp->disposition != del || bp->hit_count <= 0))); + (bp->disposition != disp_del || bp->hit_count <= 0))); curLine++; pc = newpc; /* reset the buffer to empty */ --- gdb/tui/tuiSource.c~0 Sun May 28 04:12:42 2000 +++ gdb/tui/tuiSource.c Sat Jul 14 13:20:46 2001 @@ -165,8 +165,8 @@ tuiSetSourceContent (s, lineNo, noerror) element->whichElement.source.hasBreak = (bp != (struct breakpoint *) NULL && (!element->whichElement.source.isExecPoint || - (bp->disposition != del || bp->hit_count <= 0))); + (bp->disposition != disp_del || bp->hit_count <= 0))); if (c != EOF) { i = strlen (srcLine) - 1; --- gdb/tui/tuiSourceWin.c~0 Wed Jul 7 23:19:30 1999 +++ gdb/tui/tuiSourceWin.c Sat Jul 14 13:19:42 2001 @@ -756,7 +756,7 @@ tuiSetExecInfoContent (winInfo) srcElement->whichElement.source.lineOrAddr.addr); if (found) srcElement->whichElement.source.hasBreak = - (bp->disposition != del || bp->hit_count <= 0); + (bp->disposition != disp_del || bp->hit_count <= 0); } if (!found) srcElement->whichElement.source.hasBreak = FALSE; ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-25 7:28 ` Eli Zaretskii @ 2001-07-30 16:24 ` Jim Blandy 2001-07-31 1:45 ` Eli Zaretskii 0 siblings, 1 reply; 21+ messages in thread From: Jim Blandy @ 2001-07-30 16:24 UTC (permalink / raw) To: Eli Zaretskii; +Cc: msnyder, gdb-patches, ac131313 Eli Zaretskii <eliz@is.elta.co.il> writes: > > > From: Jim Blandy <jimb@zwingli.cygnus.com> > > Date: 16 Jul 2001 17:04:34 -0500 > > > > Anyway, I get compilation errors with your patch. There are uses of > > the old struct tracepoint `enabled' member that your patch didn't > > catch. > > > > (Or I botched appyling the patch.) > > I think one of the hunks for tracepoint.c didn't apply for you, > because tracepoint.c has changed while I worked on this. > > The modified patch is attached below. With it, I patched and built > yesterday's snapshot without any problems. > > Since this is just a variable-renaming patch, I hope it can be > approved soon. Otherwise, I need a kludge in go32-nat.c to get it to > compile, and an IDE used by DJGPP users (which links parts of GDB as > its debugging engine) needs further kludges, due to conflicts with > system headers. I'd hate to go into release branch with these > kludges. (I'm sorry I've been slow to reply. I moved last week.) This patch still fails to build. The code your patch forgets to change has been present in the sources for over a year. Did you do a full rebuild? Here are the error messages: gcc -c -g -O2 -I. -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/config -DHAVE_CONFIG_H -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../include/opcode -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../readline/.. -I../bfd -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../bfd -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../include -I../intl -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../intl -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:115: field `status' has incomplete type /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `display_command': /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: `enabled' undeclared (first use in this function) /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: (Each undeclared identifier is reported only once /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: for each function it appears in.) /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `do_one_display': /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1547: `disabled' undeclared (first use in this function) /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `disable_display': /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1647: `disabled' undeclared (first use in this function) /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `enable_display': /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1703: `enabled' undeclared (first use in this function) /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `disable_display_command': /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1741: `disabled' undeclared (first use in this function) make[1]: *** [printcmd.o] Error 1 make[1]: Leaving directory `/gnomon/jimb/cygnus/pentium3/sourceware/gdb/main/native/build/gdb' make: *** [all-gdb] Error 2 Compilation exited abnormally with code 2 at Mon Jul 30 14:09:33 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-30 16:24 ` Jim Blandy @ 2001-07-31 1:45 ` Eli Zaretskii 2001-07-31 16:24 ` Jim Blandy 2001-07-31 16:33 ` Jim Blandy 0 siblings, 2 replies; 21+ messages in thread From: Eli Zaretskii @ 2001-07-31 1:45 UTC (permalink / raw) To: Jim Blandy; +Cc: msnyder, gdb-patches, ac131313 On 30 Jul 2001, Jim Blandy wrote: > This patch still fails to build. I'm stumped; did Patch say something about failed hunks? Do you have a broken version of Patch or something? It looks like part of the patch (see below) somehow didn't apply on your machine. > The code your patch forgets to > change has been present in the sources for over a year. Did you do a > full rebuild? I did a full rebuild of the DJGPP port, so I could miss something in files which aren't compiled in that version (although I grep'ed everything). But printcmd.c _is_ compiled for DJGPP, so I couldn't possibly miss anything there. > Here are the error messages: I attach below, after the error messages, the part of patch for printcmd.c, which clearly shows that _all_ of the lines for which GCC complained on your machine should in fact have been patched by the patch I posted. How come it didn't work for you? > gcc -c -g -O2 -I. -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/config -DHAVE_CONFIG_H -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../include/opcode -I/home/jimb/cygnus/src/sourceware/ gdb/main/src/gdb/../readline/.. -I../bfd -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../bfd -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../include -I../intl -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../intl -DMI_OUT=1 -DUI_OUT= 1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:115: field `status' has incomplete type > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `display_command': > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: `enabled' undeclared (first use in this function) > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: (Each undeclared identifier is reported only once > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: for each function it appears in.) > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `do_one_display': > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1547: `disabled' undeclared (first use in this function) > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `disable_display': > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1647: `disabled' undeclared (first use in this function) > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `enable_display': > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1703: `enabled' undeclared (first use in this function) > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `disable_display_command': > /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1741: `disabled' undeclared (first use in this function) > make[1]: *** [printcmd.o] Error 1 > make[1]: Leaving directory `/gnomon/jimb/cygnus/pentium3/sourceware/gdb/main/native/build/gdb' > make: *** [all-gdb] Error 2 > > Compilation exited abnormally with code 2 at Mon Jul 30 14:09:33 > Here's the patch for printcmd.c: --- gdb/printcmd.c~0 Sat May 12 07:08:22 2001 +++ gdb/printcmd.c Sat Jul 14 12:23:40 2001 @@ -111,7 +111,7 @@ struct display /* Innermost block required by this expression when evaluated */ struct block *block; /* Status of this display (enabled or disabled) */ - enum enable status; + int enabled_p; }; /* Chain of expressions whose values should be displayed @@ -1427,7 +1427,7 @@ display_command (char *exp, int from_tty new->next = display_chain; new->number = ++display_number; new->format = fmt; - new->status = enabled; + new->enabled_p = 1; display_chain = new; if (from_tty && target_has_execution) @@ -1538,7 +1538,7 @@ do_one_display (struct display *d) { int within_current_scope; - if (d->status == disabled) + if (d->enabled_p == 0) return; if (d->block) @@ -1638,7 +1638,7 @@ disable_display (int num) for (d = display_chain; d; d = d->next) if (d->number == num) { - d->status = disabled; + d->enabled_p = 0; return; } printf_unfiltered ("No display number %d.\n", num); @@ -1669,7 +1669,7 @@ Num Enb Expression\n"); for (d = display_chain; d; d = d->next) { - printf_filtered ("%d: %c ", d->number, "ny"[(int) d->status]); + printf_filtered ("%d: %c ", d->number, "ny"[(int) d->enabled_p]); if (d->format.size) printf_filtered ("/%d%c%c ", d->format.count, d->format.size, d->format.format); @@ -1694,7 +1694,7 @@ enable_display (char *args, int from_tty if (p == 0) { for (d = display_chain; d; d = d->next) - d->status = enabled; + d->enabled_p = 1; } else while (*p) @@ -1710,7 +1710,7 @@ enable_display (char *args, int from_tty for (d = display_chain; d; d = d->next) if (d->number == num) { - d->status = enabled; + d->enabled_p = 1; goto win; } printf_unfiltered ("No display number %d.\n", num); @@ -1732,7 +1732,7 @@ disable_display_command (char *args, int if (p == 0) { for (d = display_chain; d; d = d->next) - d->status = disabled; + d->enabled_p = 0; } else while (*p) ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-31 1:45 ` Eli Zaretskii @ 2001-07-31 16:24 ` Jim Blandy 2001-07-31 16:33 ` Jim Blandy 1 sibling, 0 replies; 21+ messages in thread From: Jim Blandy @ 2001-07-31 16:24 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Jim Blandy, msnyder, gdb-patches, ac131313 Eli, I'm sorry such a simple thing seems to be causing such trouble. I'll take care of getting it into the branch for you, once we've sorted out the problem. I'm updating my GDB sources now, and I'll track it down. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-31 1:45 ` Eli Zaretskii 2001-07-31 16:24 ` Jim Blandy @ 2001-07-31 16:33 ` Jim Blandy 2001-08-01 1:53 ` Eli Zaretskii 1 sibling, 1 reply; 21+ messages in thread From: Jim Blandy @ 2001-07-31 16:33 UTC (permalink / raw) To: Eli Zaretskii; +Cc: msnyder, gdb-patches, ac131313 Eli Zaretskii <eliz@is.elta.co.il> writes: > I attach below, after the error messages, the part of patch for > printcmd.c, which clearly shows that _all_ of the lines for which GCC > complained on your machine should in fact have been patched by the > patch I posted. How come it didn't work for you? That part of the patch doesn't appear in your most recent post: Subject: Re: [RFA] enum enable Date: Wed, 25 Jul 2001 17:26:35 +0300 (IDT) Message-Id: < 200107251426.RAA18009@is.elta.co.il > It mentions printcmd.c in the ChangeLog, but that filename appears nowhere else in the patch: 11 lines matching "^\\+\\+\\+" in buffer *Article*. 100:+++ gdb/breakpoint.h Sat Jul 14 13:09:40 2001 156:+++ gdb/breakpoint.c Sat Jul 14 13:21:16 2001 921:+++ gdb/memattr.h Sat Jul 14 12:17:06 2001 936:+++ gdb/memattr.c Sat Jul 14 12:15:44 2001 1020:+++ gdb/tracepoint.h Sat Jul 14 12:29:56 2001 1046:+++ gdb/tracepoint.c Wed Jul 25 16:52:18 2001 1091:+++ gdb/infcmd.c Sat Jul 14 13:16:06 2001 1104:+++ gdb/go32-nat.c Sat Jul 14 12:04:50 2001 1129:+++ gdb/tui/tuiDisassem.c Sat Jul 14 13:18:18 2001 1142:+++ gdb/tui/tuiSource.c Sat Jul 14 13:20:46 2001 1155:+++ gdb/tui/tuiSourceWin.c Sat Jul 14 13:19:42 2001 I suspect your first patch had a similar problem, too. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-31 16:33 ` Jim Blandy @ 2001-08-01 1:53 ` Eli Zaretskii 2001-08-01 14:05 ` Andrew Cagney 0 siblings, 1 reply; 21+ messages in thread From: Eli Zaretskii @ 2001-08-01 1:53 UTC (permalink / raw) To: Jim Blandy; +Cc: msnyder, gdb-patches, ac131313 On 31 Jul 2001, Jim Blandy wrote: > Eli Zaretskii <eliz@is.elta.co.il> writes: > > I attach below, after the error messages, the part of patch for > > printcmd.c, which clearly shows that _all_ of the lines for which GCC > > complained on your machine should in fact have been patched by the > > patch I posted. How come it didn't work for you? > > That part of the patch doesn't appear in your most recent post: Right, I inadvertently deleted it when posting the augmented patch. Sorry. > I suspect your first patch had a similar problem, too. No, that one did have the patches for printcmd.c. See http://sources.redhat.com/ml/gdb-patches/2001-07/msg00339.html ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-08-01 1:53 ` Eli Zaretskii @ 2001-08-01 14:05 ` Andrew Cagney 2001-08-01 21:52 ` Jim Blandy 0 siblings, 1 reply; 21+ messages in thread From: Andrew Cagney @ 2001-08-01 14:05 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Jim Blandy, msnyder, gdb-patches > No, that one did have the patches for printcmd.c. See > > http://sources.redhat.com/ml/gdb-patches/2001-07/msg00339.html > Eli, I think the change is ok (actually thanks, this has been lurking for so long it is emabarising) (lets ignore the patch V patch V patch confusion here - I'm sure the patch sitting in your sandpit is correct :-) and it should just go into both devo and the branch. (I just hope no other patches like this are lurking). Besides, this means I will have run out of excuses and will be able to spin up an initial 5.1 release candidate. Andrew ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-08-01 14:05 ` Andrew Cagney @ 2001-08-01 21:52 ` Jim Blandy 2001-08-02 5:07 ` Eli Zaretskii 0 siblings, 1 reply; 21+ messages in thread From: Jim Blandy @ 2001-08-01 21:52 UTC (permalink / raw) To: Andrew Cagney; +Cc: Eli Zaretskii, Jim Blandy, msnyder, gdb-patches Andrew Cagney <ac131313@cygnus.com> writes: > Eli, I think the change is ok (actually thanks, this has been lurking > for so long it is emabarising) (lets ignore the patch V patch V patch > confusion here - I'm sure the patch sitting in your sandpit is correct > :-) and it should just go into both devo and the branch. (I just hope > no other patches like this are lurking). Yes, absolutely. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-08-01 21:52 ` Jim Blandy @ 2001-08-02 5:07 ` Eli Zaretskii 0 siblings, 0 replies; 21+ messages in thread From: Eli Zaretskii @ 2001-08-02 5:07 UTC (permalink / raw) To: Jim Blandy; +Cc: Andrew Cagney, Jim Blandy, msnyder, gdb-patches On 1 Aug 2001, Jim Blandy wrote: > Andrew Cagney <ac131313@cygnus.com> writes: > > Eli, I think the change is ok (actually thanks, this has been lurking > > for so long it is emabarising) (lets ignore the patch V patch V patch > > confusion here - I'm sure the patch sitting in your sandpit is correct > > :-) and it should just go into both devo and the branch. (I just hope > > no other patches like this are lurking). > > Yes, absolutely. Okay, this is now commited on head and branch. Thanks for reviewing the patch, and sorry I took so much of Jim's valuable time by botching the diffs. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RFA] enum enable 2001-07-14 4:08 ` [RFA] enum enable Eli Zaretskii 2001-07-16 14:52 ` Jim Blandy [not found] ` <npzoa4y1hp.fsf@zwingli.cygnus.com> @ 2001-07-29 0:49 ` Eli Zaretskii 2 siblings, 0 replies; 21+ messages in thread From: Eli Zaretskii @ 2001-07-29 0:49 UTC (permalink / raw) To: msnyder, gdb-patches, ac131313 Ping! Is it okay to commit this, trunk and branch? > Date: Sat, 14 Jul 2001 14:08:22 +0300 > From: "Eli Zaretskii" <eliz@is.elta.co.il> > CC: gdb-patches@sources.redhat.com, ac131313@cygnus.com > Reply-to: Eli Zaretskii <eliz@is.elta.co.il> > > > Date: Thu, 12 Jul 2001 17:32:53 -0700 > > From: Michael Snyder <msnyder@redhat.com> > > > > Eli Zaretskii wrote: > > > > > > Is it possible to rename the enum to something less general, such as > > > `enum bp_enable'? > > > > It's been discussed before, and I think the consensus > > was that it is a good idea. I'm certainly open to it. > > Here's what I came up with. This includes changes to TUI files, since > they used the affected members of struct breakpoint. > > Please review. > > 2001-07-14 Eli Zaretskii <eliz@is.elta.co.il> > > The following changes avoid polluting global namespace with the > `enable' and `disable' identifiers, because some platforms define > in their system headers symbols with global scope that go by those > names. > > * breakpoint.h (enum enable_state): Rename from `enum enable'. > Also rename all the enum members to have the "bp_" prefix. > (struct breakpoint): Rename the `enable' member to `enable_state'. > (enum bpdisp): Rename all members to have the "disp_" prefix. > > * breakpoint.c: All users of `enum enable' and `enum bpdisp' > changed. > (args_for_catchpoint_enable): Rename the `enable' member to > `enable_p'. All users changed. > > * tracepoint.h (enum enable): Remove. > (struct tracepoint): The member `enabled' is now `int enabled_p'. > > * tracepoint.c: All users of the `enabled' member changed. > > * printcmd.c (struct display): The `status' member is now an int. > > * memattr.h (struct mem_region): Rename the `status' member to > `enabled_p'. > (enum enable): Remove. > > * memattr.c: Change all users of the `status' member of struct > mem_region to use `enabled_p' instead. > > * infcmd.c (run_stack_dummy): Use disp_del instead of del. > > * go32-nat.c: Remove the kludgey work-around for conflicts between > <dos.h> and "breakpoint.h". > > > --- gdb/breakpoint.h~0 Sun May 6 04:35:56 2001 > +++ gdb/breakpoint.h Sat Jul 14 13:09:40 2001 > @@ -133,21 +133,21 @@ > > /* States of enablement of breakpoint. */ > > -enum enable > +enum enable_state > { > - disabled, /* The eventpoint is inactive, and cannot trigger. */ > - enabled, /* The eventpoint is active, and can trigger. */ > - shlib_disabled, /* The eventpoint's address is in an unloaded solib. > + bp_disabled, /* The eventpoint is inactive, and cannot trigger. */ > + bp_enabled, /* The eventpoint is active, and can trigger. */ > + bp_shlib_disabled, /* The eventpoint's address is in an unloaded solib. > The eventpoint will be automatically enabled > and reset when that solib is loaded. */ > - call_disabled, /* The eventpoint has been disabled while a call > + bp_call_disabled, /* The eventpoint has been disabled while a call > into the inferior is "in flight", because some > eventpoints interfere with the implementation of > a call on some targets. The eventpoint will be > automatically enabled and reset when the call > "lands" (either completes, or stops at another > eventpoint). */ > - permanent /* There is a breakpoint instruction hard-wired into > + bp_permanent /* There is a breakpoint instruction hard-wired into > the target's code. Don't try to write another > breakpoint instruction on top of it, or restore > its value. Step over it using the architecture's > @@ -159,10 +159,10 @@ > > enum bpdisp > { > - del, /* Delete it */ > - del_at_next_stop, /* Delete at next stop, whether hit or not */ > - disable, /* Disable it */ > - donttouch /* Leave it alone */ > + disp_del, /* Delete it */ > + disp_del_at_next_stop, /* Delete at next stop, whether hit or not */ > + disp_disable, /* Disable it */ > + disp_donttouch /* Leave it alone */ > }; > > enum target_hw_bp_type > @@ -187,7 +187,7 @@ > /* Type of breakpoint. */ > enum bptype type; > /* Zero means disabled; remember the info but don't break here. */ > - enum enable enable; > + enum enable_state enable_state; > /* What to do with this breakpoint after we hit it. */ > enum bpdisp disposition; > /* Number assigned to distinguish breakpoints. */ > > > --- gdb/breakpoint.c~0 Wed May 23 03:52:44 2001 > +++ gdb/breakpoint.c Sat Jul 14 13:21:16 2001 > @@ -135,7 +135,7 @@ static enum print_stop_action print_bp_s > typedef struct > { > enum exception_event_kind kind; > - int enable; > + int enable_p; > } > args_for_catchpoint_enable; > > @@ -721,7 +721,7 @@ insert_breakpoints (void) > > ALL_BREAKPOINTS_SAFE (b, temp) > { > - if (b->enable == permanent) > + if (b->enable_state == bp_permanent) > /* Permanent breakpoints cannot be inserted or removed. */ > continue; > else if (b->type != bp_watchpoint > @@ -733,9 +733,9 @@ insert_breakpoints (void) > && b->type != bp_catch_exec > && b->type != bp_catch_throw > && b->type != bp_catch_catch > - && b->enable != disabled > - && b->enable != shlib_disabled > - && b->enable != call_disabled > + && b->enable_state != bp_disabled > + && b->enable_state != bp_shlib_disabled > + && b->enable_state != bp_call_disabled > && !b->inserted > && !b->duplicate) > { > @@ -774,7 +774,7 @@ insert_breakpoints (void) > { > /* See also: disable_breakpoints_in_shlibs. */ > val = 0; > - b->enable = shlib_disabled; > + b->enable_state = bp_shlib_disabled; > if (!disabled_breaks) > { > target_terminal_ours_for_output (); > @@ -802,9 +802,9 @@ insert_breakpoints (void) > return_val = val; /* remember failure */ > } > else if (ep_is_exception_catchpoint (b) > - && b->enable != disabled > - && b->enable != shlib_disabled > - && b->enable != call_disabled > + && b->enable_state != bp_disabled > + && b->enable_state != bp_shlib_disabled > + && b->enable_state != bp_call_disabled > && !b->inserted > && !b->duplicate) > > @@ -822,7 +822,7 @@ insert_breakpoints (void) > target_terminal_ours_for_output (); > warning ("Cannot insert catchpoint %d; disabling it.", > b->number); > - b->enable = disabled; > + b->enable_state = bp_disabled; > } > else > { > @@ -831,7 +831,7 @@ insert_breakpoints (void) > args_for_catchpoint_enable args; > args.kind = b->type == bp_catch_catch ? > EX_EVENT_CATCH : EX_EVENT_THROW; > - args.enable = 1; > + args.enable_p = 1; > val = catch_errors (cover_target_enable_exception_callback, > &args, > message, RETURN_MASK_ALL); > @@ -846,7 +846,7 @@ insert_breakpoints (void) > target_terminal_ours_for_output (); > warning ("Cannot insert catchpoint %d; disabling it.", > b->number); > - b->enable = disabled; > + b->enable_state = bp_disabled; > } > } > > @@ -857,8 +857,8 @@ insert_breakpoints (void) > else if ((b->type == bp_hardware_watchpoint || > b->type == bp_read_watchpoint || > b->type == bp_access_watchpoint) > - && b->enable == enabled > - && b->disposition != del_at_next_stop > + && b->enable_state == bp_enabled > + && b->disposition != disp_del_at_next_stop > && !b->inserted > && !b->duplicate) > { > @@ -965,8 +965,8 @@ insert_breakpoints (void) > printf_filtered ("because the program has left the block \n"); > printf_filtered ("in which its expression is valid.\n"); > if (b->related_breakpoint) > - b->related_breakpoint->disposition = del_at_next_stop; > - b->disposition = del_at_next_stop; > + b->related_breakpoint->disposition = disp_del_at_next_stop; > + b->disposition = disp_del_at_next_stop; > } > > /* Restore the frame and level. */ > @@ -980,7 +980,7 @@ insert_breakpoints (void) > else if ((b->type == bp_catch_fork > || b->type == bp_catch_vfork > || b->type == bp_catch_exec) > - && b->enable == enabled > + && b->enable_state == bp_enabled > && !b->inserted > && !b->duplicate) > { > @@ -1249,7 +1249,7 @@ remove_breakpoint (struct breakpoint *b, > { > int val; > > - if (b->enable == permanent) > + if (b->enable_state == bp_permanent) > /* Permanent breakpoints cannot be inserted or removed. */ > return 0; > > @@ -1301,7 +1301,7 @@ remove_breakpoint (struct breakpoint *b, > else if ((b->type == bp_hardware_watchpoint || > b->type == bp_read_watchpoint || > b->type == bp_access_watchpoint) > - && b->enable == enabled > + && b->enable_state == bp_enabled > && !b->duplicate) > { > value_ptr v, n; > @@ -1356,7 +1356,7 @@ remove_breakpoint (struct breakpoint *b, > else if ((b->type == bp_catch_fork || > b->type == bp_catch_vfork || > b->type == bp_catch_exec) > - && b->enable == enabled > + && b->enable_state == bp_enabled > && !b->duplicate) > { > val = -1; > @@ -1381,7 +1381,7 @@ remove_breakpoint (struct breakpoint *b, > } > else if ((b->type == bp_catch_catch || > b->type == bp_catch_throw) > - && b->enable == enabled > + && b->enable_state == bp_enabled > && !b->duplicate) > { > > @@ -1392,7 +1392,7 @@ remove_breakpoint (struct breakpoint *b, > } > else if (ep_is_exception_catchpoint (b) > && b->inserted /* sometimes previous insert doesn't happen */ > - && b->enable == enabled > + && b->enable_state == bp_enabled > && !b->duplicate) > { > > @@ -1503,15 +1503,15 @@ breakpoint_here_p (CORE_ADDR pc) > int any_breakpoint_here = 0; > > ALL_BREAKPOINTS (b) > - if ((b->enable == enabled > - || b->enable == permanent) > + if ((b->enable_state == bp_enabled > + || b->enable_state == bp_permanent) > && b->address == pc) /* bp is enabled and matches pc */ > { > if (overlay_debugging && > section_is_overlay (b->section) && > !section_is_mapped (b->section)) > continue; /* unmapped overlay -- can't be a match */ > - else if (b->enable == permanent) > + else if (b->enable_state == bp_permanent) > return permanent_breakpoint_here; > else > any_breakpoint_here = 1; > @@ -1589,9 +1589,9 @@ breakpoint_thread_match (CORE_ADDR pc, p > thread = pid_to_thread_id (ptid); > > ALL_BREAKPOINTS (b) > - if (b->enable != disabled > - && b->enable != shlib_disabled > - && b->enable != call_disabled > + if (b->enable_state != bp_disabled > + && b->enable_state != bp_shlib_disabled > + && b->enable_state != bp_call_disabled > && b->address == pc > && (b->thread == -1 || b->thread == thread)) > { > @@ -2360,8 +2360,8 @@ which its expression is valid.\n", bs->b > #endif > > if (b->related_breakpoint) > - b->related_breakpoint->disposition = del_at_next_stop; > - b->disposition = del_at_next_stop; > + b->related_breakpoint->disposition = disp_del_at_next_stop; > + b->disposition = disp_del_at_next_stop; > > return WP_DELETED; > } > @@ -2408,9 +2408,9 @@ bpstat_stop_status (CORE_ADDR *pc, int n > > ALL_BREAKPOINTS_SAFE (b, temp) > { > - if (b->enable == disabled > - || b->enable == shlib_disabled > - || b->enable == call_disabled) > + if (b->enable_state == bp_disabled > + || b->enable_state == bp_shlib_disabled > + || b->enable_state == bp_call_disabled) > continue; > > if (b->type != bp_watchpoint > @@ -2517,8 +2517,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n > /* Error from catch_errors. */ > printf_filtered ("Watchpoint %d deleted.\n", b->number); > if (b->related_breakpoint) > - b->related_breakpoint->disposition = del_at_next_stop; > - b->disposition = del_at_next_stop; > + b->related_breakpoint->disposition = disp_del_at_next_stop; > + b->disposition = disp_del_at_next_stop; > /* We've already printed what needs to be printed. */ > bs->print_it = print_it_done; > > @@ -2589,8 +2589,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n > /* Error from catch_errors. */ > printf_filtered ("Watchpoint %d deleted.\n", b->number); > if (b->related_breakpoint) > - b->related_breakpoint->disposition = del_at_next_stop; > - b->disposition = del_at_next_stop; > + b->related_breakpoint->disposition = disp_del_at_next_stop; > + b->disposition = disp_del_at_next_stop; > /* We've already printed what needs to be printed. */ > bs->print_it = print_it_done; > break; > @@ -2649,8 +2649,8 @@ bpstat_stop_status (CORE_ADDR *pc, int n > else > { > /* We will stop here */ > - if (b->disposition == disable) > - b->enable = disabled; > + if (b->disposition == disp_disable) > + b->enable_state = bp_disabled; > bs->commands = b->commands; > if (b->silent) > bs->print = 0; > @@ -2991,7 +2991,7 @@ bpstat_should_step (void) > { > struct breakpoint *b; > ALL_BREAKPOINTS (b) > - if (b->enable == enabled && b->type == bp_watchpoint) > + if (b->enable_state == bp_enabled && b->type == bp_watchpoint) > return 1; > return 0; > } > @@ -3002,7 +3002,7 @@ bpstat_have_active_hw_watchpoints (void) > { > struct breakpoint *b; > ALL_BREAKPOINTS (b) > - if ((b->enable == enabled) && > + if ((b->enable_state == bp_enabled) && > (b->inserted) && > ((b->type == bp_hardware_watchpoint) || > (b->type == bp_read_watchpoint) || > @@ -3161,10 +3161,10 @@ print_one_breakpoint (struct breakpoint > /* 4 */ > annotate_field (3); > #ifdef UI_OUT > - ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int) b->enable]); > + ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int) b->enable_state]); > ui_out_spaces (uiout, 2); > #else > - printf_filtered ("%-3c ", bpenables[(int) b->enable]); > + printf_filtered ("%-3c ", bpenables[(int) b->enable_state]); > #endif > > /* 5 and 6 */ > @@ -3708,10 +3708,10 @@ describe_other_breakpoints (CORE_ADDR pc > others--; > printf_filtered ("%d%s%s ", > b->number, > - ((b->enable == disabled || > - b->enable == shlib_disabled || > - b->enable == call_disabled) ? " (disabled)" > - : b->enable == permanent ? " (permanent)" > + ((b->enable_state == bp_disabled || > + b->enable_state == bp_shlib_disabled || > + b->enable_state == bp_call_disabled) ? " (disabled)" > + : b->enable_state == bp_permanent ? " (permanent)" > : ""), > (others > 1) ? "," > : ((others == 1) ? " and" : "")); > @@ -3788,15 +3788,15 @@ check_duplicates (struct breakpoint *bpt > return; > > ALL_BREAKPOINTS (b) > - if (b->enable != disabled > - && b->enable != shlib_disabled > - && b->enable != call_disabled > + if (b->enable_state != bp_disabled > + && b->enable_state != bp_shlib_disabled > + && b->enable_state != bp_call_disabled > && b->address == address > && (overlay_debugging == 0 || b->section == section) > && breakpoint_address_is_meaningful (b)) > { > /* Have we found a permanent breakpoint? */ > - if (b->enable == permanent) > + if (b->enable_state == bp_permanent) > { > perm_bp = b; > break; > @@ -3827,9 +3827,9 @@ check_duplicates (struct breakpoint *bpt > "another breakpoint was inserted on top of " > "a permanent breakpoint"); > > - if (b->enable != disabled > - && b->enable != shlib_disabled > - && b->enable != call_disabled > + if (b->enable_state != bp_disabled > + && b->enable_state != bp_shlib_disabled > + && b->enable_state != bp_call_disabled > && b->address == address > && (overlay_debugging == 0 || b->section == section) > && breakpoint_address_is_meaningful (b)) > @@ -3872,7 +3872,7 @@ set_raw_breakpoint (struct symtab_and_li > b->input_radix = input_radix; > b->thread = -1; > b->line_number = sal.line; > - b->enable = enabled; > + b->enable_state = bp_enabled; > b->next = 0; > b->silent = 0; > b->ignore_count = 0; > @@ -3909,7 +3909,7 @@ set_raw_breakpoint (struct symtab_and_li > void > make_breakpoint_permanent (struct breakpoint *b) > { > - b->enable = permanent; > + b->enable_state = bp_permanent; > > /* By definition, permanent breakpoints are already present in the code. */ > b->inserted = 1; > @@ -3939,8 +3939,8 @@ create_longjmp_breakpoint (char *func_na > b = set_raw_breakpoint (sal, > func_name != NULL ? bp_longjmp : bp_longjmp_resume); > > - b->disposition = donttouch; > - b->enable = disabled; > + b->disposition = disp_donttouch; > + b->enable_state = bp_disabled; > b->silent = 1; > if (func_name) > b->addr_string = xstrdup (func_name); > @@ -3961,7 +3961,7 @@ enable_longjmp_breakpoint (void) > ALL_BREAKPOINTS (b) > if (b->type == bp_longjmp) > { > - b->enable = enabled; > + b->enable_state = bp_enabled; > check_duplicates (b); > } > } > @@ -3975,7 +3975,7 @@ disable_longjmp_breakpoint (void) > if (b->type == bp_longjmp > || b->type == bp_longjmp_resume) > { > - b->enable = disabled; > + b->enable_state = bp_disabled; > check_duplicates (b); > } > } > @@ -3993,8 +3993,8 @@ create_thread_event_breakpoint (CORE_ADD > b = set_raw_breakpoint (sal, bp_thread_event); > > b->number = internal_breakpoint_number--; > - b->disposition = donttouch; > - b->enable = enabled; > + b->disposition = disp_donttouch; > + b->enable_state = bp_enabled; > /* addr_string has to be used or breakpoint_re_set will delete me. */ > sprintf (addr_string, "*0x%s", paddr (b->address)); > b->addr_string = xstrdup (addr_string); > @@ -4034,7 +4034,7 @@ create_solib_event_breakpoint (CORE_ADDR > sal.section = find_pc_overlay (sal.pc); > b = set_raw_breakpoint (sal, bp_shlib_event); > b->number = internal_breakpoint_number--; > - b->disposition = donttouch; > + b->disposition = disp_donttouch; > > return b; > } > @@ -4054,11 +4054,11 @@ disable_breakpoints_in_shlibs (int silen > #if defined (PC_SOLIB) > if (((b->type == bp_breakpoint) || > (b->type == bp_hardware_breakpoint)) && > - b->enable == enabled && > + b->enable_state == bp_enabled && > !b->duplicate && > PC_SOLIB (b->address)) > { > - b->enable = shlib_disabled; > + b->enable_state = bp_shlib_disabled; > if (!silent) > { > if (!disabled_shlib_breaks) > @@ -4081,14 +4081,14 @@ re_enable_breakpoints_in_shlibs (void) > struct breakpoint *b; > > ALL_BREAKPOINTS (b) > - if (b->enable == shlib_disabled) > + if (b->enable_state == bp_shlib_disabled) > { > char buf[1]; > > /* Do not reenable the breakpoint if the shared library > is still not mapped in. */ > if (target_read_memory (b->address, buf, 1) == 0) > - b->enable = enabled; > + b->enable_state = bp_enabled; > } > } > > @@ -4155,8 +4155,8 @@ solib_load_unload_1 (char *hookname, int > else if (addr_start) > b->addr_string = savestring (addr_start, addr_end - addr_start); > > - b->enable = enabled; > - b->disposition = tempflag ? del : donttouch; > + b->enable_state = bp_enabled; > + b->disposition = tempflag ? disp_del : disp_donttouch; > > if (dll_pathname == NULL) > b->dll_pathname = NULL; > @@ -4207,8 +4207,8 @@ create_fork_vfork_event_catchpoint (int > NULL : savestring (cond_string, strlen (cond_string)); > b->thread = thread; > b->addr_string = NULL; > - b->enable = enabled; > - b->disposition = tempflag ? del : donttouch; > + b->enable_state = bp_enabled; > + b->disposition = tempflag ? disp_del : disp_donttouch; > b->forked_inferior_pid = 0; > > mention (b); > @@ -4246,8 +4246,8 @@ create_exec_event_catchpoint (int tempfl > NULL : savestring (cond_string, strlen (cond_string)); > b->thread = thread; > b->addr_string = NULL; > - b->enable = enabled; > - b->disposition = tempflag ? del : donttouch; > + b->enable_state = bp_enabled; > + b->disposition = tempflag ? disp_del : disp_donttouch; > > mention (b); > } > @@ -4260,7 +4260,7 @@ hw_breakpoint_used_count (void) > > ALL_BREAKPOINTS (b) > { > - if (b->type == bp_hardware_breakpoint && b->enable == enabled) > + if (b->type == bp_hardware_breakpoint && b->enable_state == bp_enabled) > i++; > } > > @@ -4276,14 +4276,14 @@ hw_watchpoint_used_count (enum bptype ty > *other_type_used = 0; > ALL_BREAKPOINTS (b) > { > - if (b->enable == enabled) > + if (b->enable_state == bp_enabled) > { > if (b->type == type) > i++; > else if ((b->type == bp_hardware_watchpoint || > b->type == bp_read_watchpoint || > b->type == bp_access_watchpoint) > - && b->enable == enabled) > + && b->enable_state == bp_enabled) > *other_type_used = 1; > } > } > @@ -4305,7 +4305,7 @@ set_longjmp_resume_breakpoint (CORE_ADDR > if (b->type == bp_longjmp_resume) > { > b->address = pc; > - b->enable = enabled; > + b->enable_state = bp_enabled; > if (frame != NULL) > b->frame = frame->frame; > else > @@ -4327,9 +4327,9 @@ disable_watchpoints_before_interactive_c > || (b->type == bp_read_watchpoint) > || (b->type == bp_access_watchpoint) > || ep_is_exception_catchpoint (b)) > - && (b->enable == enabled)) > + && (b->enable_state == bp_enabled)) > { > - b->enable = call_disabled; > + b->enable_state = bp_call_disabled; > check_duplicates (b); > } > } > @@ -4347,9 +4347,9 @@ enable_watchpoints_after_interactive_cal > || (b->type == bp_read_watchpoint) > || (b->type == bp_access_watchpoint) > || ep_is_exception_catchpoint (b)) > - && (b->enable == call_disabled)) > + && (b->enable_state == bp_call_disabled)) > { > - b->enable = enabled; > + b->enable_state = bp_enabled; > check_duplicates (b); > } > } > @@ -4366,8 +4366,8 @@ set_momentary_breakpoint (struct symtab_ > { > register struct breakpoint *b; > b = set_raw_breakpoint (sal, type); > - b->enable = enabled; > - b->disposition = donttouch; > + b->enable_state = bp_enabled; > + b->disposition = disp_donttouch; > b->frame = (frame ? frame->frame : 0); > > /* If we're debugging a multi-threaded program, then we > @@ -4597,7 +4597,7 @@ create_breakpoints (struct symtabs_and_l > b->addr_string = addr_string[i]; > b->cond_string = cond_string[i]; > b->ignore_count = ignore_count; > - b->enable = enabled; > + b->enable_state = bp_enabled; > b->disposition = disposition; > mention (b); > } > @@ -4822,7 +4822,7 @@ break_command_1 (char *arg, int flag, in > > create_breakpoints (sals, addr_string, cond, cond_string, > hardwareflag ? bp_hardware_breakpoint : bp_breakpoint, > - tempflag ? del : donttouch, > + tempflag ? disp_del : disp_donttouch, > thread, ignore_count, from_tty); > > if (sals.nelts > 1) > @@ -4934,7 +4934,7 @@ do_captured_breakpoint (void *data) > > create_breakpoints (sals, addr_string, cond, cond_string, > args->hardwareflag ? bp_hardware_breakpoint : bp_breakpoint, > - args->tempflag ? del : donttouch, > + args->tempflag ? disp_del : disp_donttouch, > args->thread, args->ignore_count, 0/*from-tty*/); > > /* That's it. Discard the cleanups for data inserted into the > @@ -5400,7 +5400,7 @@ watch_command_1 (char *arg, int accessfl > b = set_raw_breakpoint (sal, bp_type); > set_breakpoint_count (breakpoint_count + 1); > b->number = breakpoint_count; > - b->disposition = donttouch; > + b->disposition = disp_donttouch; > b->exp = exp; > b->exp_valid_block = exp_valid_block; > b->exp_string = savestring (exp_start, exp_end - exp_start); > @@ -5439,10 +5439,10 @@ watch_command_1 (char *arg, int accessfl > set_breakpoint_count (breakpoint_count + 1); > scope_breakpoint->number = breakpoint_count; > > - scope_breakpoint->enable = enabled; > + scope_breakpoint->enable_state = bp_enabled; > > /* Automatically delete the breakpoint when it hits. */ > - scope_breakpoint->disposition = del; > + scope_breakpoint->disposition = disp_del; > > /* Only break in the proper frame (help with recursion). */ > scope_breakpoint->frame = prev_frame->frame; > @@ -6193,8 +6193,8 @@ create_exception_catchpoint (int tempfla > NULL : savestring (cond_string, strlen (cond_string)); > b->thread = thread; > b->addr_string = NULL; > - b->enable = enabled; > - b->disposition = tempflag ? del : donttouch; > + b->enable_state = bp_enabled; > + b->disposition = tempflag ? disp_del : disp_donttouch; > mention (b); > } > > @@ -6257,7 +6257,7 @@ cover_target_enable_exception_callback ( > { > args_for_catchpoint_enable *args = arg; > struct symtab_and_line *sal; > - sal = target_enable_exception_callback (args->kind, args->enable); > + sal = target_enable_exception_callback (args->kind, args->enable_p); > if (sal == NULL) > return 0; > else if (sal == (struct symtab_and_line *) -1) > @@ -6357,8 +6357,8 @@ handle_gnu_4_16_catch_command (char *arg > b->number = breakpoint_count; > > b->cond = cond; > - b->enable = enabled; > - b->disposition = tempflag ? del : donttouch; > + b->enable_state = bp_enabled; > + b->disposition = tempflag ? disp_del : disp_donttouch; > > mention (b); > } > @@ -6387,8 +6387,8 @@ create_temp_exception_breakpoint (CORE_A > > b = set_raw_breakpoint (sal, bp_breakpoint); > > - b->disposition = del; > - b->enable = enabled; > + b->disposition = disp_del; > + b->enable_state = bp_enabled; > b->silent = 1; > b->number = internal_breakpoint_number--; > return b; > @@ -6712,13 +6712,13 @@ breakpoint_auto_delete (bpstat bs) > struct breakpoint *b, *temp; > > for (; bs; bs = bs->next) > - if (bs->breakpoint_at && bs->breakpoint_at->disposition == del > + if (bs->breakpoint_at && bs->breakpoint_at->disposition == disp_del > && bs->stop) > delete_breakpoint (bs->breakpoint_at); > > ALL_BREAKPOINTS_SAFE (b, temp) > { > - if (b->disposition == del_at_next_stop) > + if (b->disposition == disp_del_at_next_stop) > delete_breakpoint (b); > } > } > @@ -6778,7 +6778,7 @@ delete_breakpoint (struct breakpoint *bp > sprintf (message, message1, bpt->number); > args.kind = bpt->type == bp_catch_catch ? > EX_EVENT_CATCH : EX_EVENT_THROW; > - args.enable = 0; > + args.enable_p = 0; > catch_errors (cover_target_enable_exception_callback, &args, > message, RETURN_MASK_ALL); > } > @@ -6826,9 +6826,9 @@ delete_breakpoint (struct breakpoint *bp > if (b->address == bpt->address > && b->section == bpt->section > && !b->duplicate > - && b->enable != disabled > - && b->enable != shlib_disabled > - && b->enable != call_disabled) > + && b->enable_state != bp_disabled > + && b->enable_state != bp_shlib_disabled > + && b->enable_state != bp_call_disabled) > { > int val; > > @@ -6836,7 +6836,7 @@ delete_breakpoint (struct breakpoint *bp > breakpoint at the same address as the one being deleted. > If there is a permanent breakpoint somewhere, it should > always be the only one inserted. */ > - if (b->enable == permanent) > + if (b->enable_state == bp_permanent) > internal_error (__FILE__, __LINE__, > "another breakpoint was inserted on top of " > "a permanent breakpoint"); > @@ -6972,7 +6972,7 @@ breakpoint_re_set_one (PTR bint) > int i; > struct symtabs_and_lines sals; > char *s; > - enum enable save_enable; > + enum enable_state save_enable; > > switch (b->type) > { > @@ -6992,8 +6992,8 @@ breakpoint_re_set_one (PTR bint) > } > /* In case we have a problem, disable this breakpoint. We'll restore > its status if we succeed. */ > - save_enable = b->enable; > - b->enable = disabled; > + save_enable = b->enable_state; > + b->enable_state = bp_disabled; > > set_language (b->language); > input_radix = b->input_radix; > @@ -7049,7 +7049,7 @@ breakpoint_re_set_one (PTR bint) > breakpoints_changed (); > } > b->section = sals.sals[i].section; > - b->enable = save_enable; /* Restore it, this worked. */ > + b->enable_state = save_enable; /* Restore it, this worked. */ > > > /* Now that this is re-enabled, check_duplicates > @@ -7093,7 +7093,7 @@ breakpoint_re_set_one (PTR bint) > xfree (b->cond); > b->cond = parse_exp_1 (&s, (struct block *) 0, 0); > } > - if (b->enable == enabled) > + if (b->enable_state == bp_enabled) > mention (b); > value_free_to_mark (mark); > break; > @@ -7314,10 +7314,10 @@ disable_breakpoint (struct breakpoint *b > return; > > /* You can't disable permanent breakpoints. */ > - if (bpt->enable == permanent) > + if (bpt->enable_state == bp_permanent) > return; > > - bpt->enable = disabled; > + bpt->enable_state = bp_disabled; > > check_duplicates (bpt); > > @@ -7381,8 +7381,8 @@ do_enable_breakpoint (struct breakpoint > error ("Hardware breakpoints used exceeds limit."); > } > > - if (bpt->enable != permanent) > - bpt->enable = enabled; > + if (bpt->enable_state != bp_permanent) > + bpt->enable_state = bp_enabled; > bpt->disposition = disposition; > check_duplicates (bpt); > breakpoints_changed (); > @@ -7406,7 +7406,7 @@ do_enable_breakpoint (struct breakpoint > printf_filtered ("\ > Cannot enable watchpoint %d because the block in which its expression\n\ > is valid is not currently in scope.\n", bpt->number); > - bpt->enable = disabled; > + bpt->enable_state = bp_disabled; > return; > } > > @@ -7440,7 +7440,7 @@ is valid is not currently in scope.\n", > printf_filtered ("\ > Cannot enable watchpoint %d because target watch resources\n\ > have been allocated for other watchpoints.\n", bpt->number); > - bpt->enable = disabled; > + bpt->enable_state = bp_disabled; > value_free_to_mark (mark); > return; > } > @@ -7502,7 +7502,7 @@ enable_command (char *args, int from_tty > static void > enable_once_breakpoint (struct breakpoint *bpt) > { > - do_enable_breakpoint (bpt, disable); > + do_enable_breakpoint (bpt, disp_disable); > } > > /* ARGSUSED */ > @@ -7515,7 +7515,7 @@ enable_once_command (char *args, int fro > static void > enable_delete_breakpoint (struct breakpoint *bpt) > { > - do_enable_breakpoint (bpt, del); > + do_enable_breakpoint (bpt, disp_del); > } > > /* ARGSUSED */ > > > --- gdb/memattr.h~0 Thu Mar 1 23:56:34 2001 > +++ gdb/memattr.h Sat Jul 14 12:17:06 2001 > @@ -60,8 +60,8 @@ struct mem_region > /* Item number of this memory region. */ > int number; > > - /* Status of this memory region (enabled or disabled) */ > - int status; > + /* Status of this memory region (enabled if non-zero, otherwise disabled) */ > + int enabled_p; > > /* Attributes for this region */ > struct mem_attrib attrib; > > > --- gdb/memattr.c~0 Tue Mar 27 22:36:22 2001 > +++ gdb/memattr.c Sat Jul 14 12:15:44 2001 > @@ -8,16 +8,6 @@ > #include "language.h" > #include "gdb_string.h" > > -/* FIXME: While this conflicts with the enum defined in breakpoint.h, > - I used them to be consistant with how breakpoints, tracepoints, and > - displays are implemented. It doesn't lose now because breakpoint.h > - is not included. */ > -enum enable > -{ > - disabled, > - enabled > -}; > - > const struct mem_attrib default_mem_attrib = > { > MEM_RW, /* mode */ > @@ -58,7 +48,7 @@ create_mem_region (CORE_ADDR lo, CORE_AD > new->lo = lo; > new->hi = hi; > new->number = ++mem_number; > - new->status = enabled; > + new->enabled_p = 1; > new->attrib = *attrib; > > /* link in new node */ > @@ -97,7 +87,7 @@ lookup_mem_region (CORE_ADDR addr) > > for (m = mem_region_chain; m; m = m->next) > { > - if (m->status == enabled) > + if (m->enabled_p == 1) > { > if (addr >= m->lo && addr < m->hi) > return m; > @@ -214,7 +204,7 @@ mem_info_command (char *args, int from_t > { > printf_filtered ("%d: %c\t", > m->number, > - m->status ? 'y' : 'n'); > + m->enabled_p ? 'y' : 'n'); > printf_filtered ("%s - ", > local_hex_string_custom ((unsigned long) m->lo, "08l")); > printf_filtered ("%s\t", > @@ -300,7 +290,7 @@ mem_enable (int num) > for (m = mem_region_chain; m; m = m->next) > if (m->number == num) > { > - m->status = enabled; > + m->enabled_p = 1; > return; > } > printf_unfiltered ("No memory region number %d.\n", num); > @@ -319,7 +309,7 @@ mem_enable_command (char *args, int from > if (p == 0) > { > for (m = mem_region_chain; m; m = m->next) > - m->status = enabled; > + m->enabled_p = 1; > } > else > while (*p) > @@ -350,7 +340,7 @@ mem_disable (int num) > for (m = mem_region_chain; m; m = m->next) > if (m->number == num) > { > - m->status = disabled; > + m->enabled_p = 0; > return; > } > printf_unfiltered ("No memory region number %d.\n", num); > @@ -369,7 +359,7 @@ mem_disable_command (char *args, int fro > if (p == 0) > { > for (m = mem_region_chain; m; m = m->next) > - m->status = disabled; > + m->enabled_p = 0; > } > else > while (*p) > > > --- gdb/tracepoint.h~0 Tue Mar 6 10:21:16 2001 > +++ gdb/tracepoint.h Sat Jul 14 12:29:56 2001 > @@ -21,12 +21,6 @@ > #if !defined (TRACEPOINT_H) > #define TRACEPOINT_H 1 > > -#if !defined (BREAKPOINT_H) > -enum enable > - { > - disabled, enabled > - }; > -#endif > /* The data structure for an action: */ > struct action_line > { > @@ -40,7 +34,7 @@ > { > struct tracepoint *next; > > - enum enable enabled; > + int enabled_p; > > #if 0 > /* Type of tracepoint (MVS FIXME: needed?). */ > > > --- gdb/tracepoint.c~0 Tue Apr 17 23:16:30 2001 > +++ gdb/tracepoint.c Sat Jul 14 12:30:52 2001 > @@ -355,7 +355,7 @@ set_raw_tracepoint (struct symtab_and_li > t->language = current_language->la_language; > t->input_radix = input_radix; > t->line_number = sal.line; > - t->enabled = enabled; > + t->enabled_p = 1; > t->next = 0; > t->step_count = 0; > t->pass_count = 0; > @@ -496,7 +496,7 @@ tracepoints_info (char *tpnum_exp, int f > } > > printf_filtered ("%-3d %-3s ", t->number, > - t->enabled == enabled ? "y" : "n"); > + t->enabled_p ? "y" : "n"); > if (addressprint) > { > char *tmp; > @@ -571,12 +571,12 @@ tracepoint_operation (struct tracepoint > switch (opcode) > { > case enable_op: > - t->enabled = enabled; > + t->enabled_p = 1; > if (modify_tracepoint_hook) > modify_tracepoint_hook (t); > break; > case disable_op: > - t->enabled = disabled; > + t->enabled_p = 0; > if (modify_tracepoint_hook) > modify_tracepoint_hook (t); > break; > @@ -1743,7 +1743,7 @@ trace_start_command (char *args, int fro > > sprintf_vma (tmp, t->address); > sprintf (buf, "QTDP:%x:%s:%c:%lx:%x", t->number, tmp, /* address */ > - t->enabled == enabled ? 'E' : 'D', > + t->enabled_p ? 'E' : 'D', > t->step_count, t->pass_count); > > if (t->actions) > > > --- gdb/printcmd.c~0 Sat May 12 07:08:22 2001 > +++ gdb/printcmd.c Sat Jul 14 12:23:40 2001 > @@ -111,7 +111,7 @@ struct display > /* Innermost block required by this expression when evaluated */ > struct block *block; > /* Status of this display (enabled or disabled) */ > - enum enable status; > + int enabled_p; > }; > > /* Chain of expressions whose values should be displayed > @@ -1427,7 +1427,7 @@ display_command (char *exp, int from_tty > new->next = display_chain; > new->number = ++display_number; > new->format = fmt; > - new->status = enabled; > + new->enabled_p = 1; > display_chain = new; > > if (from_tty && target_has_execution) > @@ -1538,7 +1538,7 @@ do_one_display (struct display *d) > { > int within_current_scope; > > - if (d->status == disabled) > + if (d->enabled_p == 0) > return; > > if (d->block) > @@ -1638,7 +1638,7 @@ disable_display (int num) > for (d = display_chain; d; d = d->next) > if (d->number == num) > { > - d->status = disabled; > + d->enabled_p = 0; > return; > } > printf_unfiltered ("No display number %d.\n", num); > @@ -1669,7 +1669,7 @@ Num Enb Expression\n"); > > for (d = display_chain; d; d = d->next) > { > - printf_filtered ("%d: %c ", d->number, "ny"[(int) d->status]); > + printf_filtered ("%d: %c ", d->number, "ny"[(int) d->enabled_p]); > if (d->format.size) > printf_filtered ("/%d%c%c ", d->format.count, d->format.size, > d->format.format); > @@ -1694,7 +1694,7 @@ enable_display (char *args, int from_tty > if (p == 0) > { > for (d = display_chain; d; d = d->next) > - d->status = enabled; > + d->enabled_p = 1; > } > else > while (*p) > @@ -1710,7 +1710,7 @@ enable_display (char *args, int from_tty > for (d = display_chain; d; d = d->next) > if (d->number == num) > { > - d->status = enabled; > + d->enabled_p = 1; > goto win; > } > printf_unfiltered ("No display number %d.\n", num); > @@ -1732,7 +1732,7 @@ disable_display_command (char *args, int > if (p == 0) > { > for (d = display_chain; d; d = d->next) > - d->status = disabled; > + d->enabled_p = 0; > } > else > while (*p) > > > --- gdb/infcmd.c~0 Wed May 16 23:05:48 2001 > +++ gdb/infcmd.c Sat Jul 14 13:16:06 2001 > @@ -893,7 +893,7 @@ run_stack_dummy (CORE_ADDR addr, char *b > bpt = set_momentary_breakpoint (sal, > get_current_frame (), > bp_call_dummy); > - bpt->disposition = del; > + bpt->disposition = disp_del; > > /* If all error()s out of proceed ended up calling normal_stop (and > perhaps they should; it already does in the special case of error > > > --- gdb/go32-nat.c~3 Tue Jul 10 20:40:20 2001 > +++ gdb/go32-nat.c Sat Jul 14 12:04:50 2001 > @@ -41,10 +41,7 @@ > #include <unistd.h> > #include <sys/utsname.h> > #include <io.h> > -/* breakpoint.h defines `disable' which is an enum member. */ > -#define disable interrup_disable > #include <dos.h> > -#undef disable > #include <dpmi.h> > #include <go32.h> > #include <debug/v2load.h> > > > > 2001-07-14 Eli Zaretskii <eliz@is.elta.co.il> > > * tuiSourceWin.c: Use disp_del instead of del. > > * tuiSource.c: Use disp_del instead of del. > > * tuiDisassem.c: Use disp_del instead of del. > > > --- gdb/tui/tuiDisassem.c~0 Sun May 28 04:12:42 2000 > +++ gdb/tui/tuiDisassem.c Sat Jul 14 13:18:18 2001 > @@ -112,7 +112,7 @@ extern void strcat_address_numeric (CORE > element->whichElement.source.hasBreak = > (bp != (struct breakpoint *) NULL && > (!element->whichElement.source.isExecPoint || > - (bp->disposition != del || bp->hit_count <= 0))); > + (bp->disposition != disp_del || bp->hit_count <= 0))); > curLine++; > pc = newpc; > /* reset the buffer to empty */ > > > --- gdb/tui/tuiSource.c~0 Sun May 28 04:12:42 2000 > +++ gdb/tui/tuiSource.c Sat Jul 14 13:20:46 2001 > @@ -165,8 +165,8 @@ tuiSetSourceContent (s, lineNo, noerror) > element->whichElement.source.hasBreak = > (bp != (struct breakpoint *) NULL && > (!element->whichElement.source.isExecPoint || > - (bp->disposition != del || bp->hit_count <= 0))); > + (bp->disposition != disp_del || bp->hit_count <= 0))); > if (c != EOF) > { > i = strlen (srcLine) - 1; > > > --- gdb/tui/tuiSourceWin.c~0 Wed Jul 7 23:19:30 1999 > +++ gdb/tui/tuiSourceWin.c Sat Jul 14 13:19:42 2001 > @@ -756,7 +756,7 @@ tuiSetExecInfoContent (winInfo) > srcElement->whichElement.source.lineOrAddr.addr); > if (found) > srcElement->whichElement.source.hasBreak = > - (bp->disposition != del || bp->hit_count <= 0); > + (bp->disposition != disp_del || bp->hit_count <= 0); > } > if (!found) > srcElement->whichElement.source.hasBreak = FALSE; > ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2001-08-02 5:07 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <Pine.SUN.3.91.1010711161311.5321C-100000@is>
[not found] ` <3B4E41B5.64FB@redhat.com>
2001-07-14 4:08 ` [RFA] enum enable Eli Zaretskii
2001-07-16 14:52 ` Jim Blandy
2001-07-16 15:53 ` Andrew Cagney
2001-07-17 0:06 ` Eli Zaretskii
2001-07-17 10:45 ` Jim Blandy
[not found] ` <200107180700.KAA12466@is.elta.co.il>
2001-07-18 0:34 ` Daniel Berlin
2001-07-18 10:15 ` Jim Blandy
2001-07-18 12:59 ` Eli Zaretskii
2001-07-19 5:57 ` Michael Snyder
2001-07-19 6:13 ` Eli Zaretskii
[not found] ` <npzoa4y1hp.fsf@zwingli.cygnus.com>
2001-07-17 0:07 ` Eli Zaretskii
2001-07-25 7:28 ` Eli Zaretskii
2001-07-30 16:24 ` Jim Blandy
2001-07-31 1:45 ` Eli Zaretskii
2001-07-31 16:24 ` Jim Blandy
2001-07-31 16:33 ` Jim Blandy
2001-08-01 1:53 ` Eli Zaretskii
2001-08-01 14:05 ` Andrew Cagney
2001-08-01 21:52 ` Jim Blandy
2001-08-02 5:07 ` Eli Zaretskii
2001-07-29 0:49 ` Eli Zaretskii
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox