Path: blob/master/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/Stub.java
41161 views
/*1* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324package sun.jvm.hotspot.code;2526import java.io.*;27import sun.jvm.hotspot.code.*;28import sun.jvm.hotspot.debugger.*;29import sun.jvm.hotspot.runtime.*;30import sun.jvm.hotspot.utilities.*;3132/** A port of the VM's Stub mechanism. Note that the separation of33Stub and StubInterface (done in the VM to save space) is not34currently necessary in these APIs and has been flattened so that35class Stub has virtual functions overridden by concrete36subclasses. */3738public class Stub extends VMObject {3940public Stub(Address addr) {41super(addr);42}4344// NOTE (FIXME): initialize(int) / finalize() elided for now4546//47// General info/converters48//4950/** Must return the size provided by initialize */51public long getSize() { Assert.that(false, "should not call this"); return 0; }52// NOTE (FIXME): code_size_to_size elided for now (would be a good reason for inserting the StubInterface abstraction)53/** Needed to add this for iteration */54public Address getAddress() { return addr; }5556//57// Code info58//5960/** Points to the first byte of the code */61public Address codeBegin() { Assert.that(false, "should not call this"); return null; }62/** Points to the first byte after the code */63public Address codeEnd() { Assert.that(false, "should not call this"); return null; }6465//66// Debugging67//6869/** Verifies the Stub */70public void verify() { Assert.that(false, "should not call this"); }71/** Prints some information about the stub */72public void printOn(PrintStream tty) { Assert.that(false, "should not call this"); }73}747576