aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-sde-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:36:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:46:02 -0500
commitc583a2520616c2736cffc389c89a48b159366e6c (patch)
treeb4925f26506fcee96c16119431c01760f05db95d /gdb/mips-sde-tdep.c
parentca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff)
downloadbinutils-users/simark/clang-format.zip
binutils-users/simark/clang-format.tar.gz
binutils-users/simark/clang-format.tar.bz2
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/mips-sde-tdep.c')
-rw-r--r--gdb/mips-sde-tdep.c65
1 files changed, 25 insertions, 40 deletions
diff --git a/gdb/mips-sde-tdep.c b/gdb/mips-sde-tdep.c
index b921d84..143fd0b 100644
--- a/gdb/mips-sde-tdep.c
+++ b/gdb/mips-sde-tdep.c
@@ -67,8 +67,8 @@ mips_sde_frame_cache (frame_info_ptr this_frame, void **this_cache)
};
*/
- stack_addr = get_frame_register_signed (this_frame,
- gdbarch_sp_regnum (gdbarch));
+ stack_addr
+ = get_frame_register_signed (this_frame, gdbarch_sp_regnum (gdbarch));
switch (abi)
{
case MIPS_ABI_O32:
@@ -80,7 +80,7 @@ mips_sde_frame_cache (frame_info_ptr this_frame, void **this_cache)
break;
case MIPS_ABI_N32:
case MIPS_ABI_N64:
- default: /* Wild guess. */
+ default: /* Wild guess. */
/* 16: XCPTCONTEXT
16: xcpt_gen() argspace ( 0 bytes)
00: _xcptcall() saved ra, rounded up (16 bytes) */
@@ -88,27 +88,21 @@ mips_sde_frame_cache (frame_info_ptr this_frame, void **this_cache)
break;
}
- trad_frame_set_reg_addr (cache,
- MIPS_PS_REGNUM + gdbarch_num_regs (gdbarch),
+ trad_frame_set_reg_addr (cache, MIPS_PS_REGNUM + gdbarch_num_regs (gdbarch),
xcpt_frame + 0 * sizeof_reg_t);
- trad_frame_set_reg_addr (cache,
- regs->cause + gdbarch_num_regs (gdbarch),
+ trad_frame_set_reg_addr (cache, regs->cause + gdbarch_num_regs (gdbarch),
xcpt_frame + 1 * sizeof_reg_t);
- trad_frame_set_reg_addr (cache,
- regs->pc + gdbarch_num_regs (gdbarch),
+ trad_frame_set_reg_addr (cache, regs->pc + gdbarch_num_regs (gdbarch),
xcpt_frame + 2 * sizeof_reg_t);
- trad_frame_set_reg_addr (cache,
- regs->badvaddr + gdbarch_num_regs (gdbarch),
+ trad_frame_set_reg_addr (cache, regs->badvaddr + gdbarch_num_regs (gdbarch),
xcpt_frame + 3 * sizeof_reg_t);
for (i = 0; i < MIPS_NUMREGS; i++)
trad_frame_set_reg_addr (cache,
i + MIPS_ZERO_REGNUM + gdbarch_num_regs (gdbarch),
xcpt_frame + (4 + i) * sizeof_reg_t);
- trad_frame_set_reg_addr (cache,
- regs->lo + gdbarch_num_regs (gdbarch),
+ trad_frame_set_reg_addr (cache, regs->lo + gdbarch_num_regs (gdbarch),
xcpt_frame + 36 * sizeof_reg_t);
- trad_frame_set_reg_addr (cache,
- regs->hi + gdbarch_num_regs (gdbarch),
+ trad_frame_set_reg_addr (cache, regs->hi + gdbarch_num_regs (gdbarch),
xcpt_frame + 37 * sizeof_reg_t);
pc = get_frame_pc (this_frame);
@@ -133,8 +127,7 @@ mips_sde_frame_this_id (frame_info_ptr this_frame, void **this_cache,
/* Implement the prev_register function for the SDE frame unwinder. */
static struct value *
-mips_sde_frame_prev_register (frame_info_ptr this_frame,
- void **this_cache,
+mips_sde_frame_prev_register (frame_info_ptr this_frame, void **this_cache,
int prev_regnum)
{
struct trad_frame_cache *trad_cache
@@ -147,8 +140,7 @@ mips_sde_frame_prev_register (frame_info_ptr this_frame,
static int
mips_sde_frame_sniffer (const struct frame_unwind *self,
- frame_info_ptr this_frame,
- void **this_cache)
+ frame_info_ptr this_frame, void **this_cache)
{
CORE_ADDR pc = get_frame_pc (this_frame);
const char *name;
@@ -161,16 +153,14 @@ mips_sde_frame_sniffer (const struct frame_unwind *self,
/* Data structure for the SDE frame unwinder. */
-static const struct frame_unwind mips_sde_frame_unwind =
-{
- "mips sde sigtramp",
- SIGTRAMP_FRAME,
- default_frame_unwind_stop_reason,
- mips_sde_frame_this_id,
- mips_sde_frame_prev_register,
- NULL,
- mips_sde_frame_sniffer
-};
+static const struct frame_unwind mips_sde_frame_unwind
+ = { "mips sde sigtramp",
+ SIGTRAMP_FRAME,
+ default_frame_unwind_stop_reason,
+ mips_sde_frame_this_id,
+ mips_sde_frame_prev_register,
+ NULL,
+ mips_sde_frame_sniffer };
/* Implement the this_base, this_locals, and this_args hooks
for the normal unwinder. */
@@ -184,13 +174,9 @@ mips_sde_frame_base_address (frame_info_ptr this_frame, void **this_cache)
return trad_frame_get_this_base (this_trad_cache);
}
-static const struct frame_base mips_sde_frame_base =
-{
- &mips_sde_frame_unwind,
- mips_sde_frame_base_address,
- mips_sde_frame_base_address,
- mips_sde_frame_base_address
-};
+static const struct frame_base mips_sde_frame_base
+ = { &mips_sde_frame_unwind, mips_sde_frame_base_address,
+ mips_sde_frame_base_address, mips_sde_frame_base_address };
static const struct frame_base *
mips_sde_frame_base_sniffer (frame_info_ptr this_frame)
@@ -241,8 +227,7 @@ mips_sde_elf_osabi_sniffer (bfd *abfd)
real OS in use we must look for OS notes that have been added.
For SDE, we simply look for sections named with .sde as prefixes. */
- bfd_map_over_sections (abfd,
- mips_sde_elf_osabi_sniff_abi_tag_sections,
+ bfd_map_over_sections (abfd, mips_sde_elf_osabi_sniff_abi_tag_sections,
&osabi);
}
return osabi;
@@ -256,11 +241,11 @@ mips_sde_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
}
void _initialize_mips_sde_tdep ();
+
void
_initialize_mips_sde_tdep ()
{
- gdbarch_register_osabi_sniffer (bfd_arch_mips,
- bfd_target_elf_flavour,
+ gdbarch_register_osabi_sniffer (bfd_arch_mips, bfd_target_elf_flavour,
mips_sde_elf_osabi_sniffer);
gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_SDE, mips_sde_init_abi);