Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.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 | c18cbe5936b8 |
children | d7cb88bd7046 |
comparison
equal
deleted
inserted
replaced
6640:e2cc1fe53845 | 6641:a9fed06c01d2 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2003, 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. |
105 if (sp == null) return null; | 105 if (sp == null) return null; |
106 Address pc = context.getRegisterAsAddress(SPARCThreadContext.R_O7); | 106 Address pc = context.getRegisterAsAddress(SPARCThreadContext.R_O7); |
107 if (pc == null) return null; | 107 if (pc == null) return null; |
108 return new LinuxSPARCCFrame(dbg, sp, pc, LinuxDebuggerLocal.getAddressSize()); | 108 return new LinuxSPARCCFrame(dbg, sp, pc, LinuxDebuggerLocal.getAddressSize()); |
109 } else { | 109 } else { |
110 throw new DebuggerException(cpu + " is not yet supported"); | 110 // Runtime exception thrown by LinuxThreadContextFactory if unknown cpu |
111 ThreadContext context = (ThreadContext) thread.getContext(); | |
112 return context.getTopFrame(dbg); | |
111 } | 113 } |
112 } | 114 } |
113 | 115 |
114 public String getNameOfFile(String fileName) { | 116 public String getNameOfFile(String fileName) { |
115 return new File(fileName).getName(); | 117 return new File(fileName).getName(); |