From 7cc19214aa83761f61b42a8eed01732d39495972 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 10 Apr 2002 22:14:02 +0000 Subject: * stack.c (select_frame): Check that selected_frame and the specified level are as expected. * blockframe.c (get_prev_frame): Set the `level' from next_frame. Update copyright. * frame.h (struct frame_info): Add field `level'. Update copyright. Work-in-progress PR gdb/464. --- gdb/frame.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'gdb/frame.h') diff --git a/gdb/frame.h b/gdb/frame.h index 5f952c5..a989890 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -1,6 +1,7 @@ /* Definitions for dealing with stack frames, for GDB, the GNU debugger. - Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, - 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + + Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, + 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GDB. @@ -63,6 +64,17 @@ struct frame_info For other frames, it is a pc saved in the next frame. */ CORE_ADDR pc; + /* Level of this frame. The inner-most (youngest) frame is at + level 0. As you move towards the outer-most (oldest) frame, + the level increases. This is a cached value. It could just as + easily be computed by counting back from the selected frame to + the inner most frame. */ + /* NOTE: cagney/2002-04-05: Perhaphs a level of ``-1'' should be + reserved to indicate a bogus frame - one that has been created + just to keep GDB happy (GDB always needs a frame). For the + moment leave this as speculation. */ + int level; + /* Nonzero if this is a frame associated with calling a signal handler. Set by machine-dependent code. On some machines, if -- cgit v1.1