Remove some unused variables
Found using the newly-enabled -Wunused-variable. gdb/ChangeLog: * aarch64-linux-nat.c (aarch64_linux_nat_target::stopped_data_address): Remove unused variable. * arm-linux-nat.c (fetch_regs): Likewise. (store_regs): Likewise. (fetch_vfp_regs): Likewise. (store_vfp_regs): Likewise. (arm_linux_nat_target::insert_hw_breakpoint): Likewise. (arm_linux_nat_target::remove_hw_breakpoint): Likewise. (arm_linux_nat_target::insert_watchpoint): Likewise. (arm_linux_nat_target::remove_watchpoint): Likewise. * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint): Likewise. * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): Likewise. * ppc-linux-nat.c (fetch_register): Likewise. (fetch_all_gp_regs): Likewise. (fetch_ppc_registers): Likewise. (store_all_gp_regs): Likewise. (store_ppc_registers): Likewise. (hwdebug_insert_point): Likewise. (can_use_watchpoint_cond_accel): Likewise. * remote-sim.c (gdb_os_write_stdout): Likewise. gdb/gdbserver/ChangeLog: * linux-mips-low.c (mips_collect_ptrace_register): Remove unused variable. (mips_supply_ptrace_register): Likewise.
This commit is contained in:
parent
6018c5acdf
commit
cf4088a92f
9 changed files with 37 additions and 26 deletions
|
@ -1,3 +1,29 @@
|
||||||
|
2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* aarch64-linux-nat.c
|
||||||
|
(aarch64_linux_nat_target::stopped_data_address): Remove unused
|
||||||
|
variable.
|
||||||
|
* arm-linux-nat.c (fetch_regs): Likewise.
|
||||||
|
(store_regs): Likewise.
|
||||||
|
(fetch_vfp_regs): Likewise.
|
||||||
|
(store_vfp_regs): Likewise.
|
||||||
|
(arm_linux_nat_target::insert_hw_breakpoint): Likewise.
|
||||||
|
(arm_linux_nat_target::remove_hw_breakpoint): Likewise.
|
||||||
|
(arm_linux_nat_target::insert_watchpoint): Likewise.
|
||||||
|
(arm_linux_nat_target::remove_watchpoint): Likewise.
|
||||||
|
* mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
|
||||||
|
Likewise.
|
||||||
|
* nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
|
||||||
|
Likewise.
|
||||||
|
* ppc-linux-nat.c (fetch_register): Likewise.
|
||||||
|
(fetch_all_gp_regs): Likewise.
|
||||||
|
(fetch_ppc_registers): Likewise.
|
||||||
|
(store_all_gp_regs): Likewise.
|
||||||
|
(store_ppc_registers): Likewise.
|
||||||
|
(hwdebug_insert_point): Likewise.
|
||||||
|
(can_use_watchpoint_cond_accel): Likewise.
|
||||||
|
* remote-sim.c (gdb_os_write_stdout): Likewise.
|
||||||
|
|
||||||
2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
|
2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
Tom Tromey <tom@tromey.com>
|
Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
|
|
@ -819,7 +819,7 @@ bool
|
||||||
aarch64_linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
|
aarch64_linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
|
||||||
{
|
{
|
||||||
siginfo_t siginfo;
|
siginfo_t siginfo;
|
||||||
int i, tid;
|
int i;
|
||||||
struct aarch64_debug_reg_state *state;
|
struct aarch64_debug_reg_state *state;
|
||||||
|
|
||||||
if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
|
if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
|
||||||
|
|
|
@ -205,7 +205,7 @@ store_fpregs (const struct regcache *regcache)
|
||||||
static void
|
static void
|
||||||
fetch_regs (struct regcache *regcache)
|
fetch_regs (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
int ret, regno, tid;
|
int ret, tid;
|
||||||
elf_gregset_t regs;
|
elf_gregset_t regs;
|
||||||
|
|
||||||
/* Get the thread id for the ptrace call. */
|
/* Get the thread id for the ptrace call. */
|
||||||
|
@ -232,7 +232,7 @@ fetch_regs (struct regcache *regcache)
|
||||||
static void
|
static void
|
||||||
store_regs (const struct regcache *regcache)
|
store_regs (const struct regcache *regcache)
|
||||||
{
|
{
|
||||||
int ret, regno, tid;
|
int ret, tid;
|
||||||
elf_gregset_t regs;
|
elf_gregset_t regs;
|
||||||
|
|
||||||
/* Get the thread id for the ptrace call. */
|
/* Get the thread id for the ptrace call. */
|
||||||
|
@ -339,7 +339,7 @@ static void
|
||||||
fetch_vfp_regs (struct regcache *regcache)
|
fetch_vfp_regs (struct regcache *regcache)
|
||||||
{
|
{
|
||||||
gdb_byte regbuf[VFP_REGS_SIZE];
|
gdb_byte regbuf[VFP_REGS_SIZE];
|
||||||
int ret, regno, tid;
|
int ret, tid;
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ static void
|
||||||
store_vfp_regs (const struct regcache *regcache)
|
store_vfp_regs (const struct regcache *regcache)
|
||||||
{
|
{
|
||||||
gdb_byte regbuf[VFP_REGS_SIZE];
|
gdb_byte regbuf[VFP_REGS_SIZE];
|
||||||
int ret, regno, tid;
|
int ret, tid;
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||||
|
|
||||||
|
@ -1064,7 +1064,6 @@ int
|
||||||
arm_linux_nat_target::insert_hw_breakpoint (struct gdbarch *gdbarch,
|
arm_linux_nat_target::insert_hw_breakpoint (struct gdbarch *gdbarch,
|
||||||
struct bp_target_info *bp_tgt)
|
struct bp_target_info *bp_tgt)
|
||||||
{
|
{
|
||||||
struct lwp_info *lp;
|
|
||||||
struct arm_linux_hw_breakpoint p;
|
struct arm_linux_hw_breakpoint p;
|
||||||
|
|
||||||
if (arm_linux_get_hw_breakpoint_count () == 0)
|
if (arm_linux_get_hw_breakpoint_count () == 0)
|
||||||
|
@ -1082,7 +1081,6 @@ int
|
||||||
arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch,
|
arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch,
|
||||||
struct bp_target_info *bp_tgt)
|
struct bp_target_info *bp_tgt)
|
||||||
{
|
{
|
||||||
struct lwp_info *lp;
|
|
||||||
struct arm_linux_hw_breakpoint p;
|
struct arm_linux_hw_breakpoint p;
|
||||||
|
|
||||||
if (arm_linux_get_hw_breakpoint_count () == 0)
|
if (arm_linux_get_hw_breakpoint_count () == 0)
|
||||||
|
@ -1134,7 +1132,6 @@ arm_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len,
|
||||||
enum target_hw_bp_type rw,
|
enum target_hw_bp_type rw,
|
||||||
struct expression *cond)
|
struct expression *cond)
|
||||||
{
|
{
|
||||||
struct lwp_info *lp;
|
|
||||||
struct arm_linux_hw_breakpoint p;
|
struct arm_linux_hw_breakpoint p;
|
||||||
|
|
||||||
if (arm_linux_get_hw_watchpoint_count () == 0)
|
if (arm_linux_get_hw_watchpoint_count () == 0)
|
||||||
|
@ -1153,7 +1150,6 @@ arm_linux_nat_target::remove_watchpoint (CORE_ADDR addr,
|
||||||
int len, enum target_hw_bp_type rw,
|
int len, enum target_hw_bp_type rw,
|
||||||
struct expression *cond)
|
struct expression *cond)
|
||||||
{
|
{
|
||||||
struct lwp_info *lp;
|
|
||||||
struct arm_linux_hw_breakpoint p;
|
struct arm_linux_hw_breakpoint p;
|
||||||
|
|
||||||
if (arm_linux_get_hw_watchpoint_count () == 0)
|
if (arm_linux_get_hw_watchpoint_count () == 0)
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* linux-mips-low.c (mips_collect_ptrace_register): Remove unused
|
||||||
|
variable.
|
||||||
|
(mips_supply_ptrace_register): Likewise.
|
||||||
|
|
||||||
2018-07-22 Tom Tromey <tom@tromey.com>
|
2018-07-22 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* configure: Rebuild.
|
* configure: Rebuild.
|
||||||
|
|
|
@ -852,7 +852,6 @@ static void
|
||||||
mips_collect_ptrace_register (struct regcache *regcache,
|
mips_collect_ptrace_register (struct regcache *regcache,
|
||||||
int regno, char *buf)
|
int regno, char *buf)
|
||||||
{
|
{
|
||||||
const struct target_desc *tdesc = current_process ()->tdesc;
|
|
||||||
int use_64bit = sizeof (PTRACE_XFER_TYPE) == 8;
|
int use_64bit = sizeof (PTRACE_XFER_TYPE) == 8;
|
||||||
|
|
||||||
if (use_64bit && register_size (regcache->tdesc, regno) == 4)
|
if (use_64bit && register_size (regcache->tdesc, regno) == 4)
|
||||||
|
@ -872,7 +871,6 @@ static void
|
||||||
mips_supply_ptrace_register (struct regcache *regcache,
|
mips_supply_ptrace_register (struct regcache *regcache,
|
||||||
int regno, const char *buf)
|
int regno, const char *buf)
|
||||||
{
|
{
|
||||||
const struct target_desc *tdesc = current_process ()->tdesc;
|
|
||||||
int use_64bit = sizeof (PTRACE_XFER_TYPE) == 8;
|
int use_64bit = sizeof (PTRACE_XFER_TYPE) == 8;
|
||||||
|
|
||||||
if (use_64bit && register_size (regcache->tdesc, regno) == 4)
|
if (use_64bit && register_size (regcache->tdesc, regno) == 4)
|
||||||
|
|
|
@ -673,7 +673,6 @@ mips_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len,
|
||||||
struct mips_watchpoint *new_watch;
|
struct mips_watchpoint *new_watch;
|
||||||
struct mips_watchpoint **pw;
|
struct mips_watchpoint **pw;
|
||||||
|
|
||||||
int i;
|
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
if (!mips_linux_read_watch_registers (inferior_ptid.lwp (),
|
if (!mips_linux_read_watch_registers (inferior_ptid.lwp (),
|
||||||
|
|
|
@ -67,7 +67,6 @@ std::unique_ptr<gdb_byte[]>
|
||||||
aarch64_sve_get_sveregs (int tid)
|
aarch64_sve_get_sveregs (int tid)
|
||||||
{
|
{
|
||||||
struct iovec iovec;
|
struct iovec iovec;
|
||||||
struct user_sve_header header;
|
|
||||||
uint64_t vq = aarch64_sve_get_vq (tid);
|
uint64_t vq = aarch64_sve_get_vq (tid);
|
||||||
|
|
||||||
if (vq == 0)
|
if (vq == 0)
|
||||||
|
|
|
@ -532,11 +532,9 @@ static void
|
||||||
fetch_register (struct regcache *regcache, int tid, int regno)
|
fetch_register (struct regcache *regcache, int tid, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
|
||||||
/* This isn't really an address. But ptrace thinks of it as one. */
|
/* This isn't really an address. But ptrace thinks of it as one. */
|
||||||
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
|
CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
|
||||||
int bytes_transferred;
|
int bytes_transferred;
|
||||||
unsigned int offset; /* Offset of registers within the u area. */
|
|
||||||
gdb_byte buf[PPC_MAX_REGISTER_SIZE];
|
gdb_byte buf[PPC_MAX_REGISTER_SIZE];
|
||||||
|
|
||||||
if (altivec_register_p (gdbarch, regno))
|
if (altivec_register_p (gdbarch, regno))
|
||||||
|
@ -630,8 +628,6 @@ fetch_register (struct regcache *regcache, int tid, int regno)
|
||||||
static int
|
static int
|
||||||
fetch_all_gp_regs (struct regcache *regcache, int tid)
|
fetch_all_gp_regs (struct regcache *regcache, int tid)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
|
||||||
gdb_gregset_t gregset;
|
gdb_gregset_t gregset;
|
||||||
|
|
||||||
if (ptrace (PTRACE_GETREGS, tid, 0, (void *) &gregset) < 0)
|
if (ptrace (PTRACE_GETREGS, tid, 0, (void *) &gregset) < 0)
|
||||||
|
@ -728,7 +724,6 @@ fetch_fp_regs (struct regcache *regcache, int tid)
|
||||||
static void
|
static void
|
||||||
fetch_ppc_registers (struct regcache *regcache, int tid)
|
fetch_ppc_registers (struct regcache *regcache, int tid)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||||
|
|
||||||
|
@ -1004,8 +999,6 @@ store_register (const struct regcache *regcache, int tid, int regno)
|
||||||
static int
|
static int
|
||||||
store_all_gp_regs (const struct regcache *regcache, int tid, int regno)
|
store_all_gp_regs (const struct regcache *regcache, int tid, int regno)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
|
||||||
gdb_gregset_t gregset;
|
gdb_gregset_t gregset;
|
||||||
|
|
||||||
if (ptrace (PTRACE_GETREGS, tid, 0, (void *) &gregset) < 0)
|
if (ptrace (PTRACE_GETREGS, tid, 0, (void *) &gregset) < 0)
|
||||||
|
@ -1122,7 +1115,6 @@ store_fp_regs (const struct regcache *regcache, int tid, int regno)
|
||||||
static void
|
static void
|
||||||
store_ppc_registers (const struct regcache *regcache, int tid)
|
store_ppc_registers (const struct regcache *regcache, int tid)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
struct gdbarch *gdbarch = regcache->arch ();
|
struct gdbarch *gdbarch = regcache->arch ();
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||||
|
|
||||||
|
@ -1407,7 +1399,6 @@ hwdebug_insert_point (struct ppc_hw_breakpoint *b, int tid)
|
||||||
gdb::unique_xmalloc_ptr<ppc_hw_breakpoint> p (XDUP (ppc_hw_breakpoint, b));
|
gdb::unique_xmalloc_ptr<ppc_hw_breakpoint> p (XDUP (ppc_hw_breakpoint, b));
|
||||||
struct hw_break_tuple *hw_breaks;
|
struct hw_break_tuple *hw_breaks;
|
||||||
struct thread_points *t;
|
struct thread_points *t;
|
||||||
struct hw_break_tuple *tuple;
|
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
slot = ptrace (PPC_PTRACE_SETHWDEBUG, tid, 0, p.get ());
|
slot = ptrace (PPC_PTRACE_SETHWDEBUG, tid, 0, p.get ());
|
||||||
|
@ -1627,7 +1618,6 @@ can_use_watchpoint_cond_accel (void)
|
||||||
struct thread_points *p;
|
struct thread_points *p;
|
||||||
int tid = inferior_ptid.lwp ();
|
int tid = inferior_ptid.lwp ();
|
||||||
int cnt = hwdebug_info.num_condition_regs, i;
|
int cnt = hwdebug_info.num_condition_regs, i;
|
||||||
CORE_ADDR tmp_value;
|
|
||||||
|
|
||||||
if (!have_ptrace_hwdebug_interface () || cnt == 0)
|
if (!have_ptrace_hwdebug_interface () || cnt == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -377,9 +377,6 @@ end_callbacks (void)
|
||||||
static int
|
static int
|
||||||
gdb_os_write_stdout (host_callback *p, const char *buf, int len)
|
gdb_os_write_stdout (host_callback *p, const char *buf, int len)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
char b[2];
|
|
||||||
|
|
||||||
ui_file_write (gdb_stdtarg, buf, len);
|
ui_file_write (gdb_stdtarg, buf, len);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue