From 008f8f2ee9bf610485993a17c1c460afb3cadc6c Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 18 Mar 2011 18:45:30 +0000 Subject: gdb/ * frame.h (frame_unwind_caller_pc_if_available): Declare. * frame.c (frame_unwind_caller_pc_if_available): New. * stack.c (frame_info): Handle unavailable PC. --- gdb/frame.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/frame.h') diff --git a/gdb/frame.h b/gdb/frame.h index 25f20a9..7bc1148 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -562,6 +562,14 @@ extern void put_frame_register_bytes (struct frame_info *frame, int regnum, extern CORE_ADDR frame_unwind_caller_pc (struct frame_info *frame); +/* Same as frame_unwind_caller_pc, but returns a boolean indication of + whether the caller PC is determinable (when the PC is unavailable, + it will not be), instead of possibly throwing an error trying to + read unavailable memory or registers. */ + +extern int frame_unwind_caller_pc_if_available (struct frame_info *this_frame, + CORE_ADDR *pc); + /* Discard the specified frame. Restoring the registers to the state of the caller. */ extern void frame_pop (struct frame_info *frame); -- cgit v1.1