Print this page
10568 bop_trap() should report %cr2

@@ -2015,10 +2015,11 @@
         bop_printf(NULL, "instruction pointer  0x%lx\n", tf->inst_ptr);
         bop_printf(NULL, "code segment         0x%lx\n", tf->code_seg & 0xffff);
         bop_printf(NULL, "flags register       0x%lx\n", tf->flags_reg);
         bop_printf(NULL, "return %%rsp          0x%lx\n", tf->stk_ptr);
         bop_printf(NULL, "return %%ss           0x%lx\n", tf->stk_seg & 0xffff);
+        bop_printf(NULL, "%%cr2                 0x%lx\n", getcr2());
 
         /* grab %[er]bp pushed by our code from the stack */
         fakeframe.old_frame = (bop_frame_t *)*(tfp - 3);
         fakeframe.retaddr = (pc_t)tf->inst_ptr;
         bop_printf(NULL, "Attempting stack backtrace:\n");