Remove obsolete and unused inf_ptrace_target::auxv_parse
authorKamil Rytarowski <n54@gmx.com>
Wed, 15 Apr 2020 19:32:08 +0000 (21:32 +0200)
committerKamil Rytarowski <n54@gmx.com>
Fri, 17 Apr 2020 03:52:43 +0000 (05:52 +0200)
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.

gdb/ChangeLog
gdb/inf-ptrace.c
gdb/inf-ptrace.h

index c57ffe1a7b30ed8c5f01b828073d36ea12fe891e..b03101c8cd971a8563a7511b6ba2561fe88db57b 100644 (file)
@@ -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
index 1fa7aa3f73e996024ef9df7c09477fc223b93cc4..06d23ae457db10080fd1541c27fb512b5e28ac98 100644 (file)
@@ -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
index 05c1277ec4e24789c4a9de772bb2a9e3684c3b95..2178b1baab7717808bd5670a5ce57025f4a8188a 100644 (file)
@@ -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);
This page took 0.05636 seconds and 4 git commands to generate.