1 IMPLEMENTATION [ppc32]:
3 EXTENSION class Jdb_tcb
14 void Jdb_tcb::print_entry_frame_regs(Thread *)
16 Jdb_entry_frame *ef = Jdb::get_entry_frame(Jdb::current_cpu);
17 int from_user = ef->from_user();
19 printf("\n\n\nRegisters (before debug entry from %s mode):\n"
20 "[0] %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"
21 "[8] %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"
22 "[16] %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"
23 "[24] %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx"
24 "\033[m\n sp = %08lx\n",
25 from_user ? "user" : "kernel",
26 ef->r[0], ef->usp, ef->r[1], ef->r[2], ef->r[3],
27 ef->r[4], ef->r[5], ef->r[6], ef->r[7], ef->r[8],
28 ef->r[9], ef->r11, ef->r12 , ef->r[10], ef->r[11],
29 ef->r[12], ef->r[13], ef->r[14], ef->r[15], ef->r[16],
30 ef->r[17], ef->r[18], ef->r[19], ef->r[20], ef->r[21],
31 ef->r[22], ef->r[23], ef->r[24], ef->r[25], ef->r[26],
32 ef->r[27], ef->r[28], ef->usp);
37 Jdb_tcb::info_thread_state(Thread *t)
39 Jdb_tcb_ptr current((Address)t->get_kernel_sp());
41 printf("\n\n\nSRR0=%s%08lx\033[m USP=%08lx ULR=%08lx ENTRY IP=%08lx\n",
42 Jdb::esc_emph, current.top_value(-5), current.top_value(-3),
43 current.top_value(-4), current.top_value(-10));
45 printf("[0] %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"
46 "[8] %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"
47 "[16] %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"
48 "[24] %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx"
50 current.top_value(-39), //0
51 current.top_value(-3), //1
52 current.top_value(-38), //2
53 current.top_value(-37), //3
54 current.top_value(-36), //4
55 current.top_value(-35), //5
56 current.top_value(-34), //6
57 current.top_value(-33), //7
58 current.top_value(-32), //8
59 current.top_value(-31), //9
60 current.top_value(-30), //10
61 current.top_value(-2), //11
62 current.top_value(-1), //12
63 current.top_value(-29), //13
64 current.top_value(-28), //14
65 current.top_value(-27), //15
66 current.top_value(-26), //16
67 current.top_value(-25), //17
68 current.top_value(-24), //18
69 current.top_value(-23), //19
70 current.top_value(-22), //20
71 current.top_value(-21), //21
72 current.top_value(-20), //22
73 current.top_value(-19), //23
74 current.top_value(-18), //24
75 current.top_value(-17), //25
76 current.top_value(-16), //26
77 current.top_value(-15), //27
78 current.top_value(-14), //28
79 current.top_value(-13), //29
80 current.top_value(-12), //30
81 current.top_value(-11) //31
87 Jdb_tcb::print_return_frame_regs(Jdb_tcb_ptr const &, Address)
92 Jdb_stack_view::edit_registers()
99 Jdb_tcb_ptr::is_user_value() const
101 return _offs >= Context::Size - 9 * sizeof(Mword);
106 Jdb_tcb_ptr::user_value_desc() const
108 const char *desc[] = { "r12", "r11", "USP", "ULR", "SRR0", "SRR1",
109 "CR", "CTR", "XER" };
110 return desc[(Context::Size - _offs) / sizeof(Mword) - 1];