Path: blob/master/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/MachineDescription.java
41161 views
/*1* Copyright (c) 2000, 2008, 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.debugger;2526import java.io.Serializable;2728/** Encapsulates machine-specific information that currently must be29exported up to the Java level. Implementations must be30serializable. */3132public interface MachineDescription extends Serializable {33/** Returns the size of an address in bytes. Currently needed to be34able to traverse arrays of pointers or oops. */35public long getAddressSize();3637/** Returns the maximum value of the C integer type with the given38size in bytes and signedness. Throws IllegalArgumentException if39the size in bytes is not legal for a C type (or can not be40handled by this system). Note that the current implementation41does not currently handle unsigned 8-byte longs properly. */42public long cIntegerTypeMaxValue(long sizeInBytes, boolean isUnsigned);4344/** Returns the minimum value of the C integer type with the given45size in bytes and signedness. Throws IllegalArgumentException if46the size in bytes is not legal for a C type (or can not be47handled by this system). */48public long cIntegerTypeMinValue(long sizeInBytes, boolean isUnsigned);4950/** Indicates whether the CPU is big- or little-endian. This51information is typically only needed by the Debugger52implementation. */53public boolean isBigEndian();5455/** Indicates whether the underlying machine supports the LP64 data56model (currently only SPARC/64). */57public boolean isLP64();58}596061