15796c8dcSSimon Schubert /* Code dealing with dummy stack frames, for GDB, the GNU debugger. 25796c8dcSSimon Schubert 3*ef5ccd6cSJohn Marino Copyright (C) 2002-2013 Free Software Foundation, Inc. 45796c8dcSSimon Schubert 55796c8dcSSimon Schubert This file is part of GDB. 65796c8dcSSimon Schubert 75796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify 85796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 95796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or 105796c8dcSSimon Schubert (at your option) any later version. 115796c8dcSSimon Schubert 125796c8dcSSimon Schubert This program is distributed in the hope that it will be useful, 135796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of 145796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 155796c8dcSSimon Schubert GNU General Public License for more details. 165796c8dcSSimon Schubert 175796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 185796c8dcSSimon Schubert along with this program. If not, see <http://www.gnu.org/licenses/>. */ 195796c8dcSSimon Schubert 205796c8dcSSimon Schubert #if !defined (DUMMY_FRAME_H) 215796c8dcSSimon Schubert #define DUMMY_FRAME_H 1 225796c8dcSSimon Schubert 235796c8dcSSimon Schubert #include "frame.h" 245796c8dcSSimon Schubert 25c50c785cSJohn Marino struct infcall_suspend_state; 265796c8dcSSimon Schubert struct frame_unwind; 275796c8dcSSimon Schubert 285796c8dcSSimon Schubert /* Push the information needed to identify, and unwind from, a dummy 295796c8dcSSimon Schubert frame onto the dummy frame stack. */ 305796c8dcSSimon Schubert 315796c8dcSSimon Schubert /* NOTE: cagney/2004-08-02: This interface will eventually need to be 325796c8dcSSimon Schubert parameterized with the caller's thread - that will allow per-thread 335796c8dcSSimon Schubert dummy-frame stacks and, hence, per-thread inferior function 345796c8dcSSimon Schubert calls. */ 355796c8dcSSimon Schubert 365796c8dcSSimon Schubert /* NOTE: cagney/2004-08-02: In the case of ABIs using push_dummy_code 375796c8dcSSimon Schubert containing more than one instruction, this interface many need to 385796c8dcSSimon Schubert be expanded so that it knowns the lower/upper extent of the dummy 395796c8dcSSimon Schubert frame's code. */ 405796c8dcSSimon Schubert 41c50c785cSJohn Marino extern void dummy_frame_push (struct infcall_suspend_state *caller_state, 425796c8dcSSimon Schubert const struct frame_id *dummy_id); 435796c8dcSSimon Schubert 445796c8dcSSimon Schubert /* Pop the dummy frame DUMMY_ID, restoring program state to that before the 455796c8dcSSimon Schubert frame was created. 465796c8dcSSimon Schubert On return reinit_frame_cache has been called. 475796c8dcSSimon Schubert If the frame isn't found, flag an internal error. 485796c8dcSSimon Schubert 495796c8dcSSimon Schubert NOTE: This can only pop the one frame, even if it is in the middle of the 505796c8dcSSimon Schubert stack, because the other frames may be for different threads, and there's 515796c8dcSSimon Schubert currently no way to tell which stack frame is for which thread. */ 525796c8dcSSimon Schubert 535796c8dcSSimon Schubert extern void dummy_frame_pop (struct frame_id dummy_id); 545796c8dcSSimon Schubert 55*ef5ccd6cSJohn Marino extern void dummy_frame_discard (struct frame_id dummy_id); 56*ef5ccd6cSJohn Marino 575796c8dcSSimon Schubert /* If the PC falls in a dummy frame, return a dummy frame 585796c8dcSSimon Schubert unwinder. */ 595796c8dcSSimon Schubert 60c50c785cSJohn Marino extern const struct frame_unwind dummy_frame_unwind; 615796c8dcSSimon Schubert 625796c8dcSSimon Schubert #endif /* !defined (DUMMY_FRAME_H) */ 63