diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdb/ppc-netbsd-nat.c | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | binutils-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/ppc-netbsd-nat.c')
-rw-r--r-- | gdb/ppc-netbsd-nat.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/gdb/ppc-netbsd-nat.c b/gdb/ppc-netbsd-nat.c index 4d700e1..ba184f8 100644 --- a/gdb/ppc-netbsd-nat.c +++ b/gdb/ppc-netbsd-nat.c @@ -56,10 +56,8 @@ getregs_supplies (struct gdbarch *gdbarch, int regnum) return ((regnum >= tdep->ppc_gp0_regnum && regnum < tdep->ppc_gp0_regnum + ppc_num_gprs) - || regnum == tdep->ppc_lr_regnum - || regnum == tdep->ppc_cr_regnum - || regnum == tdep->ppc_xer_regnum - || regnum == tdep->ppc_ctr_regnum + || regnum == tdep->ppc_lr_regnum || regnum == tdep->ppc_cr_regnum + || regnum == tdep->ppc_xer_regnum || regnum == tdep->ppc_ctr_regnum || regnum == gdbarch_pc_regnum (gdbarch)); } @@ -99,10 +97,10 @@ ppc_nbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum) struct reg regs; if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, lwp) == -1) - perror_with_name (_("Couldn't get registers")); + perror_with_name (_ ("Couldn't get registers")); - ppc_supply_gregset (&ppcnbsd_gregset, regcache, - regnum, ®s, sizeof regs); + ppc_supply_gregset (&ppcnbsd_gregset, regcache, regnum, ®s, + sizeof regs); } if (regnum == -1 || getfpregs_supplies (gdbarch, regnum)) @@ -110,10 +108,10 @@ ppc_nbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum) struct fpreg fpregs; if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1) - perror_with_name (_("Couldn't get FP registers")); + perror_with_name (_ ("Couldn't get FP registers")); - ppc_supply_fpregset (&ppcnbsd_fpregset, regcache, - regnum, &fpregs, sizeof fpregs); + ppc_supply_fpregset (&ppcnbsd_fpregset, regcache, regnum, &fpregs, + sizeof fpregs); } } @@ -129,13 +127,13 @@ ppc_nbsd_nat_target::store_registers (struct regcache *regcache, int regnum) struct reg regs; if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, lwp) == -1) - perror_with_name (_("Couldn't get registers")); + perror_with_name (_ ("Couldn't get registers")); - ppc_collect_gregset (&ppcnbsd_gregset, regcache, - regnum, ®s, sizeof regs); + ppc_collect_gregset (&ppcnbsd_gregset, regcache, regnum, ®s, + sizeof regs); if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, lwp) == -1) - perror_with_name (_("Couldn't write registers")); + perror_with_name (_ ("Couldn't write registers")); } if (regnum == -1 || getfpregs_supplies (gdbarch, regnum)) @@ -143,13 +141,13 @@ ppc_nbsd_nat_target::store_registers (struct regcache *regcache, int regnum) struct fpreg fpregs; if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1) - perror_with_name (_("Couldn't get FP registers")); + perror_with_name (_ ("Couldn't get FP registers")); - ppc_collect_fpregset (&ppcnbsd_fpregset, regcache, - regnum, &fpregs, sizeof fpregs); + ppc_collect_fpregset (&ppcnbsd_fpregset, regcache, regnum, &fpregs, + sizeof fpregs); if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1) - perror_with_name (_("Couldn't set FP registers")); + perror_with_name (_ ("Couldn't set FP registers")); } } @@ -166,18 +164,18 @@ ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) if (pcb->pcb_sp == 0) return 0; - read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf); + read_memory (pcb->pcb_sp, (gdb_byte *) &sf, sizeof sf); regcache->raw_supply (tdep->ppc_cr_regnum, &sf.cr); regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.fixreg2); - for (i = 0 ; i < 19 ; i++) + for (i = 0; i < 19; i++) regcache->raw_supply (tdep->ppc_gp0_regnum + 13 + i, &sf.fixreg[i]); - read_memory(sf.sp, (gdb_byte *)&cf, sizeof(cf)); + read_memory (sf.sp, (gdb_byte *) &cf, sizeof (cf)); regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.r30); regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.r31); regcache->raw_supply (tdep->ppc_gp0_regnum + 1, &cf.sp); - read_memory(cf.sp, (gdb_byte *)&cf, sizeof(cf)); + read_memory (cf.sp, (gdb_byte *) &cf, sizeof (cf)); regcache->raw_supply (tdep->ppc_lr_regnum, &cf.lr); regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.lr); @@ -185,6 +183,7 @@ ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) } void _initialize_ppcnbsd_nat (); + void _initialize_ppcnbsd_nat () { |