diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/huge.c')
-rw-r--r-- | gdb/testsuite/gdb.base/huge.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/huge.c b/gdb/testsuite/gdb.base/huge.c new file mode 100644 index 0000000..e84b97a --- /dev/null +++ b/gdb/testsuite/gdb.base/huge.c @@ -0,0 +1,19 @@ +/* + * Test GDB's ability to read a very large data object from target memory. + */ + +/* + * A value that will produce a target data object + * large enough to crash GDB. 0x200000 is big enough + * on Linux, other systems may need a larger number. + */ + +#define CRASH_GDB 0x200000 + +static int a[CRASH_GDB], b[CRASH_GDB]; + +main() +{ + memcpy (a, b, sizeof (a)); + return 0; +} |