Index: gdb/testsuite/gdb.base/auxv.c |
diff --git a/gdb/testsuite/gdb.base/auxv.c b/gdb/testsuite/gdb.base/auxv.c |
index ed5f2b6ec40a24e171621a8b453e4469475e2fab..c87d0f7c2e42a7de93f592645ad6696057d7867f 100644 |
--- a/gdb/testsuite/gdb.base/auxv.c |
+++ b/gdb/testsuite/gdb.base/auxv.c |
@@ -35,6 +35,13 @@ |
#define ABORT {char *invalid = 0; *invalid = 0xFF;} |
#endif |
+#ifdef USE_RLIMIT |
+# include <sys/resource.h> |
+# ifndef RLIM_INFINITY |
+# define RLIM_INFINITY -1 |
+# endif |
+#endif /* USE_RLIMIT */ |
+ |
/* Don't make these automatic vars or we will have to walk back up the |
stack to access them. */ |
@@ -53,6 +60,14 @@ func2 (int x) |
int i; |
static int y; |
+#ifdef USE_RLIMIT |
+ { |
+ struct rlimit rlim = { RLIM_INFINITY, RLIM_INFINITY }; |
+ |
+ setrlimit (RLIMIT_CORE, &rlim); |
+ } |
+#endif |
+ |
/* Make sure that coremaker_local doesn't get optimized away. */ |
for (i = 0; i < 5; i++) |
coremaker_local[i] = i; |