< prev index next >

src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -977,62 +977,62 @@
   if (context == NULL) return;
 
   const ucontext_t *uc = (const ucontext_t*)context;
   st->print_cr("Registers:");
 #ifdef AMD64
-  st->print(  "RAX=" INTPTR_FORMAT, uc->context_rax);
-  st->print(", RBX=" INTPTR_FORMAT, uc->context_rbx);
-  st->print(", RCX=" INTPTR_FORMAT, uc->context_rcx);
-  st->print(", RDX=" INTPTR_FORMAT, uc->context_rdx);
+  st->print(  "RAX=" INTPTR_FORMAT, (intptr_t)uc->context_rax);
+  st->print(", RBX=" INTPTR_FORMAT, (intptr_t)uc->context_rbx);
+  st->print(", RCX=" INTPTR_FORMAT, (intptr_t)uc->context_rcx);
+  st->print(", RDX=" INTPTR_FORMAT, (intptr_t)uc->context_rdx);
   st->cr();
-  st->print(  "RSP=" INTPTR_FORMAT, uc->context_rsp);
-  st->print(", RBP=" INTPTR_FORMAT, uc->context_rbp);
-  st->print(", RSI=" INTPTR_FORMAT, uc->context_rsi);
-  st->print(", RDI=" INTPTR_FORMAT, uc->context_rdi);
+  st->print(  "RSP=" INTPTR_FORMAT, (intptr_t)uc->context_rsp);
+  st->print(", RBP=" INTPTR_FORMAT, (intptr_t)uc->context_rbp);
+  st->print(", RSI=" INTPTR_FORMAT, (intptr_t)uc->context_rsi);
+  st->print(", RDI=" INTPTR_FORMAT, (intptr_t)uc->context_rdi);
   st->cr();
-  st->print(  "R8 =" INTPTR_FORMAT, uc->context_r8);
-  st->print(", R9 =" INTPTR_FORMAT, uc->context_r9);
-  st->print(", R10=" INTPTR_FORMAT, uc->context_r10);
-  st->print(", R11=" INTPTR_FORMAT, uc->context_r11);
+  st->print(  "R8 =" INTPTR_FORMAT, (intptr_t)uc->context_r8);
+  st->print(", R9 =" INTPTR_FORMAT, (intptr_t)uc->context_r9);
+  st->print(", R10=" INTPTR_FORMAT, (intptr_t)uc->context_r10);
+  st->print(", R11=" INTPTR_FORMAT, (intptr_t)uc->context_r11);
   st->cr();
-  st->print(  "R12=" INTPTR_FORMAT, uc->context_r12);
-  st->print(", R13=" INTPTR_FORMAT, uc->context_r13);
-  st->print(", R14=" INTPTR_FORMAT, uc->context_r14);
-  st->print(", R15=" INTPTR_FORMAT, uc->context_r15);
+  st->print(  "R12=" INTPTR_FORMAT, (intptr_t)uc->context_r12);
+  st->print(", R13=" INTPTR_FORMAT, (intptr_t)uc->context_r13);
+  st->print(", R14=" INTPTR_FORMAT, (intptr_t)uc->context_r14);
+  st->print(", R15=" INTPTR_FORMAT, (intptr_t)uc->context_r15);
   st->cr();
-  st->print(  "RIP=" INTPTR_FORMAT, uc->context_rip);
-  st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_flags);
-  st->print(", ERR=" INTPTR_FORMAT, uc->context_err);
+  st->print(  "RIP=" INTPTR_FORMAT, (intptr_t)uc->context_rip);
+  st->print(", EFLAGS=" INTPTR_FORMAT, (intptr_t)uc->context_flags);
+  st->print(", ERR=" INTPTR_FORMAT, (intptr_t)uc->context_err);
   st->cr();
-  st->print("  TRAPNO=" INTPTR_FORMAT, uc->context_trapno);
+  st->print("  TRAPNO=" INTPTR_FORMAT, (intptr_t)uc->context_trapno);
 #else
-  st->print(  "EAX=" INTPTR_FORMAT, uc->context_eax);
-  st->print(", EBX=" INTPTR_FORMAT, uc->context_ebx);
-  st->print(", ECX=" INTPTR_FORMAT, uc->context_ecx);
-  st->print(", EDX=" INTPTR_FORMAT, uc->context_edx);
+  st->print(  "EAX=" INTPTR_FORMAT, (intptr_t)uc->context_eax);
+  st->print(", EBX=" INTPTR_FORMAT, (intptr_t)uc->context_ebx);
+  st->print(", ECX=" INTPTR_FORMAT, (intptr_t)uc->context_ecx);
+  st->print(", EDX=" INTPTR_FORMAT, (intptr_t)uc->context_edx);
   st->cr();
-  st->print(  "ESP=" INTPTR_FORMAT, uc->context_esp);
-  st->print(", EBP=" INTPTR_FORMAT, uc->context_ebp);
-  st->print(", ESI=" INTPTR_FORMAT, uc->context_esi);
-  st->print(", EDI=" INTPTR_FORMAT, uc->context_edi);
+  st->print(  "ESP=" INTPTR_FORMAT, (intptr_t)uc->context_esp);
+  st->print(", EBP=" INTPTR_FORMAT, (intptr_t)uc->context_ebp);
+  st->print(", ESI=" INTPTR_FORMAT, (intptr_t)uc->context_esi);
+  st->print(", EDI=" INTPTR_FORMAT, (intptr_t)uc->context_edi);
   st->cr();
-  st->print(  "EIP=" INTPTR_FORMAT, uc->context_eip);
-  st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags);
+  st->print(  "EIP=" INTPTR_FORMAT, (intptr_t)uc->context_eip);
+  st->print(", EFLAGS=" INTPTR_FORMAT, (intptr_t)uc->context_eflags);
 #endif // AMD64
   st->cr();
   st->cr();
 
   intptr_t *sp = (intptr_t *)os::Bsd::ucontext_get_sp(uc);
-  st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp);
+  st->print_cr("Top of Stack: (sp=" INTPTR_FORMAT ")", (intptr_t)sp);
   print_hex_dump(st, (address)sp, (address)(sp + 8*sizeof(intptr_t)), sizeof(intptr_t));
   st->cr();
 
   // Note: it may be unsafe to inspect memory near pc. For example, pc may
   // point to garbage if entry point in an nmethod is corrupted. Leave
   // this at the end, and hope for the best.
   address pc = os::Bsd::ucontext_get_pc(uc);
-  st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc);
+  st->print_cr("Instructions: (pc=" INTPTR_FORMAT ")", (intptr_t)pc);
   print_hex_dump(st, pc - 32, pc + 32, sizeof(char));
 }
 
 void os::print_register_info(outputStream *st, const void *context) {
   if (context == NULL) return;
< prev index next >