--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Thu Dec 10 14:22:00 2015 +0100
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Mon Dec 14 02:29:11 2015 -0500
@@ -117,7 +117,7 @@
// Nothing to do.
}
-address os::Linux::ucontext_get_pc(ucontext_t * uc) {
+address os::Linux::ucontext_get_pc(const ucontext_t * uc) {
return (address)uc->uc_mcontext.gregs[REG_PC];
}
@@ -125,11 +125,11 @@
uc->uc_mcontext.gregs[REG_PC] = (intptr_t)pc;
}
-intptr_t* os::Linux::ucontext_get_sp(ucontext_t * uc) {
+intptr_t* os::Linux::ucontext_get_sp(const ucontext_t * uc) {
return (intptr_t*)uc->uc_mcontext.gregs[REG_SP];
}
-intptr_t* os::Linux::ucontext_get_fp(ucontext_t * uc) {
+intptr_t* os::Linux::ucontext_get_fp(const ucontext_t * uc) {
return (intptr_t*)uc->uc_mcontext.gregs[REG_FP];
}
@@ -140,7 +140,7 @@
// os::fetch_frame_from_context().
// This method is also used for stack overflow signal handling.
ExtendedPC os::Linux::fetch_frame_from_ucontext(Thread* thread,
- ucontext_t* uc, intptr_t** ret_sp, intptr_t** ret_fp) {
+ const ucontext_t* uc, intptr_t** ret_sp, intptr_t** ret_fp) {
assert(thread != NULL, "just checking");
assert(ret_sp != NULL, "just checking");
@@ -149,11 +149,11 @@
return os::fetch_frame_from_context(uc, ret_sp, ret_fp);
}
-ExtendedPC os::fetch_frame_from_context(void* ucVoid,
+ExtendedPC os::fetch_frame_from_context(const void* ucVoid,
intptr_t** ret_sp, intptr_t** ret_fp) {
ExtendedPC epc;
- ucontext_t* uc = (ucontext_t*)ucVoid;
+ const ucontext_t* uc = (const ucontext_t*)ucVoid;
if (uc != NULL) {
epc = ExtendedPC(os::Linux::ucontext_get_pc(uc));
@@ -169,7 +169,7 @@
return epc;
}
-frame os::fetch_frame_from_context(void* ucVoid) {
+frame os::fetch_frame_from_context(const void* ucVoid) {
intptr_t* sp;
intptr_t* fp;
ExtendedPC epc = fetch_frame_from_context(ucVoid, &sp, &fp);
@@ -784,10 +784,10 @@
/////////////////////////////////////////////////////////////////////////////
// helper functions for fatal error handler
-void os::print_context(outputStream *st, void *context) {
+void os::print_context(outputStream *st, const void *context) {
if (context == NULL) return;
- ucontext_t *uc = (ucontext_t*)context;
+ const ucontext_t *uc = (const ucontext_t*)context;
st->print_cr("Registers:");
#ifdef AMD64
st->print( "RAX=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.gregs[REG_RAX]);
@@ -847,10 +847,10 @@
print_hex_dump(st, pc - 32, pc + 32, sizeof(char));
}
-void os::print_register_info(outputStream *st, void *context) {
+void os::print_register_info(outputStream *st, const void *context) {
if (context == NULL) return;
- ucontext_t *uc = (ucontext_t*)context;
+ const ucontext_t *uc = (const ucontext_t*)context;
st->print_cr("Register to memory mapping:");
st->cr();