From 001b1fb41ca4af4c0c0099980096d058631edcfb Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Tue, 2 Nov 1999 05:50:38 +0000 Subject: support usermode disasm --- sys/arch/hppa/hppa/db_disasm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/arch/hppa/hppa/db_disasm.c b/sys/arch/hppa/hppa/db_disasm.c index 83c3e464f38..e37073132c0 100644 --- a/sys/arch/hppa/hppa/db_disasm.c +++ b/sys/arch/hppa/hppa/db_disasm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_disasm.c,v 1.4 1999/09/10 19:55:15 mickey Exp $ */ +/* $OpenBSD: db_disasm.c,v 1.5 1999/11/02 05:50:37 mickey Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -2317,11 +2317,17 @@ db_disasm(loc, flag) register const struct inst *i; register const struct majoropcode *m; register u_int ext; - int instruct = *(int *)loc; + int instruct; OFS ofs = 0; iExInit(); + if (USERMODE(loc)) + copyin((caddr_t)(loc &~ HPPA_PC_PRIV_MASK), + &instruct, sizeof(instruct)); + else + instruct = *(int *)loc; + m = &majopcs[Opcode(instruct)]; ext = OpExt(instruct, m); if (ext <= m->maxsubop) { -- cgit v1.2.3