diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-02-01 20:19:06 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-02-01 20:19:06 +0000 |
commit | e4b7f41c57cb9a4c57cb7767f332bb8f99976369 (patch) | |
tree | 0e02aba03faccdc2207eb78e85cb2ea96ba66744 /gdb/testsuite | |
parent | 7618e12bcb8f15e83c8c6abc5216f520f09bdbf9 (diff) | |
download | gdb-e4b7f41c57cb9a4c57cb7767f332bb8f99976369.zip gdb-e4b7f41c57cb9a4c57cb7767f332bb8f99976369.tar.gz gdb-e4b7f41c57cb9a4c57cb7767f332bb8f99976369.tar.bz2 |
gdb/
PR libc/11214:
* linux-low.c (linux_tracefork_child) [!(__UCLIBC__ && HAS_NOMMU)]: New.
(linux_test_for_tracefork): Move `stack' into [__UCLIBC__ && HAS_NOMMU].
(linux_test_for_tracefork) [!(__UCLIBC__ && HAS_NOMMU)]: New.
gdb/testsuite/
PR libc/11214:
* gdb.threads/current-lwp-dead.c: Include features.h.
(HAS_NOMMU): New.
(fn, main): Move CLONE_VM into [__UCLIBC__ && HAS_NOMMU].
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.threads/current-lwp-dead.c | 21 |
2 files changed, 24 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 01613dd..0be26e6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2010-02-01 Jan Kratochvil <jan.kratochvil@redhat.com> + PR libc/11214: + * gdb.threads/current-lwp-dead.c: Include features.h. + (HAS_NOMMU): New. + (fn, main): Move CLONE_VM into [__UCLIBC__ && HAS_NOMMU]. + +2010-02-01 Jan Kratochvil <jan.kratochvil@redhat.com> + * gdb.base/symbol-without-target_section.exp, gdb.base/symbol-without-target_section.c: New. diff --git a/gdb/testsuite/gdb.threads/current-lwp-dead.c b/gdb/testsuite/gdb.threads/current-lwp-dead.c index 834b8b7..16f8705 100644 --- a/gdb/testsuite/gdb.threads/current-lwp-dead.c +++ b/gdb/testsuite/gdb.threads/current-lwp-dead.c @@ -30,6 +30,13 @@ #include <unistd.h> #include <stdlib.h> +#include <features.h> +#ifdef __UCLIBC__ +#if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__)) +#define HAS_NOMMU +#endif +#endif + #define STACK_SIZE 0x1000 static int @@ -51,8 +58,11 @@ fn (void *unused) stack = malloc (STACK_SIZE); assert (stack != NULL); - new_pid = clone (fn_return, stack + STACK_SIZE, CLONE_FILES | CLONE_VM, NULL, - NULL, NULL, NULL); + new_pid = clone (fn_return, stack + STACK_SIZE, CLONE_FILES +#if defined(__UCLIBC__) && defined(HAS_NOMMU) + | CLONE_VM +#endif /* defined(__UCLIBC__) && defined(HAS_NOMMU) */ + , NULL, NULL, NULL, NULL); assert (new_pid > 0); return 0; @@ -67,8 +77,11 @@ main (int argc, char **argv) stack = malloc (STACK_SIZE); assert (stack != NULL); - new_pid = clone (fn, stack + STACK_SIZE, CLONE_FILES | CLONE_VM, NULL, NULL, - NULL, NULL); + new_pid = clone (fn, stack + STACK_SIZE, CLONE_FILES +#if defined(__UCLIBC__) && defined(HAS_NOMMU) + | CLONE_VM +#endif /* defined(__UCLIBC__) && defined(HAS_NOMMU) */ + , NULL, NULL, NULL, NULL); assert (new_pid > 0); return 0; |