frame_zero.hpp revision 1432
2080N/A/*
2080N/A * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
2080N/A * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
2080N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2080N/A *
2080N/A * This code is free software; you can redistribute it and/or modify it
2080N/A * under the terms of the GNU General Public License version 2 only, as
2080N/A * published by the Free Software Foundation.
2080N/A *
2080N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2080N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2080N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2080N/A * version 2 for more details (a copy is included in the LICENSE file that
2080N/A * accompanied this code).
2080N/A *
2080N/A * You should have received a copy of the GNU General Public License version
2080N/A * 2 along with this work; if not, write to the Free Software Foundation,
2080N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2080N/A *
2080N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
2080N/A * CA 95054 USA or visit www.sun.com if you need additional information or
2080N/A * have any questions.
2080N/A *
2080N/A */
2080N/A
2080N/A// A frame represents a physical stack frame on the Zero stack.
2080N/A
2080N/A public:
2080N/A enum {
2080N/A pc_return_offset = 0
2080N/A };
2080N/A
2080N/A // Constructor
2080N/A public:
2080N/A frame(ZeroFrame* zeroframe, intptr_t* sp);
2080N/A
2080N/A private:
2080N/A ZeroFrame* _zeroframe;
2080N/A
2080N/A public:
2080N/A const ZeroFrame *zeroframe() const {
2080N/A return _zeroframe;
2080N/A }
2080N/A
2080N/A intptr_t* fp() const {
2080N/A return (intptr_t *) zeroframe();
2080N/A }
2080N/A
2080N/A#ifdef CC_INTERP
2080N/A inline interpreterState get_interpreterState() const;
2080N/A#endif // CC_INTERP
2080N/A
2080N/A public:
2080N/A const EntryFrame *zero_entryframe() const {
2080N/A return zeroframe()->as_entry_frame();
2080N/A }
2080N/A const InterpreterFrame *zero_interpreterframe() const {
2080N/A return zeroframe()->as_interpreter_frame();
2080N/A }
2080N/A const SharkFrame *zero_sharkframe() const {
2080N/A return zeroframe()->as_shark_frame();
2080N/A }
2080N/A
2080N/A public:
2080N/A bool is_fake_stub_frame() const;
2080N/A
2080N/A public:
2080N/A frame sender_for_nonentry_frame(RegisterMap* map) const;
2080N/A
2080N/A public:
2080N/A void zero_print_on_error(int index,
2080N/A outputStream* st,
2080N/A char* buf,
2080N/A int buflen) const;
2080N/A