GDB (API)
/home/stan/gdb/src/gdb/dummy-frame.h
Go to the documentation of this file.
00001 /* Code dealing with dummy stack frames, for GDB, the GNU debugger.
00002 
00003    Copyright (C) 2002-2013 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 3 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00019 
00020 #if !defined (DUMMY_FRAME_H)
00021 #define DUMMY_FRAME_H 1
00022 
00023 #include "frame.h"
00024 
00025 struct infcall_suspend_state;
00026 struct frame_unwind;
00027 
00028 /* Push the information needed to identify, and unwind from, a dummy
00029    frame onto the dummy frame stack.  */
00030 
00031 /* NOTE: cagney/2004-08-02: This interface will eventually need to be
00032    parameterized with the caller's thread - that will allow per-thread
00033    dummy-frame stacks and, hence, per-thread inferior function
00034    calls.  */
00035 
00036 /* NOTE: cagney/2004-08-02: In the case of ABIs using push_dummy_code
00037    containing more than one instruction, this interface many need to
00038    be expanded so that it knowns the lower/upper extent of the dummy
00039    frame's code.  */
00040 
00041 extern void dummy_frame_push (struct infcall_suspend_state *caller_state,
00042                               const struct frame_id *dummy_id);
00043 
00044 /* Pop the dummy frame DUMMY_ID, restoring program state to that before the
00045    frame was created.
00046    On return reinit_frame_cache has been called.
00047    If the frame isn't found, flag an internal error.
00048 
00049    NOTE: This can only pop the one frame, even if it is in the middle of the
00050    stack, because the other frames may be for different threads, and there's
00051    currently no way to tell which stack frame is for which thread.  */
00052 
00053 extern void dummy_frame_pop (struct frame_id dummy_id);
00054 
00055 extern void dummy_frame_discard (struct frame_id dummy_id);
00056 
00057 /* If the PC falls in a dummy frame, return a dummy frame
00058    unwinder.  */
00059 
00060 extern const struct frame_unwind dummy_frame_unwind;
00061 
00062 #endif /* !defined (DUMMY_FRAME_H)  */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines