Lines Matching full:ks

477 static void gdb_cmd_status(struct kgdb_state *ks)  in gdb_cmd_status()  argument
488 hex_byte_pack(&remcom_out_buffer[1], ks->signo); in gdb_cmd_status()
491 static void gdb_get_regs_helper(struct kgdb_state *ks) in gdb_get_regs_helper() argument
499 thread = kgdb_info[ks->cpu].task; in gdb_get_regs_helper()
500 local_debuggerinfo = kgdb_info[ks->cpu].debuggerinfo; in gdb_get_regs_helper()
535 static void gdb_cmd_getregs(struct kgdb_state *ks) in gdb_cmd_getregs() argument
537 gdb_get_regs_helper(ks); in gdb_cmd_getregs()
542 static void gdb_cmd_setregs(struct kgdb_state *ks) in gdb_cmd_setregs() argument
549 gdb_regs_to_pt_regs(gdb_regs, ks->linux_regs); in gdb_cmd_setregs()
555 static void gdb_cmd_memread(struct kgdb_state *ks) in gdb_cmd_memread() argument
573 static void gdb_cmd_memwrite(struct kgdb_state *ks) in gdb_cmd_memwrite() argument
596 static void gdb_cmd_reg_get(struct kgdb_state *ks) in gdb_cmd_reg_get() argument
606 gdb_get_regs_helper(ks); in gdb_cmd_reg_get()
611 static void gdb_cmd_reg_set(struct kgdb_state *ks) in gdb_cmd_reg_set() argument
620 !dbg_get_reg(regnum, gdb_regs, ks->linux_regs)) { in gdb_cmd_reg_set()
632 dbg_set_reg(regnum, gdb_regs, ks->linux_regs); in gdb_cmd_reg_set()
638 static void gdb_cmd_binwrite(struct kgdb_state *ks) in gdb_cmd_binwrite() argument
649 static void gdb_cmd_detachkill(struct kgdb_state *ks) in gdb_cmd_detachkill() argument
674 static int gdb_cmd_reboot(struct kgdb_state *ks) in gdb_cmd_reboot() argument
695 static void gdb_cmd_query(struct kgdb_state *ks) in gdb_cmd_query() argument
717 ks->thr_query = 0; in gdb_cmd_query()
726 if (i >= ks->thr_query && !finished) { in gdb_cmd_query()
730 ks->thr_query++; in gdb_cmd_query()
731 if (ks->thr_query % KGDB_MAX_THREAD_QUERY == 0) in gdb_cmd_query()
743 ks->threadid = shadow_pid(current->pid); in gdb_cmd_query()
744 int_to_threadref(thref, ks->threadid); in gdb_cmd_query()
751 ks->threadid = 0; in gdb_cmd_query()
753 kgdb_hex2long(&ptr, &ks->threadid); in gdb_cmd_query()
754 if (!getthread(ks->linux_regs, ks->threadid)) { in gdb_cmd_query()
758 if ((int)ks->threadid > 0) { in gdb_cmd_query()
759 kgdb_mem2hex(getthread(ks->linux_regs, in gdb_cmd_query()
760 ks->threadid)->comm, in gdb_cmd_query()
766 (int)(-ks->threadid - 2)); in gdb_cmd_query()
784 kdb_common_init_state(ks); in gdb_cmd_query()
809 static void gdb_cmd_task(struct kgdb_state *ks) in gdb_cmd_task() argument
817 kgdb_hex2long(&ptr, &ks->threadid); in gdb_cmd_task()
818 thread = getthread(ks->linux_regs, ks->threadid); in gdb_cmd_task()
819 if (!thread && ks->threadid > 0) { in gdb_cmd_task()
824 ks->kgdb_usethreadid = ks->threadid; in gdb_cmd_task()
829 kgdb_hex2long(&ptr, &ks->threadid); in gdb_cmd_task()
830 if (!ks->threadid) { in gdb_cmd_task()
833 thread = getthread(ks->linux_regs, ks->threadid); in gdb_cmd_task()
834 if (!thread && ks->threadid > 0) { in gdb_cmd_task()
846 static void gdb_cmd_thread(struct kgdb_state *ks) in gdb_cmd_thread() argument
851 kgdb_hex2long(&ptr, &ks->threadid); in gdb_cmd_thread()
852 thread = getthread(ks->linux_regs, ks->threadid); in gdb_cmd_thread()
860 static void gdb_cmd_break(struct kgdb_state *ks) in gdb_cmd_break() argument
922 static int gdb_cmd_exception_pass(struct kgdb_state *ks) in gdb_cmd_exception_pass() argument
929 ks->pass_exception = 1; in gdb_cmd_exception_pass()
934 ks->pass_exception = 1; in gdb_cmd_exception_pass()
954 int gdb_serial_stub(struct kgdb_state *ks) in gdb_serial_stub() argument
961 kgdb_usethread = kgdb_info[ks->cpu].task; in gdb_serial_stub()
962 ks->kgdb_usethreadid = shadow_pid(kgdb_info[ks->cpu].task->pid); in gdb_serial_stub()
963 ks->pass_exception = 0; in gdb_serial_stub()
972 ptr = hex_byte_pack(ptr, ks->signo); in gdb_serial_stub()
990 gdb_cmd_status(ks); in gdb_serial_stub()
993 gdb_cmd_getregs(ks); in gdb_serial_stub()
996 gdb_cmd_setregs(ks); in gdb_serial_stub()
999 gdb_cmd_memread(ks); in gdb_serial_stub()
1002 gdb_cmd_memwrite(ks); in gdb_serial_stub()
1006 gdb_cmd_reg_get(ks); in gdb_serial_stub()
1009 gdb_cmd_reg_set(ks); in gdb_serial_stub()
1013 gdb_cmd_binwrite(ks); in gdb_serial_stub()
1020 gdb_cmd_detachkill(ks); in gdb_serial_stub()
1023 if (gdb_cmd_reboot(ks)) in gdb_serial_stub()
1027 gdb_cmd_query(ks); in gdb_serial_stub()
1030 gdb_cmd_task(ks); in gdb_serial_stub()
1033 gdb_cmd_thread(ks); in gdb_serial_stub()
1037 gdb_cmd_break(ks); in gdb_serial_stub()
1042 gdb_cmd_detachkill(ks); in gdb_serial_stub()
1048 tmp = gdb_cmd_exception_pass(ks); in gdb_serial_stub()
1064 error = kgdb_arch_handle_exception(ks->ex_vector, in gdb_serial_stub()
1065 ks->signo, in gdb_serial_stub()
1066 ks->err_code, in gdb_serial_stub()
1069 ks->linux_regs); in gdb_serial_stub()
1087 if (ks->pass_exception) in gdb_serial_stub()
1092 int gdbstub_state(struct kgdb_state *ks, char *cmd) in gdbstub_state() argument
1098 error = kgdb_arch_handle_exception(ks->ex_vector, in gdbstub_state()
1099 ks->signo, in gdbstub_state()
1100 ks->err_code, in gdbstub_state()
1103 ks->linux_regs); in gdbstub_state()