1/*
2 * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25package sun.jvm.hotspot.debugger.cdbg;
26
27import sun.jvm.hotspot.debugger.*;
28
29/** A LoadObject models a DSO/DLL/EXE; that is, an entity relocated by
30    the run-time linker. */
31
32public interface LoadObject {
33  /** Base address at which this loadobject was relocated at run-time */
34  public Address getBase();
35
36  /** Full path name of this loadobject */
37  public String getName();
38
39  /** Size of the loadobject in bytes (determines the range of program
40      counters and data contained within this loadobject) */
41  public long getSize();
42
43  /** Returns a debug info database for this loadobject if debug info
44      is present; otherwise, returns null. */
45  public CDebugInfoDataBase getDebugInfoDataBase() throws DebuggerException;
46
47  /** Get debug information for the given program counter. PC must be
48      contained within this loadobject or a DebuggerException is
49      thrown. Returns null if there is no debug information available
50      (i.e., because this is not a debug build). */
51  public BlockSym debugInfoForPC(Address pc) throws DebuggerException;
52
53  /** Fetch the name of the closest exported symbol and the distance
54      of the PC to that symbol. Returns null if the PC was not within
55      this loadobject or if a symbol could not be found before this
56      PC. FIXME: specify whether this is mangled/demangled. */
57  public ClosestSymbol closestSymbolToPC(Address pc) throws DebuggerException;
58
59  /** Returns line number information for the given PC, including
60      source file name (not specified whether this is an absolute or
61      relative path) and start and end PCs for this line. Returns null
62      if no line number information is available or if the given PC is
63      not in this loadobject. */
64  public LineNumberInfo lineNumberForPC(Address pc) throws DebuggerException;
65}
66