projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PR ld/12152
[deliverable/binutils-gdb.git]
/
gdb
/
aix-thread.c
diff --git
a/gdb/aix-thread.c
b/gdb/aix-thread.c
index 2a4d6f363a6998a71fb3f540ead62fb48be69008..0a9fae32c42d369413467175d9fbb488807daa86 100644
(file)
--- a/
gdb/aix-thread.c
+++ b/
gdb/aix-thread.c
@@
-1,7
+1,7
@@
/* Low level interface for debugging AIX 4.3+ pthreads.
/* Low level interface for debugging AIX 4.3+ pthreads.
- Copyright (C) 1999
, 2000, 2002, 2007, 2008, 2009, 2010, 2011
-
Free Software Foundation,
Inc.
+ Copyright (C) 1999
-2000, 2002, 2007-2012 Free Software Foundation,
+ Inc.
Written by Nick Duffek <nsd@redhat.com>.
This file is part of GDB.
Written by Nick Duffek <nsd@redhat.com>.
This file is part of GDB.
@@
-58,6
+58,10
@@
#include <sched.h>
#include <sys/pthdebug.h>
#include <sched.h>
#include <sys/pthdebug.h>
+#if !HAVE_DECL_GETTHRDS
+extern int getthrds (pid_t, struct thrdsinfo64 *, int, pthdb_tid_t *, int);
+#endif
+
/* Whether to emit debugging output. */
static int debug_aix_thread;
/* Whether to emit debugging output. */
static int debug_aix_thread;
@@
-647,10
+651,6
@@
get_signaled_thread (void)
pthdb_tid_t ktid = 0;
int result = 0;
pthdb_tid_t ktid = 0;
int result = 0;
- /* getthrds(3) isn't prototyped in any AIX 4.3.3 #include file. */
- extern int getthrds (pid_t, struct thrdsinfo64 *,
- int, pthdb_tid_t *, int);
-
while (1)
{
if (getthrds (PIDGET (inferior_ptid), &thrinf,
while (1)
{
if (getthrds (PIDGET (inferior_ptid), &thrinf,
@@
-1321,7
+1321,8
@@
fill_gprs64 (const struct regcache *regcache, uint64_t *vals)
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
- if (regcache_valid_p (regcache, tdep->ppc_gp0_regnum + regno))
+ if (REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_gp0_regnum + regno))
regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + regno,
vals + regno);
}
regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + regno,
vals + regno);
}
@@
-1333,7
+1334,8
@@
fill_gprs32 (const struct regcache *regcache, uint32_t *vals)
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
int regno;
for (regno = 0; regno < ppc_num_gprs; regno++)
- if (regcache_valid_p (regcache, tdep->ppc_gp0_regnum + regno))
+ if (REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_gp0_regnum + regno))
regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + regno,
vals + regno);
}
regcache_raw_collect (regcache, tdep->ppc_gp0_regnum + regno,
vals + regno);
}
@@
-1353,7
+1355,7
@@
fill_fprs (const struct regcache *regcache, double *vals)
for (regno = tdep->ppc_fp0_regnum;
regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
regno++)
for (regno = tdep->ppc_fp0_regnum;
regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
regno++)
- if (
regcache_valid_p
(regcache, regno))
+ if (
REG_VALID == regcache_register_status
(regcache, regno))
regcache_raw_collect (regcache, regno, vals + regno);
}
regcache_raw_collect (regcache, regno, vals + regno);
}
@@
-1377,20
+1379,22
@@
fill_sprs64 (const struct regcache *regcache,
gdb_assert (sizeof (*iar) == register_size
(gdbarch, gdbarch_pc_regnum (gdbarch)));
gdb_assert (sizeof (*iar) == register_size
(gdbarch, gdbarch_pc_regnum (gdbarch)));
- if (regcache_valid_p (regcache, gdbarch_pc_regnum (gdbarch)))
+ if (REG_VALID == regcache_register_status (regcache,
+ gdbarch_pc_regnum (gdbarch)))
regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
- if (
regcache_valid_p
(regcache, tdep->ppc_ps_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_ps_regnum))
regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
- if (
regcache_valid_p
(regcache, tdep->ppc_cr_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_cr_regnum))
regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
- if (
regcache_valid_p
(regcache, tdep->ppc_lr_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_lr_regnum))
regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
- if (
regcache_valid_p
(regcache, tdep->ppc_ctr_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_ctr_regnum))
regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
- if (
regcache_valid_p
(regcache, tdep->ppc_xer_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_xer_regnum))
regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
- && regcache_valid_p (regcache, tdep->ppc_fpscr_regnum))
+ && REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_fpscr_regnum))
regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
}
regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
}
@@
-1411,20
+1415,21
@@
fill_sprs32 (const struct regcache *regcache,
gdb_assert (sizeof (*iar) == register_size (gdbarch,
gdbarch_pc_regnum (gdbarch)));
gdb_assert (sizeof (*iar) == register_size (gdbarch,
gdbarch_pc_regnum (gdbarch)));
- if (regcache_valid_p (regcache, gdbarch_pc_regnum (gdbarch)))
+ if (REG_VALID == regcache_register_status (regcache,
+ gdbarch_pc_regnum (gdbarch)))
regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), iar);
- if (
regcache_valid_p
(regcache, tdep->ppc_ps_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_ps_regnum))
regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
regcache_raw_collect (regcache, tdep->ppc_ps_regnum, msr);
- if (
regcache_valid_p
(regcache, tdep->ppc_cr_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_cr_regnum))
regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
regcache_raw_collect (regcache, tdep->ppc_cr_regnum, cr);
- if (
regcache_valid_p
(regcache, tdep->ppc_lr_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_lr_regnum))
regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
regcache_raw_collect (regcache, tdep->ppc_lr_regnum, lr);
- if (
regcache_valid_p
(regcache, tdep->ppc_ctr_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_ctr_regnum))
regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
regcache_raw_collect (regcache, tdep->ppc_ctr_regnum, ctr);
- if (
regcache_valid_p
(regcache, tdep->ppc_xer_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_xer_regnum))
regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
regcache_raw_collect (regcache, tdep->ppc_xer_regnum, xer);
if (tdep->ppc_fpscr_regnum >= 0
- &&
regcache_valid_p
(regcache, tdep->ppc_fpscr_regnum))
+ &&
REG_VALID == regcache_register_status
(regcache, tdep->ppc_fpscr_regnum))
regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
}
regcache_raw_collect (regcache, tdep->ppc_fpscr_regnum, fpscr);
}
@@
-1459,7
+1464,8
@@
store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
/* Collect general-purpose register values from the regcache. */
for (i = 0; i < ppc_num_gprs; i++)
/* Collect general-purpose register values from the regcache. */
for (i = 0; i < ppc_num_gprs; i++)
- if (regcache_valid_p (regcache, tdep->ppc_gp0_regnum + i))
+ if (REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_gp0_regnum + i))
{
if (arch64)
{
{
if (arch64)
{
@@
-1494,19
+1500,23
@@
store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
fill_sprs32 (regcache, &tmp_iar, &tmp_msr, &tmp_cr, &tmp_lr, &tmp_ctr,
&tmp_xer, &tmp_fpscr);
fill_sprs32 (regcache, &tmp_iar, &tmp_msr, &tmp_cr, &tmp_lr, &tmp_ctr,
&tmp_xer, &tmp_fpscr);
- if (regcache_valid_p (regcache, gdbarch_pc_regnum (gdbarch)))
+ if (REG_VALID == regcache_register_status (regcache,
+ gdbarch_pc_regnum (gdbarch)))
ctx.iar = tmp_iar;
ctx.iar = tmp_iar;
- if (
regcache_valid_p
(regcache, tdep->ppc_ps_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_ps_regnum))
ctx.msr = tmp_msr;
ctx.msr = tmp_msr;
- if (
regcache_valid_p
(regcache, tdep->ppc_cr_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_cr_regnum))
ctx.cr = tmp_cr;
ctx.cr = tmp_cr;
- if (
regcache_valid_p
(regcache, tdep->ppc_lr_regnum))
+ if (
REG_VALID == regcache_register_status
(regcache, tdep->ppc_lr_regnum))
ctx.lr = tmp_lr;
ctx.lr = tmp_lr;
- if (regcache_valid_p (regcache, tdep->ppc_ctr_regnum))
+ if (REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_ctr_regnum))
ctx.ctr = tmp_ctr;
ctx.ctr = tmp_ctr;
- if (regcache_valid_p (regcache, tdep->ppc_xer_regnum))
+ if (REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_xer_regnum))
ctx.xer = tmp_xer;
ctx.xer = tmp_xer;
- if (regcache_valid_p (regcache, tdep->ppc_xer_regnum))
+ if (REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_xer_regnum))
ctx.fpscr = tmp_fpscr;
}
ctx.fpscr = tmp_fpscr;
}
@@
-1620,7
+1630,8
@@
store_regs_kernel_thread (const struct regcache *regcache, int regno,
sprs32.pt_fpscr = tmp_fpscr;
if (tdep->ppc_mq_regnum >= 0)
sprs32.pt_fpscr = tmp_fpscr;
if (tdep->ppc_mq_regnum >= 0)
- if (regcache_valid_p (regcache, tdep->ppc_mq_regnum))
+ if (REG_VALID == regcache_register_status (regcache,
+ tdep->ppc_mq_regnum))
regcache_raw_collect (regcache, tdep->ppc_mq_regnum,
&sprs32.pt_mq);
regcache_raw_collect (regcache, tdep->ppc_mq_regnum,
&sprs32.pt_mq);
This page took
0.052142 seconds
and
4
git commands to generate.