comparison agent/src/share/classes/sun/jvm/hotspot/TestDebugger.java @ 3939:f6f3bb0ee072

7088955: add C2 IR support to the SA Reviewed-by: kvn
author never
date Sun, 11 Sep 2011 14:48:24 -0700
parents c18cbe5936b8
children
comparison
equal deleted inserted replaced
3938:e6b1331a51d2 3939:f6f3bb0ee072
1 /* 1 /*
2 * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
23 */ 23 */
24 24
25 package sun.jvm.hotspot; 25 package sun.jvm.hotspot;
26 26
27 import sun.jvm.hotspot.debugger.*; 27 import sun.jvm.hotspot.debugger.*;
28 import sun.jvm.hotspot.debugger.dbx.*; 28 import sun.jvm.hotspot.debugger.proc.*;
29 29
30 // A test of the debugger backend. This should be used to connect to 30 // A test of the debugger backend. This should be used to connect to
31 // the helloWorld.cpp program. 31 // the helloWorld.cpp program.
32 32
33 public class TestDebugger { 33 public class TestDebugger {
34 // FIXME: make these configurable, i.e., via a dotfile
35 private static final String dbxPathName = "/export/home/kbr/ws/dbx_61/dev/Derived-sparcv9-S2./src/dbx/dbx";
36 private static final String[] dbxSvcAgentDSOPathNames =
37 new String[] {
38 "/export/home/kbr/main/sa_baseline/src/os/solaris/agent/libsvc_agent_dbx.so"
39 };
40 34
41 private static void usage() { 35 private static void usage() {
42 System.out.println("usage: java TestDebugger [pid]"); 36 System.out.println("usage: java TestDebugger [pid]");
43 System.out.println("pid must be the process ID of the helloWorld process"); 37 System.out.println("pid must be the process ID of the helloWorld process");
44 System.exit(1); 38 System.exit(1);
56 } 50 }
57 catch (NumberFormatException e) { 51 catch (NumberFormatException e) {
58 usage(); 52 usage();
59 } 53 }
60 54
61 JVMDebugger debugger = new DbxDebuggerLocal(new MachineDescriptionSPARC64Bit(), 55 JVMDebugger debugger = new ProcDebuggerLocal(null, true);
62 dbxPathName, dbxSvcAgentDSOPathNames, true);
63 56
64 try { 57 try {
65 debugger.attach(pid); 58 debugger.attach(pid);
66 } 59 }
67 catch (DebuggerException e) { 60 catch (DebuggerException e) {