diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-08-02 13:20:21 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-08-02 13:20:21 -0400 |
commit | f602c208ab509576f8d0a86cf5502c7742abe143 (patch) | |
tree | 5ee9d2f70d1fd97d6aa6175847b59dac25fe6592 /gcc | |
parent | 17f5f329caf90ce8f545c1790218606b37282f85 (diff) | |
download | gcc-f602c208ab509576f8d0a86cf5502c7742abe143.zip gcc-f602c208ab509576f8d0a86cf5502c7742abe143.tar.gz gcc-f602c208ab509576f8d0a86cf5502c7742abe143.tar.bz2 |
(flag_check_memory_usage, flag_prefix_function_name): New variable.
(f_options): Add `check-memory-usage' and `prefix_function_name'.
(main): Disable `-fomit-frame-pointer' if `-fcheck-memory-usage' is set
and the machine can't debug without the frame pointer.
From-SVN: r14617
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/toplev.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 434cfd4..f6c4a63 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -606,6 +606,16 @@ int flag_pack_struct = 0; to be allocated dynamically. */ int flag_stack_check; +/* -fcheck-memory-usage causes extra code to be generated in order to check + memory accesses. This is used by a detector of bad memory accesses such + as Checker. */ +int flag_check_memory_usage = 0; + +/* -fprefix-function-name causes function name to be prefixed. This + can be used with -fcheck-memory-usage to isolate code compiled with + -fcheck-memory-usage. */ +int flag_prefix_function_name = 0; + /* Table of language-independent -f options. STRING is the option name. VARIABLE is the address of the variable. ON_VALUE is the value to store in VARIABLE @@ -661,7 +671,9 @@ struct { char *string; int *variable; int on_value;} f_options[] = {"gnu-linker", &flag_gnu_linker, 1}, {"pack-struct", &flag_pack_struct, 1}, {"stack-check", &flag_stack_check, 1}, - {"bytecode", &output_bytecode, 1} + {"bytecode", &output_bytecode, 1}, + {"check-memory-usage", &flag_check_memory_usage, 1}, + {"prefix-function-name", &flag_prefix_function_name, 1} }; /* Table of language-specific options. */ @@ -4111,6 +4123,10 @@ main (argc, argv, envp) filename = argv[i]; } + /* Checker uses the frame pointer. */ + if (flag_check_memory_usage) + flag_omit_frame_pointer = 0; + /* Initialize for bytecode output. A good idea to do this as soon as possible after the "-f" options have been parsed. */ if (output_bytecode) |