0
|
1 /*
|
|
2 * Copyright 2001 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
20 * CA 95054 USA or visit www.sun.com if you need additional information or
|
|
21 * have any questions.
|
|
22 *
|
|
23 */
|
|
24
|
|
25 package sun.jvm.hotspot.debugger.cdbg;
|
|
26
|
|
27 import sun.jvm.hotspot.debugger.*;
|
|
28
|
|
29 /** Database for C and C++ debug information. This is being kept as
|
|
30 minimal as possible for now. It is not complete; for example, it
|
|
31 will have to be extended to support scoped information (module
|
|
32 scope, namespace scope). */
|
|
33
|
|
34 public interface CDebugInfoDataBase {
|
|
35 /** Name-to-type mapping */
|
|
36 public Type lookupType(String name);
|
|
37
|
|
38 /** Name-to-type mapping with const/volatile qualifications */
|
|
39 public Type lookupType(String name, int cvAttributes);
|
|
40
|
|
41 /** Iteration through all types */
|
|
42 public void iterate(TypeVisitor t);
|
|
43
|
|
44 /** Return debug info (closest lexically-enclosing block) for
|
|
45 current program counter. Returns null if no debug information
|
|
46 found or available. */
|
|
47 public BlockSym debugInfoForPC(Address pc);
|
|
48
|
|
49 /** Look up global or module-local symbol by name. FIXME: need some
|
|
50 way to identify modules -- has not been thought through yet
|
|
51 because it isn't clear exactly how these are represented in the
|
|
52 Visual C++ debug info. */
|
|
53 public GlobalSym lookupSym(String name);
|
|
54
|
|
55 /** Returns line number information for the given PC, including
|
|
56 source file name (not specified whether this is an absolute or
|
|
57 relative path) and start and end PCs for this line. Returns null
|
|
58 if no line number information is available. */
|
|
59 public LineNumberInfo lineNumberForPC(Address pc) throws DebuggerException;
|
|
60
|
|
61 /** Iteration through all line number information in this
|
|
62 database. */
|
|
63 public void iterate(LineNumberVisitor v);
|
|
64 }
|