gdb: fix some indentation issues
I wrote a small script to spot a pattern of indentation mistakes I saw happened in breakpoint.c. And while at it I ran it on all files and fixed what I found. No behavior changes intended, just indentation and addition / removal of curly braces. gdb/ChangeLog: * Fix some indentation mistakes throughout. gdbserver/ChangeLog: * Fix some indentation mistakes throughout. Change-Id: Ia01990c26c38e83a243d8f33da1d494f16315c6e
This commit is contained in:
parent
055c879fcf
commit
01add95bed
@ -1,3 +1,7 @@
|
||||
2021-05-27 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* Fix some indentation mistakes throughout.
|
||||
|
||||
2021-05-27 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* breakpoint.h (iterate_over_bp_locations): Remove. Update
|
||||
|
@ -1617,8 +1617,9 @@ breakpoint_xfer_memory (gdb_byte *readbuf, gdb_byte *writebuf,
|
||||
content. */
|
||||
|
||||
if (bl->address >= bp_locations_placed_address_before_address_max
|
||||
&& memaddr + len <= (bl->address
|
||||
- bp_locations_placed_address_before_address_max))
|
||||
&& (memaddr + len
|
||||
<= (bl->address
|
||||
- bp_locations_placed_address_before_address_max)))
|
||||
break;
|
||||
|
||||
if (!bp_location_has_shadow (bl))
|
||||
@ -3079,10 +3080,9 @@ remove_breakpoints (void)
|
||||
int val = 0;
|
||||
|
||||
for (bp_location *bl : all_bp_locations ())
|
||||
{
|
||||
if (bl->inserted && !is_tracepoint (bl->owner))
|
||||
val |= remove_breakpoint (bl);
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
@ -14931,9 +14931,7 @@ get_tracepoint_by_number (const char **arg,
|
||||
|
||||
for (breakpoint *t : all_tracepoints ())
|
||||
if (t->number == tpnum)
|
||||
{
|
||||
return (struct tracepoint *) t;
|
||||
}
|
||||
|
||||
printf_unfiltered ("No tracepoint number %d.\n", tpnum);
|
||||
return NULL;
|
||||
|
@ -4792,11 +4792,13 @@ rank_one_type (struct type *parm, struct type *arg, struct value *value)
|
||||
return (sum_ranks (rank_one_type (TYPE_TARGET_TYPE (parm), arg, NULL),
|
||||
REFERENCE_SEE_THROUGH_BADNESS));
|
||||
if (overload_debug)
|
||||
{
|
||||
/* Debugging only. */
|
||||
fprintf_filtered (gdb_stderr,
|
||||
"------ Arg is %s [%d], parm is %s [%d]\n",
|
||||
arg->name (), arg->code (),
|
||||
parm->name (), parm->code ());
|
||||
}
|
||||
|
||||
/* x -> y means arg of type x being supplied for parameter of type y. */
|
||||
|
||||
|
@ -174,10 +174,8 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
sp = pc - pcoffs[attempt];
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* sp + sfoffs[try] points to a struct rt_sigframe, which contains
|
||||
a struct siginfo and a struct ucontext. struct ucontext contains
|
||||
|
@ -4967,11 +4967,9 @@ static int i386_record_floats (struct gdbarch *gdbarch,
|
||||
else if (I386_SAVE_FPU_ENV_REG_STACK == iregnum)
|
||||
{
|
||||
for (i = I387_ST0_REGNUM (tdep); i <= I387_FOP_REGNUM (tdep); i++)
|
||||
{
|
||||
if (record_full_arch_list_add_reg (ir->regcache, i))
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if ((iregnum >= I387_ST0_REGNUM (tdep)) &&
|
||||
(iregnum <= I387_FOP_REGNUM (tdep)))
|
||||
{
|
||||
|
@ -1065,9 +1065,12 @@ ppc_displaced_step_fixup (struct gdbarch *gdbarch,
|
||||
else if ((insn & BP_MASK) == BP_INSN)
|
||||
regcache_cooked_write_unsigned (regs, gdbarch_pc_regnum (gdbarch), from);
|
||||
else
|
||||
/* Handle any other instructions that do not fit in the categories above. */
|
||||
{
|
||||
/* Handle any other instructions that do not fit in the categories
|
||||
above. */
|
||||
regcache_cooked_write_unsigned (regs, gdbarch_pc_regnum (gdbarch),
|
||||
from + offset);
|
||||
}
|
||||
}
|
||||
|
||||
/* Implementation of gdbarch_displaced_step_prepare. */
|
||||
|
@ -2408,11 +2408,13 @@ tfind_line_command (const char *args, int from_tty)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Is there any case in which we get here, and have an address
|
||||
which the user would want to see? If we have debugging
|
||||
symbols and no line numbers? */
|
||||
error (_("Line number %d is out of range for \"%s\"."),
|
||||
sal.line, symtab_to_filename_for_display (sal.symtab));
|
||||
}
|
||||
|
||||
/* Find within range of stated line. */
|
||||
if (args && *args)
|
||||
|
@ -1025,12 +1025,14 @@ v850_push_dummy_call (struct gdbarch *gdbarch,
|
||||
if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850)
|
||||
stack_offset = 0;
|
||||
else
|
||||
{
|
||||
/* The offset onto the stack at which we will start copying parameters
|
||||
(after the registers are used up) begins at 16 rather than at zero.
|
||||
That's how the ABI is defined, though there's no indication that these
|
||||
16 bytes are used for anything, not even for saving incoming
|
||||
argument registers. */
|
||||
stack_offset = 16;
|
||||
}
|
||||
|
||||
/* Now make space on the stack for the args. */
|
||||
for (argnum = 0; argnum < nargs; argnum++)
|
||||
|
@ -482,7 +482,8 @@ arrange_linetable (struct linetable *oldLineTb)
|
||||
newline = 0;
|
||||
if (oldLineTb->item[0].line != 0)
|
||||
for (newline = 0;
|
||||
newline < oldLineTb->nitems && oldLineTb->item[newline].line; ++newline)
|
||||
newline < oldLineTb->nitems && oldLineTb->item[newline].line;
|
||||
++newline)
|
||||
newLineTb->item[newline] = oldLineTb->item[newline];
|
||||
|
||||
/* Now copy function lines one by one. */
|
||||
|
@ -1,3 +1,7 @@
|
||||
2021-05-27 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* Fix some indentation mistakes throughout.
|
||||
|
||||
2021-05-17 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* .dir-locals.el: Set sentence-end-double-space for all modes, and
|
||||
|
@ -1908,9 +1908,7 @@ s390_emit_const (LONGEST num)
|
||||
0x98, 0x23, 0x10, 0x00, /* lm %r2, %r3, 0(%r1) */
|
||||
};
|
||||
if (num < 0x8000 && num >= 0)
|
||||
{
|
||||
add_insns (buf_s, sizeof buf_s);
|
||||
}
|
||||
else
|
||||
{
|
||||
s390_emit_litpool (8);
|
||||
@ -2027,9 +2025,7 @@ s390_emit_set_r2 (int arg1)
|
||||
0x58, 0x20, 0x10, 0x00, /* l %r2, 0(%r1) */
|
||||
};
|
||||
if (arg1 < 0x8000 && arg1 >= -0x8000)
|
||||
{
|
||||
add_insns (buf_s, sizeof buf_s);
|
||||
}
|
||||
else
|
||||
{
|
||||
s390_emit_litpool (4);
|
||||
@ -2553,9 +2549,7 @@ s390x_emit_const (LONGEST num)
|
||||
0xe3, 0x20, 0x10, 0x00, 0x00, 0x04, /* lg %r2, 0(%r1) */
|
||||
};
|
||||
if (num < 0x8000 && num >= -0x8000)
|
||||
{
|
||||
add_insns (buf_s, sizeof buf_s);
|
||||
}
|
||||
else
|
||||
{
|
||||
s390_emit_litpool (8);
|
||||
|
Loading…
x
Reference in New Issue
Block a user