diff options
author | Daniel Jacobowitz <dan@debian.org> | 2003-09-08 18:56:03 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2003-09-08 18:56:03 +0000 |
commit | 4bc9c65eb7bfe01c8c44a83c126de2cd7f025f25 (patch) | |
tree | fc5cd075cf3598903738041108795d6abc7623b0 /gdb/frame.h | |
parent | 61149efd2b078ed0597413483679e46fe4b4d2e8 (diff) | |
download | gdb-4bc9c65eb7bfe01c8c44a83c126de2cd7f025f25.tar.gz |
* frame.c (deprecated_safe_get_selected_frame): New function.
* frame.h (deprecated_safe_get_selected_frame): Add prototype.
* findvar.c (read_var_value): Call it.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index 8851b3a27b0..afbde74c8a7 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -639,6 +639,19 @@ extern void return_command (char *, int); extern struct frame_info *deprecated_selected_frame; +/* NOTE: drow/2003-09-06: + + This function is "a step sideways" for uses of deprecated_selected_frame. + They should be fixed as above, but meanwhile, we needed a solution for + cases where functions are called with a NULL frame meaning either "the + program is not running" or "use the selected frame". Lazy building of + deprecated_selected_frame confuses the situation, because now + deprecated_selected_frame can be NULL even when the inferior is running. + + This function calls get_selected_frame if the inferior should have a + frame, or returns NULL otherwise. */ + +extern struct frame_info *deprecated_safe_get_selected_frame (void); /* Create a frame using the specified BASE and PC. */ |