never@1445: /* never@1445: * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. twisti@1513: * Copyright 2008, 2009 Red Hat, Inc. never@1445: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. never@1445: * never@1445: * This code is free software; you can redistribute it and/or modify it never@1445: * under the terms of the GNU General Public License version 2 only, as never@1445: * published by the Free Software Foundation. never@1445: * never@1445: * This code is distributed in the hope that it will be useful, but WITHOUT never@1445: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or never@1445: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License never@1445: * version 2 for more details (a copy is included in the LICENSE file that never@1445: * accompanied this code). never@1445: * never@1445: * You should have received a copy of the GNU General Public License version never@1445: * 2 along with this work; if not, write to the Free Software Foundation, never@1445: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. never@1445: * never@1445: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, never@1445: * CA 95054 USA or visit www.sun.com if you need additional information or never@1445: * have any questions. never@1445: * never@1445: */ never@1445: never@1445: // | ... | never@1445: // +--------------------+ ------------------ never@1445: // | stack slot n-1 | low addresses never@1445: // | ... | never@1445: // | stack slot 0 | never@1445: // | monitor m-1 | never@1445: // | ... | never@1445: // | monitor 0 | never@1445: // | oop_tmp | never@1445: // | method | never@1445: // | unextended_sp | never@1445: // | pc | never@1445: // | frame_type | never@1445: // | next_frame | high addresses never@1445: // +--------------------+ ------------------ never@1445: // | ... | never@1445: never@1445: class SharkFrame : public ZeroFrame { twisti@1513: friend class SharkStack; never@1445: never@1445: private: never@1445: SharkFrame() : ZeroFrame() { never@1445: ShouldNotCallThis(); never@1445: } never@1445: never@1445: protected: never@1445: enum Layout { never@1445: pc_off = jf_header_words, never@1445: unextended_sp_off, never@1445: method_off, never@1445: oop_tmp_off, never@1445: header_words never@1445: }; never@1445: never@1445: public: never@1445: address pc() const { never@1445: return (address) value_of_word(pc_off); never@1445: } never@1445: never@1445: intptr_t* unextended_sp() const { never@1445: return (intptr_t *) value_of_word(unextended_sp_off); never@1445: } never@1445: never@1445: methodOop method() const { never@1445: return (methodOop) value_of_word(method_off); never@1445: } never@1445: never@1445: public: never@1445: void identify_word(int frame_index, never@1445: int offset, never@1445: char* fieldbuf, never@1445: char* valuebuf, never@1445: int buflen) const; never@1445: };