Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb On NetBSD the auxv tag is always ...



details:   https://anonhg.NetBSD.org/src/rev/a628092ccda4
branches:  trunk
changeset: 458827:a628092ccda4
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Aug 12 05:40:42 2019 +0000

description:
On NetBSD the auxv tag is always 32 bits long. Gdb assumes it is 64 on _LP64.
This works most of the time, except for 64 bit big endian (sparc64 eg).

diffstat:

 external/gpl3/gdb/dist/gdb/auxv.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r cab2da448a92 -r a628092ccda4 external/gpl3/gdb/dist/gdb/auxv.c
--- a/external/gpl3/gdb/dist/gdb/auxv.c Mon Aug 12 03:51:23 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/auxv.c Mon Aug 12 05:40:42 2019 +0000
@@ -266,8 +266,12 @@
 
   if (endptr - ptr < sizeof_auxv_field * 2)
     return -1;
-
-  *typep = extract_unsigned_integer (ptr, sizeof_auxv_field, byte_order);
+#ifdef __NetBSD__
+  const int sizeof_auxv_type = 4;
+#else
+  const int sizeof_auxv_type = sizeof_auxv_field;
+#endif
+  *typep = extract_unsigned_integer (ptr, sizeof_auxv_type, byte_order);
   ptr += sizeof_auxv_field;
   *valp = extract_unsigned_integer (ptr, sizeof_auxv_field, byte_order);
   ptr += sizeof_auxv_field;



Home | Main Index | Thread Index | Old Index