This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Improve comment for frame.c:get_prev_frame()
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 11 Jan 2004 17:52:32 +0100 (CET)
- Subject: [PATCH] Improve comment for frame.c:get_prev_frame()
This adds a comment that states clearly that get_prev_frame should not
check for the program-counter to contain zero.
Committed,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* frame.c: Update copyright year.
(get_prev_frame): Improve comment.
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.154
diff -u -p -r1.154 frame.c
--- frame.c 5 Jan 2004 20:33:35 -0000 1.154
+++ frame.c 11 Jan 2004 16:50:15 -0000
@@ -1,7 +1,7 @@
/* Cache and manage frames for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -1726,7 +1726,12 @@ legacy_get_prev_frame (struct frame_info
/* Return a structure containing various interesting information
about the frame that called THIS_FRAME. Returns NULL
- if there is no such frame. */
+ if there is no such frame.
+
+ This function tests some target-independent conditions that should
+ terminate the frame chain, such as unwinding past main(). It
+ should not contain any target-dependent tests, such as checking
+ whether the program-counter is zero. */
struct frame_info *
get_prev_frame (struct frame_info *this_frame)