Module Name: src
Committed By: martin
Date: Mon Aug 12 17:29:46 UTC 2019
Modified Files:
src/external/gpl3/gdb/dist/gdb [netbsd-9]: auxv.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #47):
external/gpl3/gdb/dist/gdb/auxv.c: revision 1.2
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).
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 src/external/gpl3/gdb/dist/gdb/auxv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/gdb/auxv.c
diff -u src/external/gpl3/gdb/dist/gdb/auxv.c:1.1.1.7 src/external/gpl3/gdb/dist/gdb/auxv.c:1.1.1.7.2.1
--- src/external/gpl3/gdb/dist/gdb/auxv.c:1.1.1.7 Sun May 26 20:59:24 2019
+++ src/external/gpl3/gdb/dist/gdb/auxv.c Mon Aug 12 17:29:46 2019
@@ -266,8 +266,12 @@ default_auxv_parse (struct target_ops *o
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;