Date: Sat, 27 Apr 2002 22:51:45 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 10391 for review Message-ID: <200204280551.g3S5pjb55197@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10391 Change 10391 by marcel@marcel_vaio on 2002/04/27 22:51:29 Draft implementation of ptrace_set_pc and ptrace_single_step. Affected files ... ... //depot/projects/ia64/sys/ia64/ia64/machdep.c#30 edit Differences ... ==== //depot/projects/ia64/sys/ia64/ia64/machdep.c#30 (text+ko) ==== @@ -1125,15 +1125,33 @@ int ptrace_set_pc(struct thread *td, unsigned long addr) { - /* TODO set pc in trapframe */ - return 0; + uint64_t slot; + + switch (addr & 0xFUL) { + case 0: + slot = IA64_PSR_RI_0; + break; + case 1: + /* XXX we need to deal with MLX bundles here */ + slot = IA64_PSR_RI_1; + break; + case 2: + slot = IA64_PSR_RI_2; + break; + default: + return (EINVAL); + } + + td->td_frame->tf_cr_iip = addr & ~0x0FULL; + td->td_frame->tf_cr_ipsr = (tf_cr_ipsr & ~IA64_PSR_RI) | slot; + return (0); } int ptrace_single_step(struct thread *td) { - /* TODO arrange for user process to single step */ - return 0; + td->td_frame->tf_cr_ipsr |= IA64_PSR_SS; + return (0); } int To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204280551.g3S5pjb55197>