public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Kamil Rytarowski <krytarowski@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Remove obsolete and unused inf_ptrace_target::auxv_parse
Date: Fri, 17 Apr 2020 03:53:10 +0000 (GMT)	[thread overview]
Message-ID: <20200417035310.20B2A385B835@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3557f442a1881271652581b4a66c206d5b348c5d

commit 3557f442a1881271652581b4a66c206d5b348c5d
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Wed Apr 15 21:32:08 2020 +0200

    Remove obsolete and unused inf_ptrace_target::auxv_parse
    
    The only two potential users (NetBSD, OpenBSD) use svr4_auxv_parse.
    
    gdb/ChangeLog:
    
            * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
            * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.

Diff:
---
 gdb/ChangeLog    |  5 +++++
 gdb/inf-ptrace.c | 36 ------------------------------------
 gdb/inf-ptrace.h |  5 -----
 3 files changed, 5 insertions(+), 41 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c57ffe1a7b3..b03101c8cd9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-16  Kamil Rytarowski  <n54@gmx.com>
+
+	* nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
+	* nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
+
 2020-04-16  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	* windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index 1fa7aa3f73e..06d23ae457d 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -643,39 +643,3 @@ inf_ptrace_target::pid_to_str (ptid_t ptid)
 {
   return normal_pid_to_str (ptid);
 }
-
-#if defined (PT_IO) && defined (PIOD_READ_AUXV)
-
-/* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
-   Return 0 if *READPTR is already at the end of the buffer.
-   Return -1 if there is insufficient buffer for a whole entry.
-   Return 1 if an entry was read into *TYPEP and *VALP.  */
-
-int
-inf_ptrace_target::auxv_parse (gdb_byte **readptr, gdb_byte *endptr,
-			       CORE_ADDR *typep, CORE_ADDR *valp)
-{
-  struct type *int_type = builtin_type (target_gdbarch ())->builtin_int;
-  struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
-  const int sizeof_auxv_type = TYPE_LENGTH (int_type);
-  const int sizeof_auxv_val = TYPE_LENGTH (ptr_type);
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
-  gdb_byte *ptr = *readptr;
-
-  if (endptr == ptr)
-    return 0;
-
-  if (endptr - ptr < 2 * sizeof_auxv_val)
-    return -1;
-
-  *typep = extract_unsigned_integer (ptr, sizeof_auxv_type, byte_order);
-  ptr += sizeof_auxv_val;	/* Alignment.  */
-  *valp = extract_unsigned_integer (ptr, sizeof_auxv_val, byte_order);
-  ptr += sizeof_auxv_val;
-
-  *readptr = ptr;
-  return 1;
-}
-
-#endif
-\f
diff --git a/gdb/inf-ptrace.h b/gdb/inf-ptrace.h
index 05c1277ec4e..2178b1baab7 100644
--- a/gdb/inf-ptrace.h
+++ b/gdb/inf-ptrace.h
@@ -68,11 +68,6 @@ struct inf_ptrace_target : public inf_child_target
 					ULONGEST offset, ULONGEST len,
 					ULONGEST *xfered_len) override;
 
-#if defined (PT_IO) && defined (PIOD_READ_AUXV)
-  int auxv_parse (gdb_byte **readptr,
-		  gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp) override;
-#endif
-
 protected:
   /* Cleanup the inferior after a successful ptrace detach.  */
   void detach_success (inferior *inf);


                 reply	other threads:[~2020-04-17  3:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200417035310.20B2A385B835@sourceware.org \
    --to=krytarowski@sourceware.org \
    --cc=gdb-cvs@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).