2000-04-13 Mark Kettenis <kettenis@gnu.org>
* acconfig.h (HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, HAVE_LWPID_T, HAVE_PSADDR_T): Add them here instead of in config.in. * acconfig.h (PRFPREGSET_T_BROKEN): New define. * configure.in: Add check for broken prfpregset_t type. * lin-thread.c (gdb_prfpregset): New typedef, depends on definition of PRFPREGSET_T_BROKEN. (ps_lgetfpregs, ps_lsetfpregs, p_td_thr_getfpregs, p_td_thr_setfpregs, thread_db_fetch_registers, thread_db_store_registers): Use gdb_prfpregset_t instead of prfpregset_t. * config.in: Regenerated. * configure: Regenerated.
This commit is contained in:
parent
0d8dfecfe9
commit
d84dd0c55e
6 changed files with 436 additions and 332 deletions
|
@ -1,3 +1,19 @@
|
|||
2000-04-13 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* acconfig.h (HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T, HAVE_LWPID_T,
|
||||
HAVE_PSADDR_T): Add them here instead of in config.in.
|
||||
|
||||
* acconfig.h (PRFPREGSET_T_BROKEN): New define.
|
||||
* configure.in: Add check for broken prfpregset_t type.
|
||||
* lin-thread.c (gdb_prfpregset): New typedef, depends on
|
||||
definition of PRFPREGSET_T_BROKEN.
|
||||
(ps_lgetfpregs, ps_lsetfpregs, p_td_thr_getfpregs,
|
||||
p_td_thr_setfpregs, thread_db_fetch_registers,
|
||||
thread_db_store_registers): Use gdb_prfpregset_t instead of
|
||||
prfpregset_t.
|
||||
* config.in: Regenerated.
|
||||
* configure: Regenerated.
|
||||
|
||||
2000-04-13 DJ Delorie <dj@cygnus.com>
|
||||
|
||||
* mips-tdep.c (do_fp_register_row): copy the number of bytes
|
||||
|
|
|
@ -13,6 +13,21 @@
|
|||
/* Define if gregset_t type is available. */
|
||||
#undef HAVE_GREGSET_T
|
||||
|
||||
/* Define if <sys/procfs.h> has prgregset_t. */
|
||||
#undef HAVE_PRGREGSET_T
|
||||
|
||||
/* Define if <sys/procfs.h> has prfpregset_t. */
|
||||
#undef HAVE_PRFPREGSET_T
|
||||
|
||||
/* Define if <sys/procfs.h> has lwpid_t. */
|
||||
#undef HAVE_LWPID_T
|
||||
|
||||
/* Define if <sys/procfs.h> has psaddr_t. */
|
||||
#undef HAVE_PSADDR_T
|
||||
|
||||
/* Define if the prfpregset_t type is broken. */
|
||||
#undef PRFPREGSET_T_BROKEN
|
||||
|
||||
/* Define if you want to use new multi-fd /proc interface
|
||||
(replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */
|
||||
#undef NEW_PROC_API
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
/* Define if compiling on Solaris 7. */
|
||||
#undef _MSE_INT_H
|
||||
|
||||
/* Define if the prfpregset_t type is broken. */
|
||||
#undef PRFPREGSET_T_BROKEN
|
||||
|
||||
/* Define if you want to use new multi-fd /proc interface
|
||||
(replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */
|
||||
#undef NEW_PROC_API
|
||||
|
|
686
gdb/configure
vendored
686
gdb/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -201,6 +201,32 @@ if test "$ac_cv_header_sys_procfs_h" = yes; then
|
|||
BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
|
||||
BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
|
||||
|
||||
dnl Check for broken prfpregset_t type
|
||||
|
||||
dnl For Linux/i386, glibc 2.1.3 was released with a bogus
|
||||
dnl prfpregset_t type (it's a typedef for the pointer to a struct
|
||||
dnl instead of the struct itself). We detect this here, and work
|
||||
dnl around it in lin-thread.c.
|
||||
|
||||
if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
|
||||
AC_MSG_CHECKING(whether prfpregset_t type is broken)
|
||||
AC_CACHE_VAL(gdb_cv_prfpregset_t_broken,
|
||||
[AC_TRY_RUN([#include <sys/procfs.h>
|
||||
int main ()
|
||||
{
|
||||
if (sizeof (prfpregset_t) == sizeof (void *))
|
||||
return 1;
|
||||
return 0;
|
||||
}],
|
||||
gdb_cv_prfpregset_t_broken=no,
|
||||
gdb_cv_prfpregset_t_broken=yes,
|
||||
gdb_cv_prfpregset_t_broken=yes)])
|
||||
AC_MSG_RESULT($gdb_cv_prfpregset_t_broken)
|
||||
if test $gdb_cv_prfpregset_t_broken = yes; then
|
||||
AC_DEFINE(PRFPREGSET_T_BROKEN)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Check for PIOCSET ioctl entry
|
||||
|
||||
AC_MSG_CHECKING(for PIOCSET ioctl entry in sys/procfs.h)
|
||||
|
|
|
@ -170,6 +170,16 @@ typedef const void *gdb_ps_write_buf_t;
|
|||
typedef size_t gdb_ps_size_t;
|
||||
#endif
|
||||
|
||||
/* Unfortunately glibc 2.1.3 was released with a broken prfpregset_t
|
||||
type. We let configure check for this lossage, and make
|
||||
appropriate typedefs here. */
|
||||
|
||||
#ifdef PRFPREGSET_T_BROKEN
|
||||
typedef elf_fpregset_t gdb_prfpregset_t;
|
||||
#else
|
||||
typedef prfpregset_t gdb_prfpregset_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* proc_service callback functions, called by thread_db.
|
||||
*/
|
||||
|
@ -392,7 +402,7 @@ ps_lsetregs (gdb_ps_prochandle_t ph, /* Set LWP general regs */
|
|||
ps_err_e
|
||||
ps_lgetfpregs (gdb_ps_prochandle_t ph, /* Get LWP float regs */
|
||||
lwpid_t lwpid,
|
||||
prfpregset_t *fpregset)
|
||||
gdb_prfpregset_t *fpregset)
|
||||
{
|
||||
struct cleanup *old_chain = save_inferior_pid ();
|
||||
|
||||
|
@ -406,7 +416,7 @@ ps_lgetfpregs (gdb_ps_prochandle_t ph, /* Get LWP float regs */
|
|||
ps_err_e
|
||||
ps_lsetfpregs (gdb_ps_prochandle_t ph, /* Set LWP float regs */
|
||||
lwpid_t lwpid,
|
||||
const prfpregset_t *fpregset)
|
||||
const gdb_prfpregset_t *fpregset)
|
||||
{
|
||||
struct cleanup *old_chain = save_inferior_pid ();
|
||||
|
||||
|
@ -508,10 +518,10 @@ static td_err_e (*p_td_thr_setgregs) (const td_thrhandle_t *th_p,
|
|||
const prgregset_t regset);
|
||||
|
||||
static td_err_e (*p_td_thr_getfpregs) (const td_thrhandle_t *th_p,
|
||||
prfpregset_t *fpregset);
|
||||
gdb_prfpregset_t *fpregset);
|
||||
|
||||
static td_err_e (*p_td_thr_setfpregs) (const td_thrhandle_t *th_p,
|
||||
const prfpregset_t *fpregset);
|
||||
const gdb_prfpregset_t *fpregset);
|
||||
|
||||
static td_err_e (*p_td_ta_map_id2thr) (const td_thragent_t *ta_p,
|
||||
thread_t tid,
|
||||
|
@ -1270,7 +1280,7 @@ thread_db_fetch_registers (regno)
|
|||
int regno;
|
||||
{
|
||||
td_thrhandle_t thandle;
|
||||
prfpregset_t fpregset;
|
||||
gdb_prfpregset_t fpregset;
|
||||
prgregset_t gregset;
|
||||
thread_t thread;
|
||||
td_err_e ret;
|
||||
|
@ -1321,7 +1331,7 @@ thread_db_store_registers (regno)
|
|||
int regno;
|
||||
{
|
||||
td_thrhandle_t thandle;
|
||||
prfpregset_t fpregset;
|
||||
gdb_prfpregset_t fpregset;
|
||||
prgregset_t gregset;
|
||||
thread_t thread;
|
||||
td_err_e ret;
|
||||
|
|
Loading…
Reference in a new issue