equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2017, 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. |
296 |
296 |
297 #undef NPRGREG |
297 #undef NPRGREG |
298 #ifdef i386 |
298 #ifdef i386 |
299 #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG |
299 #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG |
300 #endif |
300 #endif |
301 #ifdef ia64 |
|
302 #define NPRGREG IA64_REG_COUNT |
|
303 #endif |
|
304 #ifdef amd64 |
301 #ifdef amd64 |
305 #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG |
302 #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG |
306 #endif |
303 #endif |
307 #if defined(sparc) || defined(sparcv9) |
304 #if defined(sparc) || defined(sparcv9) |
308 #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG |
305 #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG |
332 regs[REG_INDEX(PC)] = (uintptr_t) gregs.r_eip; |
329 regs[REG_INDEX(PC)] = (uintptr_t) gregs.r_eip; |
333 regs[REG_INDEX(CS)] = (uintptr_t) gregs.r_cs; |
330 regs[REG_INDEX(CS)] = (uintptr_t) gregs.r_cs; |
334 regs[REG_INDEX(SS)] = (uintptr_t) gregs.r_ss; |
331 regs[REG_INDEX(SS)] = (uintptr_t) gregs.r_ss; |
335 |
332 |
336 #endif /* i386 */ |
333 #endif /* i386 */ |
337 |
|
338 #if ia64 |
|
339 regs = (*env)->GetLongArrayElements(env, array, &isCopy); |
|
340 int i; |
|
341 for (i = 0; i < NPRGREG; i++ ) { |
|
342 regs[i] = 0xDEADDEAD; |
|
343 } |
|
344 #endif /* ia64 */ |
|
345 |
334 |
346 #ifdef amd64 |
335 #ifdef amd64 |
347 #define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg |
336 #define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg |
348 |
337 |
349 regs[REG_INDEX(R15)] = gregs.r_r15; |
338 regs[REG_INDEX(R15)] = gregs.r_r15; |