diff options
author | Pedro Alves <pedro@codesourcery.com> | 2011-03-18 18:44:33 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2011-03-18 18:44:33 +0000 |
commit | f86b56bf0dbd0ae8442aadc67aa63d3c78c57c1f (patch) | |
tree | 2a45f347e49c35662fc6eb32f446ef716511ba3e /gdb/blockframe.c | |
parent | 50c1f7174d688df6a3e1590b666b14d17efc5000 (diff) | |
download | gdb-f86b56bf0dbd0ae8442aadc67aa63d3c78c57c1f.tar.gz |
gdb/
* frame.c (frame_unwind_pc): Rename to ...
(frame_unwind_pc_if_available): ... this. New `pc' output
parameter. Change return type to int. Gracefully handle
gdbarch_unwind_pc throwing NOT_AVAILABLE_ERROR. Return 0 if that
happened, or 1 otherwise.
(frame_unwind_pc): Reimplement on top of
frame_unwind_pc_if_available.
(get_frame_func): Rename to ...
(get_frame_func_if_available): New `pc' output parameter. Change
return type to int. Gracefully handle the PC not being available.
(get_frame_func): Reimplement on top of
get_frame_func_if_available.
(select_frame): Handle the PC being unavailable.
(get_prev_frame): Handle the PC being unavailable.
(get_frame_pc_if_available): New.
(get_frame_address_in_block_if_available): New.
(find_frame_sal): Handle the frame PC not being available.
* frame.h (get_frame_pc_if_available): Declare.
(get_frame_address_in_block_if_available): Declare.
(get_frame_func_if_available): Declare.
* stack.c (print_frame_info): Handle the PC being unavailable.
(find_frame_funname): Ditto.
(print_frame): Handle the PC being unavailable.
(get_frame_language): Ditto.
* blockframe.c (get_frame_block): Ditto.
* macroscope.c (default_macro_scope): Ditto.
* tui/tui-stack.c (tui_show_frame_info): Ditto.
Diffstat (limited to 'gdb/blockframe.c')
-rw-r--r-- | gdb/blockframe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/blockframe.c b/gdb/blockframe.c index b9aaf54da61..5bc593034ea 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -58,10 +58,13 @@ struct block * get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block) { - const CORE_ADDR pc = get_frame_address_in_block (frame); + CORE_ADDR pc; struct block *bl; int inline_count; + if (!get_frame_address_in_block_if_available (frame, &pc)) + return NULL; + if (addr_in_block) *addr_in_block = pc; |