This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Fix for failing gdb.base/auxv.exp on Linux
- From: ppluzhnikov at google dot com (Paul Pluzhnikov)
- To: gdb-patches at sourceware dot org
- Date: Thu, 17 Jul 2008 13:06:30 -0700 (PDT)
- Subject: [RFA] Fix for failing gdb.base/auxv.exp on Linux
Greetings,
gdb.base/auxv.exp is failing for me on Linux, because 'info auxv'
from live process prints several trailing AT_NULL entries:
(gdb) inf auxv
32 AT_SYSINFO Special system info/entry points 0xffffe400
33 AT_SYSINFO_EHDR System-supplied DSO's ELF header 0xffffe000
...
15 AT_PLATFORM String identifying platform 0xffffda3b "i686"
0 AT_NULL End of vector 0x0
0 AT_NULL End of vector 0x0
0 AT_NULL End of vector 0x0
Attached patch terminates the list at first AT_NULL, and makes the
test succeed.
Ok to commit?
--
Paul Pluzhnikov
2008-07-17 Paul Pluzhnikov <ppluzhnikov@google.com>
* auxv.c (fprint_target_auxv): Stop at AT_NULL.
Index: auxv.c
===================================================================
RCS file: /cvs/src/src/gdb/auxv.c,v
retrieving revision 1.11
diff -u -p -u -r1.11 auxv.c
--- auxv.c 4 May 2008 09:28:27 -0000 1.11
+++ auxv.c 17 Jul 2008 18:57:18 -0000
@@ -246,6 +246,8 @@ fprint_target_auxv (struct ui_file *file
break;
}
++ents;
+ if (type == AT_NULL)
+ break;
}
xfree (data);