diff options
author | Paul N. Hilfinger <hilfinger@adacore.com> | 2004-01-29 11:15:44 +0000 |
---|---|---|
committer | Paul N. Hilfinger <hilfinger@adacore.com> | 2004-01-29 11:15:44 +0000 |
commit | d8679d841d339ff4a3cefb479d3fab1d35866bd7 (patch) | |
tree | b59f02368c83835e2fde09a49d30518f8e858455 /gdb/testsuite/gdb.base/chng-syms.c | |
parent | 481fedf372286d5752544d8d6828f552f77f5d70 (diff) | |
download | gdb-d8679d841d339ff4a3cefb479d3fab1d35866bd7.zip gdb-d8679d841d339ff4a3cefb479d3fab1d35866bd7.tar.gz gdb-d8679d841d339ff4a3cefb479d3fab1d35866bd7.tar.bz2 |
New test to check that GDB does not crash due to memory corruption
when a reload caused by a change in an executable invalidates
a breakpoint condition.
Diffstat (limited to 'gdb/testsuite/gdb.base/chng-syms.c')
-rw-r--r-- | gdb/testsuite/gdb.base/chng-syms.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/chng-syms.c b/gdb/testsuite/gdb.base/chng-syms.c new file mode 100644 index 0000000..3394f5c --- /dev/null +++ b/gdb/testsuite/gdb.base/chng-syms.c @@ -0,0 +1,22 @@ +/* + * Test that GDB cleans up properly after errors that result when a + * breakpoint is reset. + */ + +/* VARIABLE is a macro defined on the compiler command line. */ + +#include <stdlib.h> + +int VARIABLE = 42; + +void stop_here () +{ + VARIABLE *= 2; +} + +int main () +{ + stop_here (); + exit (0); +} + |