struct breakpoint *b;
struct minimal_symbol *m;
- if ((m = lookup_minimal_symbol_text (func_name, objfile)) == NULL)
+ m = lookup_minimal_symbol_text (func_name, objfile);
+ if (m == NULL)
return;
b = create_internal_breakpoint (SYMBOL_VALUE_ADDRESS (m),
for (; bsp != NULL; bsp = bsp->next)
{
- if ((bsp->breakpoint_at != NULL) &&
- (bsp->breakpoint_at->owner->type == bp_step_resume) &&
- (bsp->breakpoint_at->owner->thread == current_thread ||
- bsp->breakpoint_at->owner->thread == -1))
+ if ((bsp->breakpoint_at != NULL)
+ && (bsp->breakpoint_at->owner->type == bp_step_resume)
+ && (bsp->breakpoint_at->owner->thread == current_thread
+ || bsp->breakpoint_at->owner->thread == -1))
return bsp->breakpoint_at->owner;
}
if (b->silent)
bs->print = 0;
bs->commands = b->commands;
- if (bs->commands &&
- (strcmp ("silent", bs->commands->line) == 0
- || (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
+ if (bs->commands
+ && (strcmp ("silent", bs->commands->line) == 0
+ || (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
{
bs->commands = bs->commands->next;
bs->print = 0;
ui_out_field_int (uiout, "ignore", b->ignore_count);
ui_out_text (uiout, " hits\n");
}
-
- if (!part_of_multiple && (l = b->commands))
+
+ l = b->commands;
+ if (!part_of_multiple && l)
{
struct cleanup *script_chain;
else if (b->thread != -1)
printf_filtered (" (thread %d)", b->thread);
printf_filtered ("%s%s ",
- ((b->enable_state == bp_disabled ||
- b->enable_state == bp_call_disabled)
+ ((b->enable_state == bp_disabled
+ || b->enable_state == bp_call_disabled)
? " (disabled)"
: b->enable_state == bp_permanent
? " (permanent)"
{
struct minimal_symbol *m;
- if ((m = lookup_minimal_symbol_text (func_name, NULL)) == NULL)
+ m = lookup_minimal_symbol_text (func_name, NULL);
+ if (m == NULL)
return;
set_momentary_breakpoint_at_pc (SYMBOL_VALUE_ADDRESS (m), bp_longjmp);
update_global_location_list (1);
{
if (b->type == type)
i++;
- else if ((b->type == bp_hardware_watchpoint ||
- b->type == bp_read_watchpoint ||
- b->type == bp_access_watchpoint))
+ else if ((b->type == bp_hardware_watchpoint
+ || b->type == bp_read_watchpoint
+ || b->type == bp_access_watchpoint))
*other_type_used = 1;
}
}
if (find_pc_partial_function (pc, &this_function,
&func_addr, &func_end))
{
- if (this_function &&
- strcmp (this_function, original_function) != 0)
+ if (this_function
+ && strcmp (this_function, original_function) != 0)
{
remove_sal (&expanded, i);
--i;
/* If pending breakpoint support is auto query and the user
selects no, then simply return the error code. */
- if (pending_break_support == AUTO_BOOLEAN_AUTO &&
- !nquery ("Make breakpoint pending on future shared library load? "))
+ if (pending_break_support == AUTO_BOOLEAN_AUTO
+ && !nquery ("Make breakpoint pending on future shared library load? "))
return;
/* At this point, either the user was queried about setting
if ((*arg != '\0') && !isspace (*arg))
error (_("Junk at end of arguments."));
- if ((ex_event != EX_EVENT_THROW) &&
- (ex_event != EX_EVENT_CATCH))
+ if (ex_event != EX_EVENT_THROW
+ && ex_event != EX_EVENT_CATCH)
error (_("Unsupported or unknown exception event; cannot catch it"));
if (handle_gnu_v3_exceptions (tempflag, cond_string, ex_event, from_tty))
have to be deleted with an explicit breakpoint number argument. */
ALL_BREAKPOINTS (b)
{
- if (b->type != bp_call_dummy &&
- b->type != bp_shlib_event &&
- b->type != bp_thread_event &&
- b->type != bp_overlay_event &&
- b->number >= 0)
+ if (b->type != bp_call_dummy
+ && b->type != bp_shlib_event
+ && b->type != bp_thread_event
+ && b->type != bp_overlay_event
+ && b->number >= 0)
{
breaks_to_delete = 1;
break;
{
ALL_BREAKPOINTS_SAFE (b, temp)
{
- if (b->type != bp_call_dummy &&
- b->type != bp_shlib_event &&
- b->type != bp_thread_event &&
- b->type != bp_overlay_event &&
- b->number >= 0)
+ if (b->type != bp_call_dummy
+ && b->type != bp_shlib_event
+ && b->type != bp_thread_event
+ && b->type != bp_overlay_event
+ && b->number >= 0)
delete_breakpoint (b);
}
}
error (_("Hardware breakpoints used exceeds limit."));
}
- if (bpt->type == bp_watchpoint ||
- bpt->type == bp_hardware_watchpoint ||
- bpt->type == bp_read_watchpoint ||
- bpt->type == bp_access_watchpoint)
+ if (bpt->type == bp_watchpoint
+ || bpt->type == bp_hardware_watchpoint
+ || bpt->type == bp_read_watchpoint
+ || bpt->type == bp_access_watchpoint)
{
struct gdb_exception e;
{
ALL_BREAKPOINTS_SAFE (b, temp)
{
- if (b->type == bp_tracepoint &&
- b->number >= 0)
+ if (b->type == bp_tracepoint
+ && b->number >= 0)
delete_breakpoint (b);
}
}
pathname = tilde_expand (args);
cleanup = make_cleanup (xfree, pathname);
- if (!(fp = fopen (pathname, "w")))
+ fp = fopen (pathname, "w");
+ if (!fp)
error (_("Unable to open file '%s' for saving tracepoints (%s)"),
args, safe_strerror (errno));
make_cleanup_fclose (fp);