From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 5/5][OPTIONAL] Remove ancient workaround
Date: Fri, 28 Sep 2018 14:59:00 -0000 [thread overview]
Message-ID: <1538146201-16374-6-git-send-email-gbenson@redhat.com> (raw)
In-Reply-To: <1538146201-16374-1-git-send-email-gbenson@redhat.com>
This commit removes a workaround for a bug in glibc 2.1.3, which
was released 2000-02-24 and superseded 2000-11-09.
gdb/ChangeLog:
* gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
* proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
prfpregset_t instead of gdb_prfpregset_t.
* configure.ac (PRFPREGSET_T_BROKEN): Remove check.
* configure, config.in: Rebuild.
---
gdb/ChangeLog | 8 ++++++++
gdb/config.in | 3 ---
gdb/configure | 41 -----------------------------------------
gdb/configure.ac | 27 ---------------------------
gdb/gdb_proc_service.h | 14 --------------
gdb/proc-service.c | 5 +++--
6 files changed, 11 insertions(+), 87 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index fc7c859..f0d1414 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -622,9 +622,6 @@
/* Additional package description */
#undef PKGVERSION
-/* Define if the prfpregset_t type is broken. */
-#undef PRFPREGSET_T_BROKEN
-
/* Define to 1 if the "%H, %D and %DD" formats work to print decfloats. */
#undef PRINTF_HAS_DECFLOAT
diff --git a/gdb/configure b/gdb/configure
index 4a725f6..b7c4ff6 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -14673,47 +14673,6 @@ $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
-
-
-
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
-$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
- if ${gdb_cv_prfpregset_t_broken+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- gdb_cv_prfpregset_t_broken=yes
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/procfs.h>
- int main ()
- {
- if (sizeof (prfpregset_t) == sizeof (void *))
- return 1;
- return 0;
- }
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gdb_cv_prfpregset_t_broken=no
-else
- gdb_cv_prfpregset_t_broken=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
-$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
- if test $gdb_cv_prfpregset_t_broken = yes; then
-
-$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
-
- fi
- fi
fi
# Check if the compiler supports the `long long' type.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index a469d0a..7f6a403 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1529,33 +1529,6 @@ if test "$ac_cv_header_sys_procfs_h" = yes; then
BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_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 gdb_proc_service.h.
-
- 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, 1,
- [Define if the prfpregset_t type is broken.])
- fi
- fi
fi
# Check if the compiler supports the `long long' type.
diff --git a/gdb/gdb_proc_service.h b/gdb/gdb_proc_service.h
index 76cc624..a968748 100644
--- a/gdb/gdb_proc_service.h
+++ b/gdb/gdb_proc_service.h
@@ -21,22 +21,8 @@
#include "common/gdb_proc_service.h"
-#include "gregset.h"
-
struct thread_info;
-/* Fix-up some broken systems. */
-
-/* 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 gdb_fpregset_t gdb_prfpregset_t;
-#else
-typedef prfpregset_t gdb_prfpregset_t;
-#endif
-
/* GDB specific structure that identifies the target process. */
struct ps_prochandle
{
diff --git a/gdb/proc-service.c b/gdb/proc-service.c
index 8340f95..dde4e6c 100644
--- a/gdb/proc-service.c
+++ b/gdb/proc-service.c
@@ -173,7 +173,8 @@ ps_lsetregs (struct ps_prochandle *ph, lwpid_t lwpid, const prgregset_t gregset)
process PH and store them in FPREGSET. */
ps_err_e
-ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid, gdb_prfpregset_t *fpregset)
+ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
+ prfpregset_t *fpregset)
{
struct regcache *regcache = get_ps_regcache (ph, lwpid);
@@ -188,7 +189,7 @@ ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid, gdb_prfpregset_t *fpregs
ps_err_e
ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
- const gdb_prfpregset_t *fpregset)
+ const prfpregset_t *fpregset)
{
struct regcache *regcache = get_ps_regcache (ph, lwpid);
--
1.8.3.1
next prev parent reply other threads:[~2018-09-28 14:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 14:50 [PATCH 0/5] Merge common proc_service headers Gary Benson
2018-09-28 14:50 ` [PATCH 3/5] Update GDB gdb_proc_service.h workaround to match gdbserver Gary Benson
2018-09-28 19:36 ` Tom Tromey
2018-09-28 14:50 ` [PATCH 2/5] Add workaround from gdbserver's gdb_proc_service.h to GDB Gary Benson
2018-09-28 19:34 ` Tom Tromey
2018-09-28 14:50 ` [PATCH 1/5] gdb_proc_service.h comment and whitespace synchronization Gary Benson
2018-09-28 19:28 ` Tom Tromey
2018-09-28 14:58 ` [PATCH 4/5] Move duplicated code to common/gdb_proc_service.h Gary Benson
2018-09-28 19:40 ` Tom Tromey
2018-09-28 14:59 ` Gary Benson [this message]
2018-09-28 19:44 ` [PATCH 5/5][OPTIONAL] Remove ancient workaround Tom Tromey
2018-09-28 19:33 ` [PATCH 0/5] Merge common proc_service headers Tom Tromey
2018-09-28 19:46 ` Tom Tromey
2018-10-01 8:27 ` Gary Benson
2018-10-05 14:23 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1538146201-16374-6-git-send-email-gbenson@redhat.com \
--to=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).