+/* return the address of the PC for the given FRAME, ie the current PC value
+ if FRAME is the innermost frame, or the address adjusted to point to the
+ call instruction if not. */
+
+CORE_ADDR
+frame_address_in_block (struct frame_info *frame)
+{
+ CORE_ADDR pc = frame->pc;
+
+ /* If we are not in the innermost frame, and we are not interrupted
+ by a signal, frame->pc points to the instruction following the
+ call. As a consequence, we need to get the address of the previous
+ instruction. Unfortunately, this is not straightforward to do, so
+ we just use the address minus one, which is a good enough
+ approximation. */
+ if (frame->next != 0 && frame->next->signal_handler_caller == 0)
+ --pc;
+
+ return pc;
+}