aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-01-20 18:33:27 +0000
committerDaniel Jacobowitz <drow@false.org>2007-01-20 18:33:27 +0000
commit359901206052b202ba95bb1f3b7dce00e4adde60 (patch)
tree4c5f97380ced355ce2355193cf8215d31dd6d3d8 /gdb
parent7b6b9e83ffd92aba8030e75a05b66fa490ad9624 (diff)
downloadgdb-359901206052b202ba95bb1f3b7dce00e4adde60.zip
gdb-359901206052b202ba95bb1f3b7dce00e4adde60.tar.gz
gdb-359901206052b202ba95bb1f3b7dce00e4adde60.tar.bz2
* gdb.base/bigcore.c (RLIMIT_CAP): Define.
(maximize_rlimit): Reduce limits on 64-bit systems.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/bigcore.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 81cbce0..c876e51 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-20 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * gdb.base/bigcore.c (RLIMIT_CAP): Define.
+ (maximize_rlimit): Reduce limits on 64-bit systems.
+
2007-01-19 Mark Kettenis <kettenis@gnu.org>
From Marcus Deuling <deuling@de.ibm.com>:
diff --git a/gdb/testsuite/gdb.base/bigcore.c b/gdb/testsuite/gdb.base/bigcore.c
index 46b5e2a..367485b 100644
--- a/gdb/testsuite/gdb.base/bigcore.c
+++ b/gdb/testsuite/gdb.base/bigcore.c
@@ -31,6 +31,13 @@
#include <stdlib.h>
#include <unistd.h>
+/* This test was written for >2GB core files on 32-bit systems. On
+ current 64-bit systems, generating a >4EB (2 ** 63) core file is
+ not practical, and getting as close as we can takes a lot of
+ useless CPU time. So limit ourselves to a bit bigger than
+ 32-bit, which is still a useful test. */
+#define RLIMIT_CAP (1ULL << 34)
+
/* Print routines:
The following are so that printf et.al. can be avoided. Those
@@ -110,6 +117,8 @@ maximize_rlimit (int resource, const char *prefix)
print_rlimit (resource);
getrlimit (resource, &rl);
rl.rlim_cur = rl.rlim_max;
+ if (sizeof (rl.rlim_cur) >= sizeof (RLIMIT_CAP))
+ rl.rlim_cur = (rlim_t) RLIMIT_CAP;
setrlimit (resource, &rl);
print_string (" -> ");
print_rlimit (resource);