comparison agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java @ 6641:a9fed06c01d2

7154641: Servicability agent should work on platforms other than x86, sparc Summary: Added capability to load support classes for other cpus Reviewed-by: coleenp, bobv, sla Contributed-by: Bill Pittore <bill.pittore@oracle.com>
author bpittore
date Thu, 30 Aug 2012 11:20:01 -0400
parents 78d2ae5ab35b
children 5a98bf7d847b
comparison
equal deleted inserted replaced
6640:e2cc1fe53845 6641:a9fed06c01d2
1 /* 1 /*
2 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2012, 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.
547 machDesc = new MachineDescriptionSPARC64Bit(); 547 machDesc = new MachineDescriptionSPARC64Bit();
548 } else { 548 } else {
549 machDesc = new MachineDescriptionSPARC32Bit(); 549 machDesc = new MachineDescriptionSPARC32Bit();
550 } 550 }
551 } else { 551 } else {
552 throw new DebuggerException("Linux only supported on x86/ia64/amd64/sparc/sparc64"); 552 try {
553 machDesc = (MachineDescription)
554 Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
555 cpu.toUpperCase()).newInstance();
556 } catch (Exception e) {
557 throw new DebuggerException("Linux not supported on machine type " + cpu);
558 }
553 } 559 }
554 560
555 LinuxDebuggerLocal dbg = 561 LinuxDebuggerLocal dbg =
556 new LinuxDebuggerLocal(machDesc, !isServer); 562 new LinuxDebuggerLocal(machDesc, !isServer);
557 debugger = dbg; 563 debugger = dbg;